Commit 5312f641 authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_real_time_inventory_accounting: Move RTIA-specific ledger categories to ledger/stock/.

parent 158adf7d
......@@ -71,13 +71,13 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM
update_property_dict=update_property_dict):
# PATCH-BEGIN
update_dict = {}
if movement.getLedger() == 'stock/entree':
if movement.getLedger() == 'stock/stock/entree':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStopDate()
elif movement.getLedger() == 'stock/sortie':
elif movement.getLedger() == 'stock/stock/sortie':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStartDate()
elif movement.getLedger() == 'transit/entree':
elif movement.getLedger() == 'stock/transit/entree':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStartDate()
elif movement.getLedger() == 'transit/sortie':
elif movement.getLedger() == 'stock/transit/sortie':
update_dict['start_date'] = update_dict['stop_date'] = input_movement.getStopDate()
movement._edit(**update_dict)
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/entree</string>
<string>ledger/stock/stock/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/entree</string>
<string>ledger/stock/stock/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/sortie</string>
<string>ledger/stock/stock/sortie</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/sortie</string>
<string>ledger/stock/stock/sortie</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/entree</string>
<string>ledger/stock/stock/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/entree</string>
<string>ledger/stock/stock/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/entree</string>
<string>ledger/stock/transit/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/entree</string>
<string>ledger/stock/transit/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/sortie</string>
<string>ledger/stock/transit/sortie</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/sortie</string>
<string>ledger/stock/transit/sortie</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/sortie</string>
<string>ledger/stock/stock/sortie</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/stock/sortie</string>
<string>ledger/stock/stock/sortie</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/entree</string>
<string>ledger/stock/transit/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/entree</string>
<string>ledger/stock/transit/entree</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/sortie</string>
<string>ledger/stock/transit/sortie</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<value>
<tuple>
<string>trade_phase/trade/inventory_accounting</string>
<string>ledger/transit/sortie</string>
<string>ledger/stock/transit/sortie</string>
</tuple>
</value>
</item>
......
......@@ -71,6 +71,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>stock</string> </value>
......
<?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>_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>categories</string> </key>
<value>
<tuple>
<string>ledger/stock/stock</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>stock</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Stock</string> </value>
</item>
</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>
......@@ -199,14 +199,14 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
category_tool = self.portal.portal_categories
getattr(self.portal.portal_types, 'Accounting Transaction').setLedgerValueList(
[category_tool.ledger.achat,
category_tool.ledger.preparation,
category_tool.ledger.production,
category_tool.ledger.stock.entree,
category_tool.ledger.stock.sortie,
category_tool.ledger.transit.entree,
category_tool.ledger.transit.sortie,
category_tool.ledger.vente])
[category_tool.ledger.stock.achat,
category_tool.ledger.stock.preparation,
category_tool.ledger.stock.production,
category_tool.ledger.stock.stock.entree,
category_tool.ledger.stock.stock.sortie,
category_tool.ledger.stock.transit.entree,
category_tool.ledger.stock.transit.sortie,
category_tool.ledger.stock.vente])
if 'my_group' not in category_tool.group:
category_tool.group.newContent(portal_type='Category',
......@@ -573,7 +573,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
accounting_transaction_list = sequence['current_accounting_transaction_list']
for accounting_transaction in accounting_transaction_list:
self.assertEquals(accounting_transaction.getSimulationState(), 'stopped')
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.sortie:
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.stock.sortie:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
......@@ -592,7 +592,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
# sum(SPLL.price)
quantity=17100)))
elif accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.transit.entree:
elif accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.transit.entree:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
......@@ -611,14 +611,14 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
# sum(SPLL.price)
quantity=17100)))
# ledger/transit/sortie
# ledger/stock/transit/sortie
else:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
source_section_value=self.portal.organisation_module.hoge,
resource_value=self.portal.currency_module.DOL,
ledger_value=self.portal.portal_categories.ledger.transit.sortie,
ledger_value=self.portal.portal_categories.ledger.stock.transit.sortie,
# start_date=stop_date=SPL.stop_date
start_date=DateTime('2018/01/31 00:00:00 GMT+9'),
stop_date=DateTime('2018/01/31 00:00:00 GMT+9')),
......@@ -732,7 +732,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
accounting_transaction_list = sequence['current_accounting_transaction_list']
for accounting_transaction in accounting_transaction_list:
self.assertEquals(accounting_transaction.getSimulationState(), 'stopped')
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.entree:
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.stock.entree:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
......@@ -751,7 +751,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
# sum(PPLL.price)
quantity=14000)))
elif accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.transit.entree:
elif accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.transit.entree:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
......@@ -770,14 +770,14 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
# sum(PPLL.price)
quantity=14000)))
# ledger/transit/sortie
# ledger/stock/transit/sortie
else:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
source_section_value=self.portal.organisation_module.hoge,
resource_value=self.portal.currency_module.DOL,
ledger_value=self.portal.portal_categories.ledger.transit.sortie,
ledger_value=self.portal.portal_categories.ledger.stock.transit.sortie,
# start_date=stop_date=PPL.stop_date
start_date=DateTime('2018/01/10 00:00:00 GMT+9'),
stop_date=DateTime('2018/01/10 00:00:00 GMT+9')),
......@@ -881,7 +881,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
accounting_transaction_list = sequence['current_accounting_transaction_list']
for accounting_transaction in accounting_transaction_list:
self.assertEquals(accounting_transaction.getSimulationState(), 'stopped')
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.entree:
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.stock.entree:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
......@@ -900,14 +900,14 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
# sum(IPLL.price)
quantity=4242)))
# ledger/stock/sortie
# ledger/stock/stock/sortie
else:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
source_section_value=self.portal.organisation_module.hoge,
resource_value=self.portal.currency_module.DOL,
ledger_value=self.portal.portal_categories.ledger.stock.sortie,
ledger_value=self.portal.portal_categories.ledger.stock.stock.sortie,
# start_date=stop_date=IPL.start_date
start_date=DateTime('2018/03/02 00:00:00 GMT+9'),
stop_date=DateTime('2018/03/02 00:00:00 GMT+9')),
......@@ -1011,7 +1011,7 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
accounting_transaction_list = sequence['current_accounting_transaction_list']
for accounting_transaction in accounting_transaction_list:
self.assertEquals(accounting_transaction.getSimulationState(), 'stopped')
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.entree:
if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.stock.entree:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
......@@ -1030,14 +1030,14 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc
# sum(IPLL.price)
quantity=4242)))
# ledger/stock/sortie
# ledger/stock/stock/sortie
else:
self._checkDelivery(
accounting_transaction,
delivery_property_dict=dict(
source_section_value=self.portal.organisation_module.hoge,
resource_value=self.portal.currency_module.DOL,
ledger_value=self.portal.portal_categories.ledger.stock.sortie,
ledger_value=self.portal.portal_categories.ledger.stock.stock.sortie,
# start_date=stop_date=IPL.start_date
start_date=DateTime('2018/03/02 00:00:00 GMT+9'),
stop_date=DateTime('2018/03/02 00:00:00 GMT+9')),
......
......@@ -4,6 +4,7 @@ business_process_module/bpm_purchase_hoge
business_process_module/bpm_purchase_hoge/**
business_process_module/bpm_sale_hoge
business_process_module/bpm_sale_hoge/**
portal_categories/ledger/**
portal_categories/ledger/stock
portal_categories/ledger/stock/**
portal_rules/default_delivery_root_simulation_rule
portal_rules/default_delivery_root_simulation_rule/**
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