Commit 1a30a4b5 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_trade: all modification inventory

parent bde5a88d
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DeliveryCell_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>inventory_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/InventoryOffsetLine_viewInventory</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>object/hasCellContent</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>price_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>3.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Price</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/InventoryLine_viewPrice</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>object/hasCellContent</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/InventoryLine_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>offset</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Offset</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Inventory_viewOffset</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
</portal_type> </portal_type>
<portal_type id="Inventory"> <portal_type id="Inventory">
<item>Inventory Line</item> <item>Inventory Line</item>
<item>Inventory Offset Line</item>
</portal_type> </portal_type>
<portal_type id="Inventory Line"> <portal_type id="Inventory Line">
<item>Inventory Cell</item> <item>Inventory Cell</item>
...@@ -81,6 +82,9 @@ ...@@ -81,6 +82,9 @@
<portal_type id="Inventory Module"> <portal_type id="Inventory Module">
<item>Inventory</item> <item>Inventory</item>
</portal_type> </portal_type>
<portal_type id="Inventory Offset Line">
<item>Inventory Offset Cell</item>
</portal_type>
<portal_type id="Inventory Report"> <portal_type id="Inventory Report">
<item>Inventory Report Line</item> <item>Inventory Report Line</item>
</portal_type> </portal_type>
......
...@@ -8,9 +8,15 @@ ...@@ -8,9 +8,15 @@
<portal_type id="Internal Packing List Line"> <portal_type id="Internal Packing List Line">
<item>Internal Packing List Cell</item> <item>Internal Packing List Cell</item>
</portal_type> </portal_type>
<portal_type id="Inventory">
<item>Inventory Offset Line</item>
</portal_type>
<portal_type id="Inventory Line"> <portal_type id="Inventory Line">
<item>Inventory Cell</item> <item>Inventory Cell</item>
</portal_type> </portal_type>
<portal_type id="Inventory Offset Line">
<item>Inventory Offset Cell</item>
</portal_type>
<portal_type id="Preference"> <portal_type id="Preference">
<item>Purchase Order</item> <item>Purchase Order</item>
<item>Sale Order</item> <item>Sale Order</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>order_line_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Delivery Cell</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Une ligne tarifaire.</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addDeliveryCell</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>delivery_movement</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory Offset Cell</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string>DeliveryCell_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>DeliveryCell</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>organisation_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Delivery Line</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addDeliveryLine</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>delivery_movement</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory Offset Line</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>DeliveryLine</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</item> </item>
<item> <item>
<key> <string>type_class</string> </key> <key> <string>type_class</string> </key>
<value> <string>Inventory</string> </value> <value> <string>NoIndexStockInventory</string> </value>
</item> </item>
<item> <item>
<key> <string>type_interface</string> </key> <key> <string>type_interface</string> </key>
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</chain> </chain>
<chain> <chain>
<type>Inventory</type> <type>Inventory</type>
<workflow>edit_workflow, inventory_workflow</workflow> <workflow>edit_workflow, inventory_interaction_workflow, inventory_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Inventory Cell</type> <type>Inventory Cell</type>
...@@ -75,6 +75,14 @@ ...@@ -75,6 +75,14 @@
<type>Inventory Line</type> <type>Inventory Line</type>
<workflow>edit_workflow, pricing_interaction_workflow, trade_matrix_workflow</workflow> <workflow>edit_workflow, pricing_interaction_workflow, trade_matrix_workflow</workflow>
</chain> </chain>
<chain>
<type>Inventory Offset Cell</type>
<workflow>pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Inventory Offset Line</type>
<workflow>edit_workflow, pricing_interaction_workflow, trade_matrix_workflow</workflow>
</chain>
<chain> <chain>
<type>Inventory Report</type> <type>Inventory Report</type>
<workflow>edit_workflow, inventory_report_workflow</workflow> <workflow>edit_workflow, inventory_report_workflow</workflow>
......
if not inventory_line:
return
portal = context.getPortalObject()
inventory_line = portal.restrictedTraverse(inventory_line)
inventory = context.getParentValue()
getCurrentInventory = portal.portal_simulation.getCurrentInventory
section_uid = inventory.getDestinationSectionUid()
node_uid = inventory.getDestinationUid()
to_date = inventory.getStartDate()
inventory_cell_list = inventory_line.contentValues(portal_type='Inventory Cell')
if len(inventory_cell_list):
context.setVariationCategoryList(inventory_line.getVariationCategoryList())
context.setQuantityUnitValue(inventory_line.getQuantityUnitValue())
base_id = 'movement'
for inventory_cell in inventory_cell_list:
cell_key = inventory_cell.getVariationCategoryList()
sub_variation_text = inventory_cell.getSubVariationText()
quantity = getCurrentInventory(
section_uid = section_uid,
node_uid = node_uid,
to_date = to_date,
resource = context.getResource(),
variation_text = inventory_cell.getVariationText(),
sub_variation_text = sub_variation_text
)
cell = context.newCell(base_id=base_id,
portal_type='Inventory Offset Cell',
*cell_key
)
cell.edit(mapped_value_property_list=['quantity', 'price'],
quantity=inventory_cell.getQuantity() - quantity,
price = inventory_cell.getPrice(),
predicate_category_list=cell_key,
variation_category_list=cell_key,)
cell.setAggregateValueList(inventory_cell.getAggregateValueList())
else:
quantity = getCurrentInventory(
section_uid = section_uid,
node_uid = node_uid,
to_date = to_date,
resource = context.getResource())
context.edit(
aggregate_value_list = inventory_line.getAggregateValueList(),
quantity = inventory_line.getQuantity() - quantity,
price = inventory_line.getPrice())
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>inventory_line = \'\'</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryOffsetLine_updateOffsetQuantity</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>matrixbox</string>
<string>mapped_value_property_list</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_title</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>matrixbox_predicate_category_list</string>
<string>matrixbox_variation_category_list</string>
<string>matrixbox_quantity</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryOffsetLine_viewInventory</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>InventoryOffsetLine_viewInventory</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>mapped_value_property_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<list>
<string>quantity</string>
<string>price</string>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_inventory_price_mapped_value_property_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>cell_base_id</string>
<string>cell_portal_type</string>
<string>columns</string>
<string>editable_attributes</string>
<string>global_attributes</string>
<string>lines</string>
<string>tabs</string>
<string>update_cell_range</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matrixbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>tabs</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>cell_base_id</string> </key>
<value> <string>movement</string> </value>
</item>
<item>
<key> <string>cell_portal_type</string> </key>
<value> <string>Inventory Offset Cell</string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>editable_attributes</string> </key>
<value>
<list>
<tuple>
<string>quantity</string>
<string>quantity</string>
</tuple>
<tuple>
<string>price</string>
<string>price</string>
</tuple>
<tuple>
<string>variation_category_list</string>
<string>variation_category_list</string>
</tuple>
<tuple>
<string>predicate_category_list</string>
<string>predicate_category_list</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_matrix_box</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>global_attributes</string> </key>
<value>
<list>
<tuple>
<string>mapped_value_property_list</string>
<string>mapped_value_property_list</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>lines</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>tabs</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>update_cell_range</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.DeliveryLine_asCellRange(matrixbox=1)[1]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.DeliveryLine_asCellRange(matrixbox=1)[0]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.DeliveryLine_asCellRange(matrixbox=1)[2]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matrixbox_predicate_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_matrixbox_predicate_category_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matrixbox_quantity</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_matrixbox_inventory</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getQuantity()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matrixbox_variation_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_matrixbox_variation_category_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_read_only_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
document = context
excluded_list = []
aggregate_dict = {}
inventory_offset_line_list = document.contentValues(portal_type='Inventory Offset Line')
if inventory_offset_line_list:
document.manage_delObjects(ids=[x.getId() for x in inventory_offset_line_list])
for inventory_line in document.contentValues(portal_type = 'Inventory Line'):
inventory_offset_line = document.newContent(
portal_type='Inventory Offset Line',
resource = inventory_line.getResource()
)
excluded_list.append(tuple([inventory_line.getResource(), inventory_line.getVariationText()]))
inventory_offset_line.activate(tag=tag).InventoryOffsetLine_updateOffsetQuantity(inventory_line = inventory_line.getRelativeUrl())
  • Hi @xiaowu.zhang . I think you should use activity="SQLQueue" here, otherwise the multiple InventoryOffsetLine_updateOffsetQuantity that you will spawn will be "de-duplicated" and will cause inconsistent results.

  • Ho, I see now it is on lines and not on the Inventory document. So it /should/ be Ok

Please register or sign in to reply
inventory_cell_list = inventory_line.contentValues(portal_type='Inventory Cell')
if len(inventory_cell_list):
for cell in inventory_cell_list:
key = tuple([inventory_line.getResourceUid(),cell.getVariationText()])
if aggregate_dict.get(key, None) is None:
aggregate_dict[key] = []
aggregate_dict[key].append(cell.getSubVariationText())
else:
aggregate_dict[tuple([inventory_line.getResourceUid(), ''])] = ['']
document.activate(tag=tag).Inventory_createOffsetLineForNotPresentAggregateInventory(aggregate_dict = aggregate_dict)
if document.isFullInventory():
document.activate(tag=tag).Inventory_createOffsetLineForUselessInventory(excluded_list = excluded_list)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>tag=\'calculate_inventory_offset\'</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory_calculateInventoryOffset</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
getCurrentInventoryList = portal.portal_simulation.getCurrentInventoryList
section_uid = context.getDestinationSectionUid()
node_uid = context.getDestinationUid()
to_date = context.getStartDate()
resource = []
for key in aggregate_dict:
resource.append(key[0])
current_inventory_list = getCurrentInventoryList(
section_uid = section_uid,
node_uid = node_uid,
resource_uid = resource,
to_date = to_date,
group_by_sub_variation = 1,
group_by_variation = 1,
group_by_resource = 1)
new_list = []
for inventory in current_inventory_list:
key = tuple([inventory.resource_uid, inventory.variation_text])
aggregate_value = aggregate_dict.get(key, None)
if aggregate_value:
if inventory.sub_variation_text not in aggregate_value:
new_list.append(inventory)
for inventory in new_list:
inventory_offset_line = context.newContent(portal_type='Inventory Offset Line')
inventory_offset_line.edit(
resource_uid = inventory.resource_uid)
if inventory.variation_text:
inventory_offset_line.setVariationCategoryList(inventory.variation_text.split('\n'))
cell_key = [inventory.variation_text]
cell = inventory_offset_line.newCell(base_id='movement',
portal_type='Inventory Offset Cell',
*cell_key
)
cell.edit(mapped_value_property_list=['quantity'],
quantity = - inventory.quantity,
predicate_category_list=cell_key,
variation_category_list=cell_key,)
cell.setAggregateValueList(inventory.sub_variation_text.split('\n'))
else:
inventory_offset_line.setAggregateValueList(inventory.sub_variation_text.split('\n'))
inventory_offset_line.setQuantity(- inventory.quantity)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>aggregate_dict = {}</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory_createOffsetLineForNotPresentAggregateInventory</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
getCurrentInventoryList = portal.portal_simulation.getCurrentInventoryList
newContent = context.newContent
section_uid = context.getDestinationSectionUid()
node_uid = context.getDestinationUid()
to_date = context.getStartDate()
for inventory in getCurrentInventoryList(
section_uid = section_uid,
node_uid = node_uid,
group_by_resource = 1,
group_by_variation = 1,
group_by_sub_variation = 1,
resourceType=portal.getPortalProductTypeList(),
to_date = to_date,
):
if inventory.total_quantity:
if tuple([inventory.getResource(), inventory.variation_text]) in excluded_list:
continue
inventory_offset_line = newContent(portal_type='Inventory Offset Line')
inventory_offset_line.edit(resource = inventory.getResource())
if not inventory.variation_text:
inventory_offset_line.edit(
quantity = -inventory.total_quantity
)
else:
inventory_offset_line.setVariationCategoryList(inventory.variation_text)
base_id = 'movement'
for cell_key in inventory_offset_line.getVariationCategoryList():
cell_key = [cell_key]
cell = inventory_offset_line.newCell(base_id=base_id,
portal_type='Inventory Offset Cell',
*cell_key)
cell.edit(mapped_value_property_list=['quantity'],
quantity= -inventory.total_quantity,
predicate_category_list=cell_key,
variation_category_list=cell_key,)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>excluded_list = []</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory_createOffsetLineForUselessInventory</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -10,14 +10,15 @@ ...@@ -10,14 +10,15 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>all_columns</string>
<string>columns</string>
<string>default_params</string>
<string>editable_columns</string> <string>editable_columns</string>
<string>sort</string> <string>list_method</string>
<string>title</string>
<string>report_root_list</string> <string>report_root_list</string>
<string>all_columns</string>
<string>selection_name</string> <string>selection_name</string>
<string>list_method</string> <string>sort</string>
<string>columns</string> <string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -140,6 +141,21 @@ ...@@ -140,6 +141,21 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>default_params</string> </key>
<value>
<list>
<tuple>
<string>checked_permission</string>
<string>View</string>
</tuple>
<tuple>
<string>portal_type</string>
<string>Inventory Line</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
...@@ -245,7 +261,7 @@ ...@@ -245,7 +261,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>getMovementList</string> </value> <value> <string>searchFolder</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_int_index</string>
<string>listbox_quantity</string>
<string>listbox_quantity_unit</string>
<string>listbox_reference</string>
<string>listbox_aggregate_title_list</string>
<string>listbox_price</string>
<string>listbox_stop_date</string>
<string>listbox_total_price</string>
<string>listbox_variation_category_item_list</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory_viewOffset</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>PurchasePackingList_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_aggregate_title_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_aggregate_title_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_int_index</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_quantity</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_quantity_unit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_quantity_unit</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_reference</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_reference</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_stop_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_stop_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_total_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_total_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_variation_category_item_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_report_mode_listbox_variation_category_item_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -206,6 +206,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -206,6 +206,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
# Now, quantity is not defined any more automatically. # Now, quantity is not defined any more automatically.
inventory_line.edit(quantity=sum([x.getQuantity() for x in \ inventory_line.edit(quantity=sum([x.getQuantity() for x in \
aggregate_value_list])) aggregate_value_list]))
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list = inventory_list) sequence.edit(inventory_list = inventory_list)
...@@ -240,6 +242,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -240,6 +242,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
inventory_line.edit(resource_value = sequence.get('resource'), inventory_line.edit(resource_value = sequence.get('resource'),
inventory = 24. inventory = 24.
) )
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
...@@ -255,6 +259,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -255,6 +259,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
portal_type = self.inventory_line_portal_type, portal_type = self.inventory_line_portal_type,
resource_value = sequence.get("second_resource"), resource_value = sequence.get("second_resource"),
inventory = 101) inventory = 101)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
...@@ -270,6 +276,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -270,6 +276,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
portal_type = self.inventory_line_portal_type, portal_type = self.inventory_line_portal_type,
resource_value = sequence.get("second_resource"), resource_value = sequence.get("second_resource"),
inventory = 101) inventory = 101)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
...@@ -323,6 +331,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -323,6 +331,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
) )
# When checking the not full inventory function, quantity must remain the same if # When checking the not full inventory function, quantity must remain the same if
# no inventory line defined for a variation # no inventory line defined for a variation
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
...@@ -347,6 +357,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -347,6 +357,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
portal_type = self.inventory_line_portal_type, portal_type = self.inventory_line_portal_type,
resource_value = sequence.get("second_resource"), resource_value = sequence.get("second_resource"),
inventory = 101) inventory = 101)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
def stepCreatePackingListForModule(self, sequence=None, def stepCreatePackingListForModule(self, sequence=None,
...@@ -1887,12 +1899,13 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -1887,12 +1899,13 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
Modify the first entered Inventory, to test the quantity change Modify the first entered Inventory, to test the quantity change
""" """
inventory = sequence.get('inventory_list')[0] inventory = sequence.get('inventory_list')[0]
inventory_line = inventory['1'] inventory_line = inventory.contentValues(portal_type='Inventory Line')[0]
item_list = sequence.get('item_list') item_list = sequence.get('item_list')
aggregate_value_list = [item_list[0],item_list[1], item_list[4]] aggregate_value_list = [item_list[0],item_list[1], item_list[4]]
inventory_line.edit( inventory_line.edit(
aggregate_value_list=aggregate_value_list, aggregate_value_list=aggregate_value_list,
quantity=sum([x.getQuantity() for x in aggregate_value_list])) quantity=sum([x.getQuantity() for x in aggregate_value_list]))
self.inventory.Inventory_calculateInventoryOffset()
def stepCreateNotVariatedSecondResource(self,sequence=None, def stepCreateNotVariatedSecondResource(self,sequence=None,
...@@ -2072,6 +2085,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -2072,6 +2085,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
portal_type = self.inventory_line_portal_type, portal_type = self.inventory_line_portal_type,
resource_value = resource_value, resource_value = resource_value,
inventory = 100) inventory = 100)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
...@@ -2276,6 +2291,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -2276,6 +2291,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
portal_type=self.inventory_line_portal_type, portal_type=self.inventory_line_portal_type,
resource_value=resource_value, resource_value=resource_value,
inventory=inventory_quantity) inventory=inventory_quantity)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
...@@ -2395,6 +2412,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -2395,6 +2412,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
portal_type = self.inventory_line_portal_type, portal_type = self.inventory_line_portal_type,
resource_value = sequence.get("second_resource"), resource_value = sequence.get("second_resource"),
inventory = 100) inventory = 100)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
...@@ -2428,6 +2447,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -2428,6 +2447,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
portal_type = self.inventory_line_portal_type, portal_type = self.inventory_line_portal_type,
resource_value = sequence.get("second_resource"), resource_value = sequence.get("second_resource"),
inventory = inventory2) inventory = inventory2)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
...@@ -2735,7 +2756,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -2735,7 +2756,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
node_uid=organisation.getUid(), node_uid=organisation.getUid(),
resource_uid=product.getUid()), resource_uid=product.getUid()),
0) 0)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
self.tic() self.tic()
...@@ -3275,6 +3297,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -3275,6 +3297,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
full_inventory_1.newContent(portal_type='Inventory Line', full_inventory_1.newContent(portal_type='Inventory Line',
resource_value=resource_value, resource_value=resource_value,
quantity=123) quantity=123)
full_inventory_1.validate()
self.tic()
full_inventory_1.deliver() full_inventory_1.deliver()
self.commit() self.commit()
...@@ -3287,7 +3311,7 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -3287,7 +3311,7 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
self.assertEqual(sorted([(brain.resource_uid, brain.inventory) self.assertEqual(sorted([(brain.resource_uid, brain.inventory)
for brain in result]), for brain in result]),
sorted([(movement.getResourceUid(), movement.getQuantity()) sorted([(movement.getResourceUid(), movement.getQuantity())
for movement in full_inventory_1.getMovementList()])) for movement in full_inventory_1.contentValues(portal_type='Inventory Line')]))
# Create second inventory which deletes inventories of many resources. # Create second inventory which deletes inventories of many resources.
date_2 = DateTime('2013/05/03 00:00:00 GMT+9') date_2 = DateTime('2013/05/03 00:00:00 GMT+9')
...@@ -3299,6 +3323,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -3299,6 +3323,8 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
full_inventory_2.newContent(portal_type='Inventory Line', full_inventory_2.newContent(portal_type='Inventory Line',
resource_value=resource_value_list[0], resource_value=resource_value_list[0],
quantity=1) quantity=1)
full_inventory_2.validate()
self.tic()
full_inventory_2.deliver() full_inventory_2.deliver()
self.commit() self.commit()
...@@ -3311,7 +3337,7 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -3311,7 +3337,7 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
self.assertEqual(sorted([(brain.resource_uid, brain.inventory) self.assertEqual(sorted([(brain.resource_uid, brain.inventory)
for brain in result if brain.inventory != 0]), for brain in result if brain.inventory != 0]),
sorted([(movement.getResourceUid(), movement.getQuantity()) sorted([(movement.getResourceUid(), movement.getQuantity())
for movement in full_inventory_2.getMovementList()])) for movement in full_inventory_2.contentValues(portal_type='Inventory Line')]))
@expectedFailure @expectedFailure
def test_16_CorruptedInventoryCacheAndFullInventory( def test_16_CorruptedInventoryCacheAndFullInventory(
......
...@@ -120,12 +120,18 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -120,12 +120,18 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
inventory = self.getInventoryModule().newContent() inventory = self.getInventoryModule().newContent()
inventory.edit(start_date=start_date, inventory.edit(start_date=start_date,
destination_value=organisation) destination_value=organisation)
inventory.deliver()
inventory_list = sequence.get('inventory_list',[]) inventory_list = sequence.get('inventory_list',[])
inventory_list.append(inventory) inventory_list.append(inventory)
sequence.edit(inventory_list=inventory_list) sequence.edit(inventory_list=inventory_list)
return inventory return inventory
def deliverInventory(self, sequence=None, **kw):
inventory = sequence.get('inventory_list')[-1]
inventory.validate()
self.tic()
inventory.deliver()
self.tic()
@UnrestrictedMethod @UnrestrictedMethod
def createNotVariatedInventoryLine(self, quantity=None, def createNotVariatedInventoryLine(self, quantity=None,
sequence=None,**kw): sequence=None,**kw):
...@@ -150,6 +156,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -150,6 +156,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
self.createInventory(start_date=date,sequence=sequence) self.createInventory(start_date=date,sequence=sequence)
self.createNotVariatedInventoryLine(sequence=sequence, self.createNotVariatedInventoryLine(sequence=sequence,
quantity=quantity) quantity=quantity)
self.deliverInventory(sequence=sequence)
def stepCreateSecondNotVariatedInventory(self, sequence=None, def stepCreateSecondNotVariatedInventory(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -161,6 +168,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -161,6 +168,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
self.createInventory(start_date=date,sequence=sequence) self.createInventory(start_date=date,sequence=sequence)
self.second_inventory = self.createNotVariatedInventoryLine(sequence=sequence, self.second_inventory = self.createNotVariatedInventoryLine(sequence=sequence,
quantity=quantity) quantity=quantity)
self.deliverInventory(sequence=sequence)
@UnrestrictedMethod @UnrestrictedMethod
...@@ -169,9 +177,10 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -169,9 +177,10 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
""" """
Modify the quantity to have a tmp line with null quantity Modify the quantity to have a tmp line with null quantity
""" """
quantity=self.default_quantity inventory_line = self.second_inventory.contentValues(portal_type='Inventory Line')[0]
inventory_line = self.second_inventory.objectValues()[0] inventory_line.edit(quantity=self.default_quantity)
inventory_line.edit(inventory=quantity) self.second_inventory.Inventory_calculateInventoryOffset()
def stepCheckFirstNotVariatedInventory(self, start_date=None,quantity=None, def stepCheckFirstNotVariatedInventory(self, start_date=None,quantity=None,
...@@ -279,6 +288,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -279,6 +288,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
quantity = self.default_quantity quantity = self.default_quantity
self.createVariatedInventoryLine(start_date=date, self.createVariatedInventoryLine(start_date=date,
sequence=sequence, quantity=quantity) sequence=sequence, quantity=quantity)
self.deliverInventory(sequence=sequence)
def stepCreateSecondVariatedInventory(self, sequence=None, sequence_list=None, \ def stepCreateSecondVariatedInventory(self, sequence=None, sequence_list=None, \
**kw): **kw):
...@@ -290,6 +300,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -290,6 +300,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
quantity = self.default_quantity - 10 quantity = self.default_quantity - 10
self.createVariatedInventoryLine(start_date=date, self.createVariatedInventoryLine(start_date=date,
sequence=sequence, quantity=quantity) sequence=sequence, quantity=quantity)
self.deliverInventory(sequence=sequence)
@UnrestrictedMethod @UnrestrictedMethod
def createVariatedInventory(self, start_date=None,quantity=None, def createVariatedInventory(self, start_date=None,quantity=None,
...@@ -400,6 +412,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -400,6 +412,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
self.createVariatedInventoryLine(start_date=date, self.createVariatedInventoryLine(start_date=date,
sequence=sequence, quantity=quantity, sequence=sequence, quantity=quantity,
item_list=item_list) item_list=item_list)
self.deliverInventory(sequence=sequence)
def getAggregateRelativeUrlText(self,item_list): def getAggregateRelativeUrlText(self,item_list):
relative_url_list = ['aggregate/%s' % x.getRelativeUrl() for x in item_list] relative_url_list = ['aggregate/%s' % x.getRelativeUrl() for x in item_list]
...@@ -473,6 +486,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -473,6 +486,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
self.createVariatedInventoryLine(start_date=date, self.createVariatedInventoryLine(start_date=date,
sequence=sequence, quantity=quantity, sequence=sequence, quantity=quantity,
item_list=item_list) item_list=item_list)
self.deliverInventory(sequence=sequence)
def stepCheckSecondVariatedAggregatedInventory(self, start_date=None, def stepCheckSecondVariatedAggregatedInventory(self, start_date=None,
quantity=None, sequence=None, **kw): quantity=None, sequence=None, **kw):
...@@ -578,6 +593,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -578,6 +593,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
inventory_line.setQuantityUnitValue(self.portal.portal_categories.quantity_unit.unit.drum) inventory_line.setQuantityUnitValue(self.portal.portal_categories.quantity_unit.unit.drum)
self.createVariatedInventoryLine(start_date=date, self.createVariatedInventoryLine(start_date=date,
sequence=sequence, quantity=quantity) sequence=sequence, quantity=quantity)
self.deliverInventory(sequence = sequence)
def stepCheckFirstVariatedMultipleQuantityUnitResourceInventory(self, sequence=None, sequence_list=None, \ def stepCheckFirstVariatedMultipleQuantityUnitResourceInventory(self, sequence=None, sequence_list=None, \
**kw): **kw):
...@@ -585,7 +601,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -585,7 +601,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
resource_url = sequence.get('resource').getRelativeUrl() resource_url = sequence.get('resource').getRelativeUrl()
date = DateTime(self.view_stock_date) date = DateTime(self.view_stock_date)
inventory = sequence.get('inventory_list')[-1] inventory = sequence.get('inventory_list')[-1]
total_quantity = sum([inventory_movement.getInventoriatedQuantity() for inventory_movement in inventory.getMovementList()]) total_quantity = sum([inventory_movement.getInventoriatedQuantity() for inventory_movement in inventory.getMovementList(portal_type='Inventory Cell')])
self.assertEqual(total_quantity, (99*100 + 100*100 + 99 + 100)) self.assertEqual(total_quantity, (99*100 + 100*100 + 99 + 100))
quantity = self.getSimulationTool().getInventory(node_uid=node_uid, quantity = self.getSimulationTool().getInventory(node_uid=node_uid,
resource=resource_url, resource=resource_url,
...@@ -652,6 +668,9 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -652,6 +668,9 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
inventory.edit(start_date=DateTime(2019, 2, 21), inventory.edit(start_date=DateTime(2019, 2, 21),
destination_value=organisation, destination_value=organisation,
full_inventory=True) full_inventory=True)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
self.tic() self.tic()
...@@ -661,7 +680,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -661,7 +680,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
self.assertEqual('draft', delivery.getSimulationState()) self.assertEqual('draft', delivery.getSimulationState())
delivery.reindexObject() delivery.reindexObject()
self.tic() self.tic()
inventory.reindexObject() self.login()
inventory.Inventory_calculateInventoryOffset()
self.tic() self.tic()
self.assertEqual(0, getInventoryQuantity()) self.assertEqual(0, getInventoryQuantity())
...@@ -682,6 +702,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -682,6 +702,7 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
sequence_list.play(self) sequence_list.play(self)
@UnrestrictedMethod
def stepCheckInventoryDoesNotKeepUselessCorrectionAtLineLevel(self, sequence=None): def stepCheckInventoryDoesNotKeepUselessCorrectionAtLineLevel(self, sequence=None):
organisation = sequence.get('organisation1') organisation = sequence.get('organisation1')
resource_value = sequence.get('resource') resource_value = sequence.get('resource')
...@@ -700,6 +721,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -700,6 +721,8 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
inventory_line = inventory.newContent(portal_type='Inventory Line', inventory_line = inventory.newContent(portal_type='Inventory Line',
resource_value=resource_value, resource_value=resource_value,
quantity=3) quantity=3)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
self.tic() self.tic()
...@@ -709,22 +732,22 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -709,22 +732,22 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
self.assertEqual('draft', delivery.getSimulationState()) self.assertEqual('draft', delivery.getSimulationState())
delivery.reindexObject() delivery.reindexObject()
self.tic() self.tic()
inventory.reindexObject() inventory.Inventory_calculateInventoryOffset()
self.tic() self.tic()
self.assertEqual(3, getInventoryQuantity()) self.assertEqual(3, getInventoryQuantity())
# Even though this scenario might not really, happen, make sure the code does not # Even though this scenario might not really, happen, make sure the code does not
# keep a correction line for a resource which is not set any more # keep a correction line for a resource which is not set any more
inventory_line.setResourceValue(None) inventory_line.setResourceValue(None)
inventory.reindexObject() inventory.Inventory_calculateInventoryOffset()
self.tic() self.tic()
self.assertEqual(0, getInventoryQuantity()) self.assertEqual(0, getInventoryQuantity())
inventory_line.setResourceValue(resource_value) inventory_line.setResourceValue(resource_value)
inventory.reindexObject() inventory.Inventory_calculateInventoryOffset()
self.tic() self.tic()
self.assertEqual(3, getInventoryQuantity()) self.assertEqual(3, getInventoryQuantity())
# last safety check, make sure deletion of line of inventory has really an impact # last safety check, make sure deletion of line of inventory has really an impact
inventory.manage_delObjects(ids=[inventory_line.getId()]) inventory.manage_delObjects(ids=[inventory_line.getId()])
inventory.reindexObject() inventory.Inventory_calculateInventoryOffset()
self.tic() self.tic()
self.assertEqual(0, getInventoryQuantity()) self.assertEqual(0, getInventoryQuantity())
...@@ -745,6 +768,33 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase): ...@@ -745,6 +768,33 @@ class TestInventoryModule(TestOrderMixin, ERP5TypeTestCase):
sequence_list.play(self) sequence_list.play(self)
def test_08_upgradeInventoryProcess(self):
"""
portal = self.getPortal()
inventory = portal.portal_types.Inventory
inventory.setTypeClass('Inventory')
self.commit()
"""
sequence_list = SequenceList()
# Test with a simple inventory without cell
sequence_string = 'stepCreateNotVariatedResource \
stepCreateOrganisation1 \
stepCreateInitialMovements \
stepTic \
stepCreateFirstNotVariatedInventory \
stepTic \
stepCheckFirstNotVariatedInventory \
stepCreateSecondNotVariatedInventory \
stepTic \
stepCheckSecondNotVariatedInventory \
stepModifySecondNotVariatedInventory \
stepTic \
stepCheckSecondNotVariatedInventoryModified'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestInventoryModule)) suite.addTest(unittest.makeSuite(TestInventoryModule))
......
...@@ -505,6 +505,8 @@ class TestOrderBuilder(TestOrderBuilderMixin, ERP5TypeTestCase): ...@@ -505,6 +505,8 @@ class TestOrderBuilder(TestOrderBuilderMixin, ERP5TypeTestCase):
start_date=DateTime('2018/01/12'), start_date=DateTime('2018/01/12'),
destination_value=node_1, destination_value=node_1,
full_inventory=1) full_inventory=1)
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
self.tic() self.tic()
# keep in stock only movements coming from inventory. It is intentional to # keep in stock only movements coming from inventory. It is intentional to
......
...@@ -261,6 +261,8 @@ class TestTradeReports(ERP5ReportTestCase): ...@@ -261,6 +261,8 @@ class TestTradeReports(ERP5ReportTestCase):
inventory=quantity) inventory=quantity)
if simulation_state == 'delivered': if simulation_state == 'delivered':
inventory.validate()
self.tic()
inventory.deliver() inventory.deliver()
# sanity check # sanity check
...@@ -1080,6 +1082,8 @@ class TestTradeReports(ERP5ReportTestCase): ...@@ -1080,6 +1082,8 @@ class TestTradeReports(ERP5ReportTestCase):
inventory=66, inventory=66,
predicate_category_list=cell_key, predicate_category_list=cell_key,
variation_category_list=cell_key) variation_category_list=cell_key)
fifth.validate()
self.tic()
fifth.deliver() fifth.deliver()
# services are ignored # services are ignored
...@@ -1335,6 +1339,8 @@ class TestTradeReports(ERP5ReportTestCase): ...@@ -1335,6 +1339,8 @@ class TestTradeReports(ERP5ReportTestCase):
inventory=66, inventory=66,
predicate_category_list=cell_key, predicate_category_list=cell_key,
variation_category_list=cell_key) variation_category_list=cell_key)
fifth.validate()
self.tic()
fifth.deliver() fifth.deliver()
# services are ignored # services are ignored
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interaction Workflow" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<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>default_reference</string> </key>
<value> <string>inventory_interaction_workflow</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This workflow updates the isPacked state of a packing list when containers are modified</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>inventory_interaction_workflow</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interaction Workflow</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Interaction Workflow</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interaction Workflow Interaction" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>activate_script/portal_workflow/inventory_interaction_workflow/script_DeliveryMovement_calculateInventoryOffset</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interaction_calculate_inventory_offset</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interaction Workflow Interaction</string> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type_group_filter</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>trigger_method_id</string> </key>
<value>
<tuple>
<string>validate</string>
</tuple>
</value>
</item>
<item>
<key> <string>trigger_once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
document = state_change['object']
tag = '%s:OffsetLineUpdateOffsetQuantity' % document.getRelativeUrl()
document.activate(tag=tag).Inventory_calculateInventoryOffset(tag)
document.calculate()
document.activate(after_tag = tag).record()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_DeliveryMovement_calculateInventoryOffset</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/portal_workflow/inventory_workflow/transition_record</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>state_calculating</string> </value>
</item>
<item>
<key> <string>index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow State</string> </value>
</item>
<item>
<key> <string>state_permission_role_list_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>state_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Calculating</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>
<item>
<key> <string>cell</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</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>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Assignee</string>
<string>Manager</string>
<string>Auditor</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Author</string>
<string>Associate</string>
<string>Assignee</string>
<string>Manager</string>
<string>Auditor</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <int>0</int> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <int>1</int> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>View</string> </key>
<value> <int>4</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Anonymous</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>Assignee</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>Assignor</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>Associate</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>Auditor</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>Authenticated</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>Author</string> </key>
<value> <int>6</int> </value>
</item>
<item>
<key> <string>Manager</string> </key>
<value> <int>7</int> </value>
</item>
<item>
<key> <string>Member</string> </key>
<value> <int>8</int> </value>
</item>
<item>
<key> <string>Owner</string> </key>
<value> <int>9</int> </value>
</item>
<item>
<key> <string>Reviewer</string> </key>
<value> <int>10</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>in this state, it can no longer be modified</string> </value> <value> <string>in this state, it can no longer be modified</string> </value>
...@@ -44,7 +50,7 @@ ...@@ -44,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validated</string> </value> <value> <string>Delivered</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -85,11 +91,11 @@ ...@@ -85,11 +91,11 @@
<key> <string>Access contents information</string> </key> <key> <string>Access contents information</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string> <string>Assignee</string>
<string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Auditor</string>
<string>Associate</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -121,10 +127,11 @@ ...@@ -121,10 +127,11 @@
<key> <string>View</string> </key> <key> <string>View</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Auditor</string> <string>Assignee</string>
<string>Manager</string> <string>Manager</string>
<string>Auditor</string>
<string>Associate</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -20,11 +20,17 @@ ...@@ -20,11 +20,17 @@
<string>destination/portal_workflow/inventory_workflow/transition_cancel_action</string> <string>destination/portal_workflow/inventory_workflow/transition_cancel_action</string>
<string>destination/portal_workflow/inventory_workflow/transition_delete</string> <string>destination/portal_workflow/inventory_workflow/transition_delete</string>
<string>destination/portal_workflow/inventory_workflow/transition_delete_action</string> <string>destination/portal_workflow/inventory_workflow/transition_delete_action</string>
<string>destination/portal_workflow/inventory_workflow/transition_deliver</string> <string>destination/portal_workflow/inventory_workflow/transition_validate</string>
<string>destination/portal_workflow/inventory_workflow/transition_deliver_action</string> <string>destination/portal_workflow/inventory_workflow/transition_validate_action</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>default state</string> </value> <value> <string>default state</string> </value>
...@@ -98,12 +104,12 @@ ...@@ -98,12 +104,12 @@
<key> <string>Access contents information</string> </key> <key> <string>Access contents information</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string> <string>Author</string>
<string>Associate</string>
<string>Assignee</string>
<string>Manager</string> <string>Manager</string>
<string>Auditor</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
</value> </value>
...@@ -112,10 +118,8 @@ ...@@ -112,10 +118,8 @@
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string> <string>Assignee</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -125,12 +129,10 @@ ...@@ -125,12 +129,10 @@
<key> <string>Delete objects</string> </key> <key> <string>Delete objects</string> </key>
<value> <value>
<tuple> <tuple>
<string>Owner</string>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Assignor</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -138,10 +140,8 @@ ...@@ -138,10 +140,8 @@
<key> <string>Modify portal content</string> </key> <key> <string>Modify portal content</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string> <string>Assignee</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -151,12 +151,12 @@ ...@@ -151,12 +151,12 @@
<key> <string>View</string> </key> <key> <string>View</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string> <string>Associate</string>
<string>Auditor</string>
<string>Author</string> <string>Author</string>
<string>Assignee</string>
<string>Manager</string> <string>Manager</string>
<string>Auditor</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
</value> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/portal_workflow/inventory_workflow/transition_cancel</string>
<string>destination/portal_workflow/inventory_workflow/transition_cancel_action</string>
<string>destination/portal_workflow/inventory_workflow/transition_deliver</string>
<string>destination/portal_workflow/inventory_workflow/transition_deliver_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>state_recorded</string> </value>
</item>
<item>
<key> <string>index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow State</string> </value>
</item>
<item>
<key> <string>state_permission_role_list_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>state_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Recorded</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>
<item>
<key> <string>cell</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</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>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Assignee</string>
<string>Manager</string>
<string>Auditor</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Author</string>
<string>Associate</string>
<string>Assignee</string>
<string>Manager</string>
<string>Auditor</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <int>0</int> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <int>1</int> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>View</string> </key>
<value> <int>4</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Anonymous</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>Assignee</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>Assignor</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>Associate</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>Auditor</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>Authenticated</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>Author</string> </key>
<value> <int>6</int> </value>
</item>
<item>
<key> <string>Manager</string> </key>
<value> <int>7</int> </value>
</item>
<item>
<key> <string>Member</string> </key>
<value> <int>8</int> </value>
</item>
<item>
<key> <string>Owner</string> </key>
<value> <int>9</int> </value>
</item>
<item>
<key> <string>Reviewer</string> </key>
<value> <int>10</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/portal_workflow/inventory_workflow/transition_calculate</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>state_validated</string> </value>
</item>
<item>
<key> <string>index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow State</string> </value>
</item>
<item>
<key> <string>state_permission_role_list_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>state_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validated</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>
<item>
<key> <string>cell</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</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>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Assignee</string>
<string>Manager</string>
<string>Auditor</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Author</string>
<string>Associate</string>
<string>Assignee</string>
<string>Manager</string>
<string>Auditor</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <int>0</int> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <int>1</int> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>View</string> </key>
<value> <int>4</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Anonymous</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>Assignee</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>Assignor</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>Associate</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>Auditor</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>Authenticated</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>Author</string> </key>
<value> <int>6</int> </value>
</item>
<item>
<key> <string>Manager</string> </key>
<value> <int>7</int> </value>
</item>
<item>
<key> <string>Member</string> </key>
<value> <int>8</int> </value>
</item>
<item>
<key> <string>Owner</string> </key>
<value> <int>9</int> </value>
</item>
<item>
<key> <string>Reviewer</string> </key>
<value> <int>10</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/workflow</string>
<string>destination/portal_workflow/inventory_workflow/state_calculating</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>guard_group</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>guard_permission</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>guard_role</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_calculate</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Calculate Inventory</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -40,15 +40,17 @@ ...@@ -40,15 +40,17 @@
<item> <item>
<key> <string>guard_permission</string> </key> <key> <string>guard_permission</string> </key>
<value> <value>
<tuple> <tuple/>
<string>Modify portal content</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>guard_role</string> </key> <key> <string>guard_role</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<string>Assignor</string> <string>Assignor</string>
<string>Assignee</string> <string>Assignee</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -42,15 +42,17 @@ ...@@ -42,15 +42,17 @@
<item> <item>
<key> <string>guard_permission</string> </key> <key> <string>guard_permission</string> </key>
<value> <value>
<tuple> <tuple/>
<string>Modify portal content</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>guard_role</string> </key> <key> <string>guard_role</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validate Inventory</string> </value> <value> <string>Deliver Inventory</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>action_name</string> </key> <key> <string>action_name</string> </key>
<value> <string>Validate Inventory</string> </value> <value> <string>Deliver Inventory</string> </value>
</item> </item>
<item> <item>
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validate Inventory Action</string> </value> <value> <string>Deliver Inventory Action</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -58,12 +58,17 @@ Inventory Line | view ...@@ -58,12 +58,17 @@ Inventory Line | view
Inventory Module | view Inventory Module | view
Inventory Module | view_stock_export Inventory Module | view_stock_export
Inventory Module | view_stock_report Inventory Module | view_stock_report
Inventory Offset Cell | view
Inventory Offset Line | inventory_view
Inventory Offset Line | price_view
Inventory Offset Line | view
Inventory Report Line | view Inventory Report Line | view
Inventory Report Module | view Inventory Report Module | view
Inventory Report | calculate_product_stock Inventory Report | calculate_product_stock
Inventory Report | view Inventory Report | view
Inventory | fast_input Inventory | fast_input
Inventory | fast_input_update Inventory | fast_input_update
Inventory | offset
Inventory | view Inventory | view
Order Root Simulation Rule | view Order Root Simulation Rule | view
Organisation | jump_to_internal_trade_condition Organisation | jump_to_internal_trade_condition
......
...@@ -39,9 +39,11 @@ Internal Trade Condition | Payment Condition ...@@ -39,9 +39,11 @@ Internal Trade Condition | Payment Condition
Internal Trade Condition | Trade Model Line Internal Trade Condition | Trade Model Line
Inventory Line | Inventory Cell Inventory Line | Inventory Cell
Inventory Module | Inventory Inventory Module | Inventory
Inventory Offset Line | Inventory Offset Cell
Inventory Report Module | Inventory Report Inventory Report Module | Inventory Report
Inventory Report | Inventory Report Line Inventory Report | Inventory Report Line
Inventory | Inventory Line Inventory | Inventory Line
Inventory | Inventory Offset Line
Order Builder | First Causality Movement Group Order Builder | First Causality Movement Group
Order Root Simulation Rule | Category Membership Divergence Tester Order Root Simulation Rule | Category Membership Divergence Tester
Order Root Simulation Rule | DateTime Divergence Tester Order Root Simulation Rule | DateTime Divergence Tester
......
...@@ -2,6 +2,8 @@ Container Line | Container Cell ...@@ -2,6 +2,8 @@ Container Line | Container Cell
Internal Order Line | Internal Order Cell Internal Order Line | Internal Order Cell
Internal Packing List Line | Internal Packing List Cell Internal Packing List Line | Internal Packing List Cell
Inventory Line | Inventory Cell Inventory Line | Inventory Cell
Inventory Offset Line | Inventory Offset Cell
Inventory | Inventory Offset Line
Preference | Purchase Order Preference | Purchase Order
Preference | Sale Order Preference | Sale Order
Purchase Order Line | Purchase Order Cell Purchase Order Line | Purchase Order Cell
......
...@@ -25,6 +25,8 @@ Inventory ...@@ -25,6 +25,8 @@ Inventory
Inventory Cell Inventory Cell
Inventory Line Inventory Line
Inventory Module Inventory Module
Inventory Offset Cell
Inventory Offset Line
Inventory Report Inventory Report
Inventory Report Line Inventory Report Line
Inventory Report Module Inventory Report Module
......
...@@ -55,10 +55,15 @@ Inventory Cell | pricing_interaction_workflow ...@@ -55,10 +55,15 @@ Inventory Cell | pricing_interaction_workflow
Inventory Line | edit_workflow Inventory Line | edit_workflow
Inventory Line | pricing_interaction_workflow Inventory Line | pricing_interaction_workflow
Inventory Line | trade_matrix_workflow Inventory Line | trade_matrix_workflow
Inventory Offset Cell | pricing_interaction_workflow
Inventory Offset Line | edit_workflow
Inventory Offset Line | pricing_interaction_workflow
Inventory Offset Line | trade_matrix_workflow
Inventory Report Line | edit_workflow Inventory Report Line | edit_workflow
Inventory Report | edit_workflow Inventory Report | edit_workflow
Inventory Report | inventory_report_workflow Inventory Report | inventory_report_workflow
Inventory | edit_workflow Inventory | edit_workflow
Inventory | inventory_interaction_workflow
Inventory | inventory_workflow Inventory | inventory_workflow
Order Root Simulation Rule | edit_workflow Order Root Simulation Rule | edit_workflow
Order Root Simulation Rule | rule_validation_workflow Order Root Simulation Rule | rule_validation_workflow
......
container_interaction_workflow container_interaction_workflow
internal_packing_list_workflow internal_packing_list_workflow
inventory_interaction_workflow
inventory_report_workflow inventory_report_workflow
inventory_workflow inventory_workflow
order_workflow order_workflow
......
...@@ -34,4 +34,5 @@ document.erp5.Project ...@@ -34,4 +34,5 @@ document.erp5.Project
document.erp5.RoundingModel document.erp5.RoundingModel
document.erp5.ScriptConstraint document.erp5.ScriptConstraint
document.erp5.SimulationMovement document.erp5.SimulationMovement
document.erp5.TextDocument document.erp5.TextDocument
\ No newline at end of file document.erp5.NoIndexStockInventory
\ No newline at end of file
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