Commit c4aab67a authored by Klaus Wölfel's avatar Klaus Wölfel Committed by Klaus Wölfel

erp5_real_time_inventory_accounting: customise for buce

parent 5c1a7bf1
......@@ -44,9 +44,10 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(
base_price = simulation_movement.getSourceAssetPrice()
if base_price is None:
return []
quantity = simulation_movement.getCorrectedQuantity() * base_price
accounted_quantity = simulation_movement.getCorrectedQuantity()
quantity = accounted_quantity * base_price
return [simulation_movement.asContext(quantity=quantity)]
return [simulation_movement.asContext(quantity=quantity, accounted_quantity=accounted_quantity)]
def _getUpdatePropertyDict(self, input_movement):
update_property_dict = InvoiceTransactionRuleMovementGenerator._getUpdatePropertyDict(
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Movement Group" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/line</string>
<string>divergence_scope/property</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_line</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>Property Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>accounted_quantity</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -64,6 +64,10 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/manufacturing/inventory_accounting</string>
<string>trade_phase/manufacturing/sourcing/inventory_accounting</string>
<string>trade_phase/manufacturing/transforming/inventory_accounting</string>
<string>trade_phase/production/inventory_accounting</string>
<string>trade_phase/trade/inventory_accounting</string>
</tuple>
</value>
......@@ -74,14 +78,18 @@
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<value> <string>Ideally, it should also match against destination[_section], but they\'re not used in this project.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>default_inventory_accounting_transaction_rule</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Inventory Asset Price Accounting Simulation Rule</string> </value>
......@@ -216,9 +224,7 @@
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
<value> <string>Deleted objects: [\'12\']</string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
......@@ -226,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.23144.40355.17749</string> </value>
<value> <string>986.59777.37275.15974</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -244,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1518074729.58</float>
<float>1601388368.24</float>
<string>UTC</string>
</tuple>
</state>
......@@ -297,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>1516174831.45</float>
<float>1601283568.17</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Float Divergence Tester" 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>quantity_range_min</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_range_max</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>use_delivery_ratio</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</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>decimal_alignment_enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>13</string> </value>
</item>
<item>
<key> <string>matching_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Float Divergence Tester</string> </value>
</item>
<item>
<key> <string>quantity_range_max</string> </key>
<value> <float>0.0</float> </value>
</item>
<item>
<key> <string>quantity_range_min</string> </key>
<value> <float>0.0</float> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value> <string>accounted_quantity</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>accounted_quantity_tester</string> </value>
</item>
<item>
<key> <string>use_delivery_ratio</string> </key>
<value> <int>1</int> </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>
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