Commit 55726acf authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_real_time_inventory_accounting: Implement Internal Packing List use case.

IPL must expand both "In"coming (only PPL until now) and "Out"going (only SPL
until now) SMs, so split up ledger='stock' TMPs and add accordingly two
subcategories to stock ("entree" and "sortie").

Also instead of using 'use' categories everywhere (TMPs and Rules), use the
Delivery Portal Type as this makes things clearer for IPL use case.
parent 741ade21
......@@ -71,7 +71,11 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM
update_property_dict=update_property_dict):
# PATCH-BEGIN
update_dict = {}
if movement.getLedger() == 'transit/entree':
if movement.getLedger() == 'stock/entree':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStopDate()
elif movement.getLedger() == 'stock/sortie':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStartDate()
elif movement.getLedger() == 'transit/entree':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStartDate()
elif movement.getLedger() == 'transit/sortie':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStopDate()
......@@ -105,30 +109,8 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM
self,
input_movement)
# XXX: Root Applied Rule?
use = input_movement.getUse()
# Site Preference => Trade => Sale/Purchase uses
#input_movement.log("%r (ledger=%r)" % (input_movement, input_movement.getLedger()))
if use == 'trade/sale':
start_date = input_movement.getStartDate()
if input_movement.getLedger() == 'transit/sortie':
stop_date = input_movement.getStopDate()
else:
stop_date = start_date
elif use == 'trade/purchase':
stop_date = input_movement.getStopDate()
if input_movement.getLedger() == 'transit/entree':
start_date = input_movement.getStartDate()
else:
start_date = stop_date
if input_movement.getDeliveryValue().getPortalType().startswith('Purchase Packing List'):
update_property_dict['source_section'] = input_movement.getDestinationSection()
else:
raise NotImplementedError("%s: use='%s' not handled by this Rule" %
(input_movement.getPath(), use))
update_property_dict['start_date'] = start_date
update_property_dict['stop_date'] = stop_date
return update_property_dict
......
kw['parent_specialise_reference'] = ['default_inventory_accounting_transaction_rule']
kw['grand_grand_parent_specialise_reference'] = ['default_delivering_rule', 'default_delivery_rule']
kw['explanation_portal_type'] = ['Sale Packing List', 'Purchase Packing List']
kw['explanation_portal_type'] = ['Sale Packing List', 'Purchase Packing List', 'Internal Packing List']
kw['portal_type'] = 'Simulation Movement'
kw['delivery_uid'] = None
kw['left_join_list'] = ['delivery_uid']
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Path" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>ledger</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/entree</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-INVENTORY-ACCOUNTING-STOCK-LG-IN-CREDIT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>destination_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerInCreditDestination</string> </value>
</item>
<item>
<key> <string>efficiency</string> </key>
<value> <float>-1.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>inventory_accounting_stock_ledger_in_credit_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>source_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Purchase Packing List Line\', \'Purchase Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Stock Ledger In Credit</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Path" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>ledger</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/entree</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-INVENTORY-ACCOUNTING-STOCK-LG-IN-DEBIT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>destination_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerInDebitDestination</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>inventory_accounting_stock_ledger_in_debit_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>source_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Purchase Packing List Line\', \'Purchase Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Stock Ledger In Debit</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -40,13 +40,13 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock</string>
<string>ledger/stock/sortie</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-INVENTORY-ACCOUNTING-STOCK-LG-CREDIT</string> </value>
<value> <string>TMP-INVENTORY-ACCOUNTING-STOCK-LG-OUT-CREDIT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -56,7 +56,9 @@
</item>
<item>
<key> <string>destination_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerCreditDestination</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>efficiency</string> </key>
......@@ -64,7 +66,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>inventory_accounting_stock_ledger_credit_path</string> </value>
<value> <string>inventory_accounting_stock_ledger_out_credit_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -80,6 +82,12 @@
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
......@@ -90,11 +98,27 @@
</item>
<item>
<key> <string>source_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerCreditSource</string> </value>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerOutCreditSource</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Stock Ledger Credit</string> </value>
<value> <string>Inventory Accounting Stock Ledger Out Credit</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -40,13 +40,13 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock</string>
<string>ledger/stock/sortie</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-INVENTORY-ACCOUNTING-STOCK-LG-DEBIT</string> </value>
<value> <string>TMP-INVENTORY-ACCOUNTING-STOCK-LG-OUT-DEBIT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -56,11 +56,13 @@
</item>
<item>
<key> <string>destination_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerDebitDestination</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>inventory_accounting_stock_ledger_debit_path</string> </value>
<value> <string>inventory_accounting_stock_ledger_out_debit_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -76,6 +78,12 @@
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
......@@ -86,11 +94,27 @@
</item>
<item>
<key> <string>source_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerDebitSource</string> </value>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerOutDebitSource</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Stock Ledger Debit</string> </value>
<value> <string>Inventory Accounting Stock Ledger Out Debit</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -44,6 +44,12 @@
</tuple>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-INVENTORY-ACCOUNTING-TRANSIT-LG-IN-CREDIT</string> </value>
......@@ -80,6 +86,12 @@
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
......@@ -92,6 +104,22 @@
<key> <string>source_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingTransitLedgerInCreditSource</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Purchase Packing List Line\', \'Purchase Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Transit Ledger In Credit</string> </value>
......
......@@ -76,6 +76,12 @@
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
......@@ -88,6 +94,22 @@
<key> <string>source_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingTransitLedgerInDebitSource</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Purchase Packing List Line\', \'Purchase Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Transit Ledger In Debit</string> </value>
......
......@@ -80,6 +80,12 @@
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
......@@ -92,6 +98,22 @@
<key> <string>source_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingTransitLedgerOutCreditSource</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Purchase Packing List Line\', \'Purchase Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Transit Ledger Out Credit</string> </value>
......
......@@ -76,6 +76,12 @@
<key> <string>ledger</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
......@@ -88,6 +94,22 @@
<key> <string>source_method_id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingTransitLedgerOutDebitSource</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Purchase Packing List Line\', \'Purchase Packing List Cell\')</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Accounting Transit Ledger Out Debit</string> </value>
......
......@@ -53,6 +53,24 @@
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>stock</string> </value>
......@@ -68,4 +86,26 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>ledger/stock/entree</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>entree</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Entree Stock</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>ledger/stock/sortie</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>sortie</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Sortie Stock</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
use = movement.getUse()
if use == 'trade/sale':
return []
elif use == 'trade/purchase':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Purchase Packing List'):
if movement.getDestination() == 'organisation_module/supplier':
return ['source/account_module/stock_parts_port']
elif delivery_portal_type.startswith('Internal Packing List'):
if movement.getDestination() == 'organisation_module/park':
return ['source/account_module/stock_car_park']
else:
raise NotImplementedError
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerCreditDestination</string> </value>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerInCreditDestination</string> </value>
</item>
</dictionary>
</pickle>
......
use = movement.getUse()
if use == 'trade/sale':
return []
elif use == 'trade/purchase':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Purchase Packing List'):
if movement.getDestination() == 'organisation_module/supplier':
return ['source/account_module/variation_parts']
elif delivery_portal_type.startswith('Internal Packing List'):
return ['source/account_module/variation_cars']
else:
raise NotImplementedError
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerDebitDestination</string> </value>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerInDebitDestination</string> </value>
</item>
</dictionary>
</pickle>
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
if movement.getSource() == 'organisation_module/hoge':
return ['source/account_module/variation_cars']
elif use == 'trade/purchase':
return []
elif delivery_portal_type.startswith('Internal Packing List'):
return ['source/account_module/variation_cars']
else:
raise NotImplementedError
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerCreditSource</string> </value>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerOutCreditSource</string> </value>
</item>
</dictionary>
</pickle>
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
if movement.getSource() == 'organisation_module/hoge':
return ['source/account_module/stock_car_park']
elif use == 'trade/purchase':
return []
elif delivery_portal_type.startswith('Internal Packing List'):
if movement.getSource() == 'organisation_module/workshop':
return ['source/account_module/stock_car_workshop']
else:
raise NotImplementedError
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerDebitSource</string> </value>
<value> <string>TradeModelPath_getInventoryAccountingStockLedgerOutDebitSource</string> </value>
</item>
</dictionary>
</pickle>
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
return []
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
if movement.getDestination() == 'organisation_module/supplier':
return ['source/account_module/stock_parts_transit']
else:
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
if movement.getSource() == 'organisation_module/hoge':
return ['source/account_module/variation_cars']
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
return []
else:
raise NotImplementedError
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
return []
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
if movement.getDestination() == 'organisation_module/supplier':
return ['source/account_module/variation_parts']
else:
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
if movement.getSource() == 'organisation_module/hoge':
return ['source/account_module/stock_car_transit']
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
return []
else:
raise NotImplementedError
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
return []
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
if movement.getDestination() == 'organisation_module/supplier':
return ['source/account_module/variation_parts']
else:
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
if movement.getSource() == 'organisation_module/hoge':
return ['source/account_module/stock_car_transit']
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
return []
else:
raise NotImplementedError
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
return []
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
if movement.getDestination() == 'organisation_module/supplier':
return ['source/account_module/stock_parts_transit']
else:
......
use = movement.getUse()
if use == 'trade/sale':
delivery_portal_type = movement.getDeliveryValue().getPortalType()
assert delivery_portal_type # XXX debug
if delivery_portal_type.startswith('Sale Packing List'):
if movement.getSource() == 'organisation_module/hoge':
return ['source/account_module/variation_cars']
elif use == 'trade/purchase':
elif delivery_portal_type.startswith('Purchase Packing List'):
return []
else:
raise NotImplementedError
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment