Commit 3bc38a27 authored by Xiaowu Zhang's avatar Xiaowu Zhang

add inventory report module for current inventory state

1. a inventory report module is added which user can add inventory report


2. in inventory report,  user should put information such as Owner, Warehouse... then call calculate product stock action


3. one line per product is then added automatically with current total quantity and total asset price


![Screenshot_2018-12-12_at_17.42.24](/uploads/98f8a4af66faadfdfd1d99b4400ff687/Screenshot_2018-12-12_at_17.42.24.png)


/reviewed-on nexedi/erp5!806
parents 96347a03 b985a7b5
<?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}/InventoryReportLine_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_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_list</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>portal_type</string> </key>
<value> <string>Action Information</string> </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}/InventoryReportModule_viewInventoryReportList</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_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action</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>calculate_product_stock</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Add portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Calculate Product Stock</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}/InventoryReport_viewCalculateProductStockDialog</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>python: here.getSimulationState() == \'draft\'</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}/InventoryReport_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<module>
<id>inventory_report_module</id>
<permission_list>
<permission type='tuple'>
<name>Access Transient Objects</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access session data</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal content</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal folders</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Change local roles</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Copy or Move</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Delete objects</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>List folder contents</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Modify portal content</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View History</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
</permission_list>
<portal_type>Inventory Report Module</portal_type>
<title>Inventory Reports</title>
</module>
\ No newline at end of file
...@@ -81,6 +81,12 @@ ...@@ -81,6 +81,12 @@
<portal_type id="Inventory Module"> <portal_type id="Inventory Module">
<item>Inventory</item> <item>Inventory</item>
</portal_type> </portal_type>
<portal_type id="Inventory Report">
<item>Inventory Report Line</item>
</portal_type>
<portal_type id="Inventory Report Module">
<item>Inventory Report</item>
</portal_type>
<portal_type id="Order Root Simulation Rule"> <portal_type id="Order Root Simulation Rule">
<item>Category Membership Divergence Tester</item> <item>Category Membership Divergence Tester</item>
<item>DateTime Divergence Tester</item> <item>DateTime Divergence Tester</item>
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
<portal_type id="Inventory Module"> <portal_type id="Inventory Module">
<item>business_application</item> <item>business_application</item>
</portal_type> </portal_type>
<portal_type id="Inventory Report Module">
<item>business_application</item>
</portal_type>
<portal_type id="Purchase Order Module"> <portal_type id="Purchase Order Module">
<item>business_application</item> <item>business_application</item>
</portal_type> </portal_type>
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
<portal_type id="Internal Packing List"> <portal_type id="Internal Packing List">
<item>DeliveryCausalityStateConstraint</item> <item>DeliveryCausalityStateConstraint</item>
</portal_type> </portal_type>
<portal_type id="Inventory Report">
<item>Arrow</item>
<item>InventoryReport</item>
</portal_type>
<portal_type id="Purchase Packing List"> <portal_type id="Purchase Packing List">
<item>DeliveryCausalityStateConstraint</item> <item>DeliveryCausalityStateConstraint</item>
</portal_type> </portal_type>
......
<?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>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>allowed_action_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>inventory_line_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Inventory Line</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>An inventory line can be found in inventory documents, and bears the available stock of a certain product reference. There will be one inventory line for each product reference of the inventory.</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addInventoryLine</string> </value>
</item>
<item>
<key> <string>filter_actions</string> </key>
<value> <int>0</int> </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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory Report 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>searchable_text_property_id</string> </key>
<value>
<tuple>
<string>title</string>
<string>description</string>
<string>short_title</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Item</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>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </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>_property_domain_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>module</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory Report Module</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>portal_type</string> </key>
<value> <string>Base Type</string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Folder</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>
<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>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</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="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </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>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>inventory_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Inventory</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addInventory</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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Inventory Report</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string>Delivery_generateReference</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>Item</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>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -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 Report</type>
<workflow>edit_workflow, inventory_report_workflow</workflow>
</chain>
<chain>
<type>Inventory Report Line</type>
<workflow>edit_workflow</workflow>
</chain>
<chain> <chain>
<type>Order Root Simulation Rule</type> <type>Order Root Simulation Rule</type>
<workflow>edit_workflow, rule_validation_workflow</workflow> <workflow>edit_workflow, rule_validation_workflow</workflow>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" 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>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReport</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</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="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/date</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>at_date_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/float</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>total_asset_price_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: 0</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>valuation_method_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: \'Fifo\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
context.edit(
total_asset_price = context.getPortalObject().portal_simulation.getCurrentInventoryAssetPrice(**kw) or 0
)
<?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>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReportLine_updateTotalAssetPrice</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></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_description</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_resource_title</string>
<string>my_variation_category_list</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_quantity</string>
<string>my_quantity_unit</string>
<string>my_total_quantity</string>
<string>my_total_asset_price</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReportLine_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>InventoryLine_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 Report Line</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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</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_description</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_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_movement_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>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_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>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_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>
<string>editable</string>
<string>enabled</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_resource_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>enabled</string> </key>
<value> <string></string> </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>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_resource_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>
<?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>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_total_asset_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>default</string> </key>
<value> <string></string> </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>
<item>
<key> <string>title</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_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>
<item>
<key> <string>title</string> </key>
<value> <string>Total Asset Price</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_total_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_total_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>
<string>enabled</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_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>enabled</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>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_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>
<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.getVariationCategoryList() != []</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>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_doSelect</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></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_at_date</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>InventoryReportModule_viewInventoryReportList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>InventoryReportModule_viewxxxList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</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 Reports</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>columns</string>
<string>selection_name</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</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>
</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>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Warehouse</string>
</tuple>
<tuple>
<string>destination_section_title</string>
<string>Owner</string>
</tuple>
<tuple>
<string>at_date</string>
<string>Inventory Date</string>
</tuple>
<tuple>
<string>total_asset_price</string>
<string>Total Asset Price</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>Inventory State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>xxx</string>
<string>xxx</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>inventory_report_module_selection</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Reports</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>date_only</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_at_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>date_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_read_only_start_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>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Date</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
for content in context.contentValues(portal_type='Inventory Report Line'):
context.deleteContent(content.getId())
context.setTotalAssetPrice(0)
context.calculate()
context.activate().InventoryReport_recordProductStock()
if not batch_mode:
message = context.Base_translateString("Product Stock is creating")
context.Base_redirect('view',keep_items={'portal_status_message': message})
<?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>batch_mode=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReport_calculateProductStock</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()
valuation_method = context.getValuationMethod()
relative_url = context.getRelativeUrl()
at_date = context.getAtDate()
inventory_list = getCurrentInventoryList(
section_uid = section_uid,
node_uid = node_uid,
group_by_resource = 1,
group_by_variation = 1,
resourceType=portal.getPortalProductTypeList(),
at_date = at_date
)
line_tag = '%s:lineUpdateTotalAssetPrice' % relative_url
#only after all calculation are finished then change report state
for inventory in inventory_list:
inventory_report_line = newContent(portal_type='Inventory Report Line')
inventory_report_line.edit(
resource = inventory.getResource(),
variation_category_list = inventory.variation_text,
total_quantity = inventory.total_quantity,
total_asset_price=0
)
inventory_report_line.activate(
tag = line_tag
).InventoryReportLine_updateTotalAssetPrice(
section_uid = section_uid,
node_uid = node_uid,
valuation_method = valuation_method,
variation_text = inventory.variation_text,
resource_uid = inventory.resource_uid,
at_date = at_date,
is_accountable = 1
)
tag = '%s:updateTotalAssetPrice' % relative_url
context.activate(after_tag=line_tag, tag=tag).InventoryReport_updateTotalAssetPrice()
context.activate(after_tag=tag).record()
<?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></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReport_recordProductStock</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
total_asset_price = 0
for inventory_report_line in context.contentValues(portal_type='Inventory Report Line'):
total_asset_price += inventory_report_line.total_asset_price
context.edit(
total_asset_price = total_asset_price)
<?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></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReport_updateTotalAssetPrice</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></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>
<string>my_description</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_quantity</string>
<string>listbox_quantity_unit</string>
<string>listbox_variation_category_item_list</string>
<string>listbox_total_asset_price</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_destination_title</string>
<string>my_destination_section_title</string>
<string>my_valuation_method</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_at_date</string>
<string>my_total_asset_price</string>
<string>your_price_currency</string>
<string>my_translated_simulation_state_title</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReport_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>InventoryReport_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 Report</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>all_columns</string>
<string>columns</string>
<string>count_method</string>
<string>editable_columns</string>
<string>list_method</string>
<string>report_root_list</string>
<string>selection_name</string>
<string>sort</string>
<string>sort_columns</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</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>all_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>resource_title</string>
<string>Product or Service</string>
</tuple>
<tuple>
<string>variation_category_item_list</string>
<string>Variation</string>
</tuple>
<tuple>
<string>total_quantity</string>
<string>Quantity</string>
</tuple>
<tuple>
<string>quantity_unit</string>
<string>Unit</string>
</tuple>
<tuple>
<string>total_asset_price</string>
<string>Total Asset Price</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>report_root_list</string> </key>
<value>
<list>
<tuple>
<string>parent_domain</string>
<string>Object Tree</string>
</tuple>
<tuple>
<string>resource</string>
<string>Resource</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>inventory_report_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>sort_columns</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>title</string> </key>
<value> <string>Inventory Report Lines</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>searchFolder</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_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>
<string>title</string>
<string>input_style</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_total_asset_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>
</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>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string>-1234.5</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>listbox_total_asset_price</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>
<?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>date_only</string>
<string>default_now</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_at_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>date_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>default_now</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_inventory_start_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>my_description</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_description</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_destination_section_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_inventory_destination_section_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>
<?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_destination_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_inventory_destination_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>
<?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_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>
<?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>editable</string>
<string>input_style</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_total_asset_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>
</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>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string>-1234.5</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Total Asset Price</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_translated_simulation_state_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_translated_simulation_state_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>
<?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>
<string>first_item</string>
<string>items</string>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_valuation_method</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>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</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_list_field</string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Valuation Method</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: [(\'Fifo\',\'Fifo\'), (\'Filo\',\'Filo\'), (\'WeightedAverage\', \'WeightedAverage\'), (\'MonthlyWeightedAverage\',\'MonthlyWeightedAverage\'), (\'MovingAverage\',\'MovingAverage\')]</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>
<string>display_width</string>
<string>editable</string>
<string>enabled</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_price_currency</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>
</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>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</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>
</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>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Currency</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: here.getDestinationSectionValue().getPriceCurrencyTitle()</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.getDestinationSectionValue()</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>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>InventoryReport_calculateProductStock</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></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/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>your_comment</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InventoryReport_viewCalculateProductStockDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>InventoryReport_calculateProductStockDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</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>Calculate</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="TextAreaField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_comment</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>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>You entered too many characters.</string> </value>
</item>
<item>
<key> <string>too_many_lines</string> </key>
<value> <string>You entered too many lines.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>hidden_label</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Comment</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</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.Base_translateString("This will calculate current inventory state without taking into account internal price chain!")</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DCWorkflowDefinition" module="Products.DCWorkflow.DCWorkflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>creation_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>inventory_report_workflow</string> </value>
</item>
<item>
<key> <string>initial_state</string> </key>
<value> <string>draft</string> </value>
</item>
<item>
<key> <string>manager_bypass</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Access contents information</string>
<string>View</string>
<string>Modify portal content</string>
<string>Add portal content</string>
<string>Delete objects</string>
</tuple>
</value>
</item>
<item>
<key> <string>state_var</string> </key>
<value> <string>simulation_state</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Inventory Report Workflow</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Scripts" module="Products.DCWorkflow.Scripts"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>scripts</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="States" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>states</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>calculating</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Calculating</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>record</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</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>Access contents information</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>cancelled</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Cancelled</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</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>Access contents information</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</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>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>default state</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>draft</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Draft</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>calculate</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</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>Access contents information</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>recorded</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Recorded</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>cancel</string>
<string>cancel_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</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>Access contents information</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</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>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transitions" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transitions</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>calculate</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>calculating</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>cancel</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>cancelled</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Cancel Inventory Report</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Cancel Inventory Report</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=cancel_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>cancel</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>cancel_action</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Cancel Inventory Report Acton</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>record</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>recorded</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Variables" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variables</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>action</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getId|nothing</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The name of the user who performed the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>actor</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Comments about the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>comment</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Error message if validation failed</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>error_message</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides access to workflow history</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>history</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_type</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Time of the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>time</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Worklists" module="Products.DCWorkflow.Worklists"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>worklists</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -57,6 +57,10 @@ Inventory Line | view ...@@ -57,6 +57,10 @@ 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 Report Line | view
Inventory Report Module | view
Inventory Report | calculate_product_stock
Inventory Report | view
Inventory | fast_input Inventory | fast_input
Inventory | fast_input_update Inventory | fast_input_update
Inventory | view Inventory | view
......
...@@ -4,6 +4,7 @@ internal_order_module ...@@ -4,6 +4,7 @@ internal_order_module
internal_packing_list_module internal_packing_list_module
internal_trade_condition_module internal_trade_condition_module
inventory_module inventory_module
inventory_report_module
purchase_order_module purchase_order_module
purchase_packing_list_module purchase_packing_list_module
purchase_trade_condition_module purchase_trade_condition_module
......
...@@ -39,6 +39,8 @@ Internal Trade Condition | Payment Condition ...@@ -39,6 +39,8 @@ 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 Report Module | Inventory Report
Inventory Report | Inventory Report Line
Inventory | Inventory Line Inventory | Inventory Line
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
......
...@@ -4,6 +4,7 @@ Internal Order Module | business_application ...@@ -4,6 +4,7 @@ Internal Order Module | business_application
Internal Packing List Module | business_application Internal Packing List Module | business_application
Internal Trade Condition Module | business_application Internal Trade Condition Module | business_application
Inventory Module | business_application Inventory Module | business_application
Inventory Report Module | business_application
Purchase Order Module | business_application Purchase Order Module | business_application
Purchase Packing List Module | business_application Purchase Packing List Module | business_application
Purchase Trade Condition Module | business_application Purchase Trade Condition Module | business_application
......
...@@ -25,6 +25,9 @@ Inventory ...@@ -25,6 +25,9 @@ Inventory
Inventory Cell Inventory Cell
Inventory Line Inventory Line
Inventory Module Inventory Module
Inventory Report
Inventory Report Line
Inventory Report Module
Order Order
Order Root Simulation Rule Order Root Simulation Rule
Payment Condition Payment Condition
......
...@@ -2,6 +2,8 @@ Business Process | Reference ...@@ -2,6 +2,8 @@ Business Process | Reference
Business Process | Version Business Process | Version
Delivery Node | DeliveryNode Delivery Node | DeliveryNode
Internal Packing List | DeliveryCausalityStateConstraint Internal Packing List | DeliveryCausalityStateConstraint
Inventory Report | Arrow
Inventory Report | InventoryReport
Purchase Packing List | DeliveryCausalityStateConstraint Purchase Packing List | DeliveryCausalityStateConstraint
Returned Purchase Packing List | DeliveryCausalityStateConstraint Returned Purchase Packing List | DeliveryCausalityStateConstraint
Returned Sale Packing List | DeliveryCausalityStateConstraint Returned Sale Packing List | DeliveryCausalityStateConstraint
......
...@@ -55,6 +55,9 @@ Inventory Cell | pricing_interaction_workflow ...@@ -55,6 +55,9 @@ 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 Report Line | edit_workflow
Inventory Report | edit_workflow
Inventory Report | inventory_report_workflow
Inventory | edit_workflow Inventory | edit_workflow
Inventory | inventory_workflow Inventory | inventory_workflow
Order Root Simulation Rule | edit_workflow Order Root Simulation Rule | edit_workflow
......
...@@ -2,3 +2,4 @@ InventoryConstraint ...@@ -2,3 +2,4 @@ InventoryConstraint
TradeModelLineCellConsistencyConstraint TradeModelLineCellConsistencyConstraint
TradeModelLineConstraint TradeModelLineConstraint
DeliveryNode DeliveryNode
InventoryReport
\ No newline at end of file
container_interaction_workflow container_interaction_workflow
internal_packing_list_workflow internal_packing_list_workflow
inventory_report_workflow
inventory_workflow inventory_workflow
order_workflow order_workflow
packing_list_container_workflow packing_list_container_workflow
......
...@@ -42,9 +42,23 @@ from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply ...@@ -42,9 +42,23 @@ from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply
from Products.ERP5.mixin.amount_generator import AmountGeneratorMixin from Products.ERP5.mixin.amount_generator import AmountGeneratorMixin
from Products.ERP5.mixin.composition import CompositionMixin from Products.ERP5.mixin.composition import CompositionMixin
from Products.ERP5.Document.Amount import Amount from Products.ERP5.Document.Amount import Amount
from Products.ERP5Type.Cache import transactional_cached
from zLOG import LOG, WARNING from zLOG import LOG, WARNING
@transactional_cached()
def getExchangeRate(currency_value, section_currency, date):
currency = currency_value.getRelativeUrl()
if currency != section_currency:
from Products.ERP5Type.Document import newTempAccountingTransactionLine
return currency_value.getPrice(context=newTempAccountingTransactionLine(
currency_value.getPortalObject(),
"accounting_line",
resource=currency,
start_date=date,
price_currency=section_currency
))
class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin): class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
""" """
The Movement class allows to implement ERP5 universal accounting model. The Movement class allows to implement ERP5 universal accounting model.
...@@ -484,7 +498,10 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin): ...@@ -484,7 +498,10 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
This will be implemeted by calling currency conversion on currency resources This will be implemeted by calling currency conversion on currency resources
""" """
return self.getPrice() # XXX Not implemented yet TODO type_based_script = self._getTypeBasedMethod('getSourceAssetPrice')
if type_based_script:
return type_based_script()
return self._getAssetPrice(section = self.getSourceSectionValue(), date = self.getStartDate())
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'getDestinationAssetPrice') 'getDestinationAssetPrice')
...@@ -492,7 +509,24 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin): ...@@ -492,7 +509,24 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
""" """
Returns the price converted to the currency of the destination section Returns the price converted to the currency of the destination section
""" """
return self.getPrice() # XXX Not implemented yet TODO type_based_script = self._getTypeBasedMethod('getDestinationAssetPrice')
if type_based_script:
return type_based_script()
return self._getAssetPrice(section = self.getDestinationSectionValue(), date = self.getStopDate())
def _getAssetPrice(self,section,date):
price = self.getPrice()
if section is None or not price:
return price
currency_value = self.getPriceCurrencyValue()
if currency_value:
section_currency = section.getPriceCurrency()
if section_currency:
exchange_rate = getExchangeRate(
currency_value, section_currency, date)
if exchange_rate:
return exchange_rate * price
return price
# Causality computation # Causality computation
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
......
...@@ -1873,8 +1873,8 @@ class SimulationTool(BaseTool): ...@@ -1873,8 +1873,8 @@ class SimulationTool(BaseTool):
assert 'node_uid' in kw or 'section_uid' in kw assert 'node_uid' in kw or 'section_uid' in kw
sql_kw = self._generateSQLKeywordDict(**kw) sql_kw = self._generateSQLKeywordDict(**kw)
if 'section_uid' in kw: if 'section_uid' in kw and 'node_uid' not in kw:
# ignore internal movements # ignore internal movements if ignore node
sql_kw['where_expression'] += ' AND ' \ sql_kw['where_expression'] += ' AND ' \
'NOT(stock.section_uid<=>stock.mirror_section_uid)' 'NOT(stock.section_uid<=>stock.mirror_section_uid)'
......
...@@ -76,7 +76,7 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -76,7 +76,7 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
""" """
return ('erp5_base', 'erp5_pdm', 'erp5_simulation', 'erp5_trade', return ('erp5_base', 'erp5_pdm', 'erp5_simulation', 'erp5_trade',
'erp5_configurator_standard_trade_template', 'erp5_configurator_standard_trade_template',
'erp5_apparel', 'erp5_simulation_test') 'erp5_apparel', 'erp5_simulation_test', 'erp5_mrp')
def setUpPreferences(self): def setUpPreferences(self):
#create apparel variation preferences #create apparel variation preferences
...@@ -3492,6 +3492,722 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase): ...@@ -3492,6 +3492,722 @@ class TestInventory(TestOrderMixin, ERP5TypeTestCase):
sequence_list.play(self) sequence_list.play(self)
def stepCreateNotVariatedThirdResource(self,sequence=None,
sequence_list=None,
**kw):
"""
Create a third resource with no variation
"""
portal = self.getPortal()
resource_module = portal.getDefaultModule(self.resource_portal_type)
resource = resource_module.newContent(portal_type=self.resource_portal_type)
resource.edit(
title = "NotVariatedThirdResource%s" % resource.getId(),
industrial_phase_list=["phase1", "phase2"],
product_line = 'apparel'
)
sequence.edit(third_resource = resource )
resource_list = sequence.get('resource_list',default=[])
resource_list.append(resource)
sequence.edit( resource_list = resource_list )
def stepCreatePackingList(self, sequence=None,
sequence_list=None, **kw):
"""
Create a single packing_list for Inventory Module testing
"""
node = kw.get('node', None)
section = kw.get('section', None)
resource = kw.get('resource', None)
quantity = kw.get('quantity', 100)
price = kw.get('price', None)
mirror_node = kw.get('mirror_node', None)
mirror_section = kw.get('mirror_section', None)
if mirror_node is None:
mirror_node = sequence.get('mirror_node')
if mirror_section is None:
mirror_section = sequence.get('mirror_section')
packing_list_portal_type = kw.get('packing_list', self.packing_list_portal_type)
packing_list_module = self.getPortal().getDefaultModule(
portal_type=packing_list_portal_type)
packing_list = packing_list_module.newContent(
portal_type=packing_list_portal_type)
if kw.get('at_date', None) is not None:
start_date = stop_date = kw['at_date']
else:
start_date = stop_date = DateTime() - 2
packing_list.edit(
specialise=self.business_process,
source_section_value = mirror_section,
source_value = mirror_node,
destination_section_value = section,
destination_value = node,
start_date = start_date,
stop_date = stop_date,
price_currency = self.price_currency
)
packing_list_line_portal_type = packing_list_portal_type + ' Line'
packing_list_line = packing_list.newContent(
portal_type = packing_list_line_portal_type)
packing_list_line.edit(resource_value = resource,
quantity = quantity,
price = price
)
sequence.edit(packing_list=packing_list)
def stepCreateSalePackingListToSectionNodeForFirstResource(self, sequence=None,
sequence_list=None,
**kw):
section = sequence.get('section')
node = sequence.get('node')
resource = sequence.get('resource')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = section,
node = node,
resource = resource,
quantity = 100,
packing_list= 'Sale Packing List')
def stepCreateSalePackingListToOtherSectionNodeForFirstResource(self, sequence=None,sequence_list=None,**kw):
section = sequence.get('other_section')
node = sequence.get('node')
resource = sequence.get('resource')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = section,
node = node,
resource = resource,
quantity = 200,
packing_list = 'Sale Packing List')
def stepCreatePurchasePackingListForSectionOtherNodeForSecondResource(self, sequence=None,
sequence_list=None,
**kw):
section = sequence.get('section')
node = sequence.get('other_node')
resource = sequence.get('second_resource')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = section,
node = node,
resource = resource,
quantity = 50,
packing_list = 'Purchase Packing List')
def stepCreatePurchasePackingListForOtherSectionOtherNodeForThirdResource(self, sequence=None,
sequence_list=None,
**kw):
section = sequence.get('other_section')
node = sequence.get('other_node')
resource = sequence.get('third_resource')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = section,
node = node,
resource = resource,
quantity = 30,
packing_list = 'Purchase Packing List')
def stepTestMultipleOwnerNode(self, sequence=None, sequence_list=None, **kw):
first_resource_value = sequence.get('resource')
second_resource_value = sequence.get('second_resource')
third_resource_value = sequence.get('third_resource')
node_value = sequence.get('node')
other_node_value = sequence.get('other_node')
section_value = sequence.get('section')
other_section_value = sequence.get('other_section')
self._testGetInventory(expected=100,
section_uid=section_value.getUid(),
node_uid=node_value.getUid(),
resource_uid=first_resource_value.getUid())
self._testGetInventory(expected=200,
section_uid=other_section_value.getUid(),
node_uid=node_value.getUid(),
resource_uid=first_resource_value.getUid())
self._testGetInventory(expected=50,
section_uid=section_value.getUid(),
node_uid=other_node_value.getUid(),
resource_uid=second_resource_value.getUid())
self._testGetInventory(expected=30,
section_uid=other_section_value.getUid(),
node_uid=other_node_value.getUid(),
resource_uid=third_resource_value.getUid())
def test_19_InventoryMultipleOwner(self, quiet = 0, run=run_all_test):
"""
Test multiple owner with multiple node resource.
The case:
1) movement: section=A,node=C,resource=X,quantity=100
2) movement: section=B,node=C,resource=X, quantity=200
3) movement: section=A,node=D,resource=Y,quantity=50
4) movement: section=B, node=D,reource=Z,quantity=30
[Test]
getInventory(section=A, node=C, resource=X) should return 100
getInventory(section=B, node=C, resource=X) should return 200
getInventory(section=A, node=D, resource=Y) should return 50
getInventory(section=B, node=D, resource=Z) should return 30
"""
if not run: return
sequence_list = SequenceList()
sequence_string = 'CreateOrganisationsForModule \
CreateNotVariatedResource \
CreateNotVariatedSecondResource \
stepCreateNotVariatedThirdResource \
Tic \
CreateSalePackingListToSectionNodeForFirstResource \
Tic \
DeliverPackingList \
Tic \
CreateSalePackingListToOtherSectionNodeForFirstResource \
Tic \
DeliverPackingList \
Tic \
CreatePurchasePackingListForSectionOtherNodeForSecondResource \
Tic \
DeliverPackingList \
Tic \
CreatePurchasePackingListForOtherSectionOtherNodeForThirdResource \
Tic \
DeliverPackingList \
Tic \
TestMultipleOwnerNode \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepInitialAWarehouseX(self, sequence=None, sequence_list=None, **kw):
#sale packing list
at_date = DateTime('2013/02/10 00:00:00 GMT+9')
resource = sequence.get('resource')
A = sequence.get('section')
X = sequence.get('node')
mirror_section = sequence.get('mirror_section')
mirror_node = sequence.get('mirror_node')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = X,
mirror_section = mirror_section,
mirror_node = mirror_node,
resource = resource,
quantity = 100,
at_date = at_date,
packing_list = 'Sale Packing List')
def stepCreateIPLFromAWarehouseXToAWarehouseYWithQuantity3(self, sequence=None, sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/11 00:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = Y,
mirror_section = A,
mirror_node = X,
resource = resource,
quantity = 3,
at_date = at_date,
packing_list = 'Internal Packing List')
def stepCancelIPLFromAWarehouseXToAWarehouseYWithQuantity3(self, sequence=None, sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/11 02:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = X,
mirror_section = A,
mirror_node = Y,
resource = resource,
quantity = 3,
at_date = at_date,
packing_list = 'Internal Packing List')
def stepCreateIPLFromAWarehouseXToAWarehouseYWithQuantity30(self, sequence=None, sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/13 04:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = Y,
mirror_section = A,
mirror_node = X,
resource = resource,
quantity = 30,
at_date = at_date,
packing_list = 'Internal Packing List')
def stepCancelIPLFromAWarehouseXToAWarehouseYWithQuantity30(self, sequence=None, sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/14 05:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = X,
mirror_section = A,
mirror_node = Y,
resource = resource,
quantity = 30,
at_date = at_date,
packing_list = 'Internal Packing List')
def stepCreateSPLFromAWarehouseXToBWarehouseYWithQuantity30(self, sequence=None,
sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
B = sequence.get('other_section')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/14 04:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = B,
node = Y,
mirror_section = A,
mirror_node = X,
resource = resource,
quantity = 30,
at_date = at_date,
packing_list = 'Sale Packing List')
def stepCreatePPLForCWarehouseXFromAWarehouseXWithQuantity10(self, sequence=None,
sequence_list=None, **kw):
resource = sequence.get('resource')
C = sequence.get('one_more_section')
X = sequence.get('node')
A = sequence.get('section')
X = sequence.get('node')
at_date = DateTime('2013/02/11 04:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = C,
node = X,
mirror_section = A,
mirror_node = X,
resource = resource,
quantity = 10,
at_date = at_date,
packing_list = 'Purchase Packing List')
def stepCancelSPLFromAWarehouseXToBWarehouseYWithQuantity30(self, sequence=None,
sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
B = sequence.get('other_section')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/14 06:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = X,
mirror_section = B,
mirror_node = Y,
resource = resource,
quantity = 30,
at_date = at_date,
packing_list = 'Sale Packing List')
def stepCreateProductionPFromAFactoryZToAWarehouseXWithQuantity10(self, sequence=None,
sequence_list=None, **kw):
A = sequence.get('section')
Z = sequence.get('factory')
X = sequence.get('node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/14 08:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = X,
mirror_section = A,
mirror_node = Z,
resource = resource,
quantity = 10,
at_date = at_date,
packing_list = 'Production Packing List')
def stepCreateSPLFromAWarehouseXToBWarehouseYWithQuantity24(self, sequence=None,
sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
B = sequence.get('other_section')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/16 00:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = B,
node = Y,
mirror_section = A,
mirror_node = X,
resource = resource,
quantity = 24,
at_date = at_date,
packing_list = 'Sale Packing List')
def stepCreatePPLForCWarehouseXFromBWarehouseYWithQuantity5(self, sequence=None, sequence_list=None, **kw):
C = sequence.get('one_more_section')
X = sequence.get('node')
B = sequence.get('other_section')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/24 00:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = C,
node = X,
mirror_section = B,
mirror_node = Y,
resource = resource,
quantity = 5,
at_date = at_date,
packing_list = 'Purchase Packing List')
def stepCreateIPLFromAWarehouseXToAWarehouseYWithQuantity33(self, sequence=None, sequence_list=None, **kw):
A = sequence.get('section')
X = sequence.get('node')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/25 01:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = A,
node = Y,
mirror_section = A,
mirror_node = X,
resource = resource,
at_date = at_date,
quantity = 33,
packing_list = 'Internal Packing List')
def stepCancelPPLForCWarehouseXFromBWarehouseYWithQuantity5(self, sequence=None, sequence_list=None, **kw):
C = sequence.get('one_more_section')
X = sequence.get('node')
B = sequence.get('other_section')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/25 02:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = B,
node = Y,
mirror_section = C,
mirror_node = X,
resource = resource,
quantity = 5,
at_date = at_date,
packing_list = 'Purchase Packing List')
def stepCreatePPLForCWarehouseXFromBWarehouseYWithQuantity10(self, sequence=None, sequence_list=None, **kw):
C = sequence.get('one_more_section')
X = sequence.get('node')
B = sequence.get('other_section')
Y = sequence.get('other_node')
resource = sequence.get('resource')
at_date = DateTime('2013/02/26 00:00:00 GMT+9')
self.stepCreatePackingList(sequence=sequence,
sequence_list=sequence_list,
section = C,
node = X,
mirror_section = B,
mirror_node = Y,
resource = resource,
quantity = 10,
at_date = at_date,
packing_list = 'Purchase Packing List')
def stepCreateOneMoreSection(self, sequence=None,
sequence_list=None, **kw):
self.stepCreateOrganisation(sequence=sequence,
sequence_list=sequence_list, **kw)
one_more_section = sequence.get('organisation')
sequence.edit(
one_more_section = one_more_section
)
def stepCreateFactory(self, sequence=None,
sequence_list=None, **kw):
self.stepCreateOrganisation(sequence=sequence,
sequence_list=sequence_list, **kw)
factory = sequence.get('organisation')
sequence.edit(
factory = factory
)
def stepDeliverProductionPackingList(self, sequence=None,
sequence_list=None, **kw):
# Switch to "started" state
packing_list = sequence.get('packing_list')
workflow_tool = self.getPortal().portal_workflow
workflow_tool.doActionFor(packing_list,
"confirm_action", "production_packing_list_workflow")
self.commit()
# Apply tic so that the packing list is not in building state
self.tic() # acceptable here because this is not the job
# of the test to check if can do all transition
# without processing messages
workflow_tool.doActionFor(packing_list,
"set_ready_action", "production_packing_list_workflow")
self.tic()
workflow_tool.doActionFor(packing_list,
"start_action", "production_packing_list_workflow")
workflow_tool.doActionFor(packing_list,
"stop_action", "production_packing_list_workflow")
workflow_tool.doActionFor(packing_list,
"deliver_action", "production_packing_list_workflow")
def stepTestMultiCancelInventory(self, sequence=None,
sequence_list=None, **kw):
resource_value = sequence.get('resource')
A = sequence.get('section')
B = sequence.get('other_section')
C = sequence.get('one_more_section')
X = sequence.get('node')
Y = sequence.get('other_node')
self._testGetInventory(
expected=33,
section_uid=A.getUid(),
node_uid=Y.getUid(),
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=43,
section_uid=A.getUid(),
node_uid=X.getUid(),
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=14,
section_uid=B.getUid(),
node_uid=Y.getUid(),
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=20,
section_uid=C.getUid(),
node_uid=X.getUid(),
resource_uid=resource_value.getUid())
at_date = DateTime('2013/02/15 00:00:00 GMT+9')
self._testGetInventory(
expected=0,
section_uid=A.getUid(),
node_uid=Y.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=100,
section_uid=A.getUid(),
node_uid=X.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=0,
section_uid=B.getUid(),
node_uid=Y.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=10,
section_uid=C.getUid(),
node_uid=X.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
at_date = DateTime('2013/02/25 00:00:00 GMT+9')
self._testGetInventory(
expected=0,
section_uid=A.getUid(),
node_uid=Y.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=76,
section_uid=A.getUid(),
node_uid=X.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=19,
section_uid=B.getUid(),
node_uid=Y.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
self._testGetInventory(
expected=15,
section_uid=C.getUid(),
node_uid=X.getUid(),
at_date = at_date,
resource_uid=resource_value.getUid())
def test_20_InventoryWhenCancelPackingList(self, quite=0, run=run_all_test):
"""
initial 2013/02/10 00:00:00 GMT+9:
A warehouse X, has product: Notvariated 100
2013/02/11 00:00:00 GMT+9
IPL 1: A warehouse X ----> A warehouse Y, quantity: 3
2013/02/11 02:00:00 GMT+9
cancel IPL1
2013/02/13 04:00:00 GMT+9
IPL 2: A warehouse X ----> A warehouse Y, quantity: 30
2013/02/14 04:00:00 GMT+9
SPL 1: A warehouse X ----> B warehouse Y, quantity: 30
2013/02/14 05:00:00 GMT+9
cancel IPL2
2013/02/11 04:00:00 GMT+9
PPL 1: A warehouse X ----> C warehouse X, quantity: 10
2013/02/14 06:00:00 GMT+9
cancel SPL1
2013/02/14 08:00:00 GMT+9
Production PL: A factory Z ---> A warehouse X, quantity: 10
2013/02/16 00:00:00 GMT+9
SPL 2: A warehouse X ----> B warehouse Y, quantity: 24
2013/02/24 00:00:00 GMT+9
PPL 2: B warehouse Y ----> C warehouse X, quantity: 5
2013/02/25 01:00:00 GMT+9
IPL 3: A warehouse X ----> A warehouse Y, quantity: 33
2013/02/25 02:00:00 GMT+9
cancel PPL 2
2013/02/26 00:00:00 GMT+9
PPL 3: B warehouse Y ----> C warehouse X, quantity: 10
"""
if not run: return
sequence_list = SequenceList()
sequence_string = 'CreateOrganisationsForModule \
CreateOneMoreSection \
CreateFactory \
CreateNotVariatedResource \
Tic \
InitialAWarehouseX \
Tic \
DeliverPackingList \
Tic \
CreateIPLFromAWarehouseXToAWarehouseYWithQuantity3 \
Tic \
DeliverPackingList \
Tic \
CancelIPLFromAWarehouseXToAWarehouseYWithQuantity3 \
Tic \
DeliverPackingList \
Tic \
CreateIPLFromAWarehouseXToAWarehouseYWithQuantity30 \
Tic \
DeliverPackingList \
Tic \
CreateSPLFromAWarehouseXToBWarehouseYWithQuantity30 \
Tic \
DeliverPackingList \
Tic \
CancelIPLFromAWarehouseXToAWarehouseYWithQuantity30 \
Tic \
DeliverPackingList \
Tic \
CreatePPLForCWarehouseXFromAWarehouseXWithQuantity10 \
Tic \
DeliverPackingList\
Tic \
CancelSPLFromAWarehouseXToBWarehouseYWithQuantity30 \
Tic \
DeliverPackingList \
Tic \
CreateProductionPFromAFactoryZToAWarehouseXWithQuantity10 \
Tic \
DeliverProductionPackingList \
Tic \
CreateSPLFromAWarehouseXToBWarehouseYWithQuantity24 \
Tic \
DeliverPackingList \
Tic \
CreatePPLForCWarehouseXFromBWarehouseYWithQuantity5 \
Tic \
DeliverPackingList \
Tic \
CreateIPLFromAWarehouseXToAWarehouseYWithQuantity33 \
Tic \
DeliverPackingList \
Tic \
CancelPPLForCWarehouseXFromBWarehouseYWithQuantity5 \
Tic \
DeliverPackingList \
Tic \
CreatePPLForCWarehouseXFromBWarehouseYWithQuantity10 \
Tic \
DeliverPackingList \
Tic \
TestMultiCancelInventory\
'
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(TestInventory)) suite.addTest(unittest.makeSuite(TestInventory))
......
##############################################################################
#
# Copyright (c) 2004, 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Sebastien Robin <seb@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import unittest
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from DateTime import DateTime
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5.tests.testOrder import TestOrderMixin
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
class TestInventoryReportModule(TestOrderMixin, SecurityTestCase):
"""
Test inventory module
"""
run_all_test = 1
size_list = ['Child/32','Child/34']
def getBusinessTemplateList(self):
"""
"""
return super(TestInventoryReportModule, self).getBusinessTemplateList() + ('erp5_accounting', 'erp5_mrp',)
def getTitle(self):
return "Inventory Report Module"
def getInventoryReportModule(self):
return getattr(self.getPortal(), 'inventory_report_module',None)
def stepCreateThreeCurrencys(self, sequence=None,
sequence_list=None, **kw):
self.login()
start_date = DateTime('2018/01/01 00:00')
stop_date = DateTime('3018/01/01 00:00')
portal_type = 'Currency'
currency_module = self.portal.currency_module
rmb = currency_module.newContent(
portal_type=portal_type,
title='Yuan',
reference='RMB')
dollar = currency_module.newContent(
portal_type=portal_type,
title='Dollar',
reference='USD')
euro = currency_module.newContent(
portal_type=portal_type,
title='Euro',
reference = 'EUR')
currency_exchange_line = rmb.newContent(portal_type='Currency Exchange Line')
currency_exchange_line.edit(
price_currency_value = dollar,
base_price = 0.14,
start_date= start_date,
stop_date = stop_date)
currency_exchange_line.validate()
currency_exchange_line = rmb.newContent(portal_type='Currency Exchange Line')
currency_exchange_line.edit(
price_currency_value = euro,
base_price = 0.13,
start_date= start_date,
stop_date = stop_date)
currency_exchange_line.validate()
currency_exchange_line = dollar.newContent(portal_type='Currency Exchange Line')
currency_exchange_line.edit(
price_currency_value = rmb,
base_price = 6.95,
start_date= start_date,
stop_date = stop_date)
currency_exchange_line.validate()
currency_exchange_line =dollar.newContent(portal_type='Currency Exchange Line')
currency_exchange_line.edit(
price_currency_value = euro,
base_price = 0.88,
start_date= start_date,
stop_date = stop_date)
currency_exchange_line.validate()
currency_exchange_line = euro.newContent(portal_type='Currency Exchange Line')
currency_exchange_line.edit(
price_currency_value = dollar,
base_price = 1.14,
start_date= start_date,
stop_date = stop_date)
currency_exchange_line.validate()
currency_exchange_line = euro.newContent(portal_type='Currency Exchange Line')
currency_exchange_line.edit(
price_currency_value = rmb,
base_price = 7.9,
start_date= start_date,
stop_date = stop_date)
currency_exchange_line.validate()
rmb.validate()
euro.validate()
dollar.validate()
sequence.edit(
rmb = rmb,
euro = euro,
dollar = dollar
)
def stepCreateThreeOrganisations(self, sequence=None,
sequence_list=None, **kw):
rmb = sequence.get('rmb')
euro = sequence.get('euro')
dollar =sequence.get('dollar')
self.stepCreateOrganisation(sequence=sequence,
sequence_list=sequence_list, **kw)
organisation_rmb = sequence.get('organisation')
organisation_rmb.edit(
price_currency = rmb.getRelativeUrl(),
title = organisation_rmb.getTitle() + '-rmb')
self.stepCreateOrganisation(sequence=sequence,
sequence_list=sequence_list, **kw)
organisation_dollar = sequence.get('organisation')
organisation_dollar.edit(
price_currency = dollar.getRelativeUrl(),
title = organisation_dollar.getTitle() + '-dollar')
self.stepCreateOrganisation(sequence=sequence,
sequence_list=sequence_list, **kw)
organisation_euro = sequence.get('organisation')
organisation_euro.edit(
price_currency = euro.getRelativeUrl(),
title = organisation_euro.getTitle() + '-euro')
sequence.edit(
organisation_rmb = organisation_rmb,
organisation_dollar = organisation_dollar,
organisation_euro = organisation_euro
)
def stepCreateTwoWarehouse(self, sequence=None,
sequence_list=None, **kw):
self.stepCreateOrganisation(sequence=sequence,
sequence_list=sequence_list, **kw)
warehouseA = sequence.get('organisation')
self.stepCreateOrganisation(sequence=sequence,
sequence_list=sequence_list, **kw)
warehouseB = sequence.get('organisation')
sequence.edit(
warehouseA = warehouseA,
warehouseB = warehouseB
)
def stepCreateSalesPackingListRMBToEURO(self, sequence=None,
sequence_list = None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source = sequence.get('organisation_rmb'),
destination = sequence.get('organisation_euro'),
quantity = 50,
price = 50,
create_line = True,
at_date = DateTime('2018/06/11 00:00:00 GMT+0'),
price_currency = sequence.get('rmb'),
packing_list_type = 'Sale Packing List')
def stepCreateSalesPackingListEUROToUSD(self, sequence=None,
sequence_list = None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source = sequence.get('organisation_euro'),
destination = sequence.get('organisation_dollar'),
quantity = 50,
price = 50,
create_line = True,
at_date = DateTime('2018/06/11 05:00:00 GMT+0'),
price_currency = sequence.get('euro'),
packing_list_type = 'Sale Packing List')
def stepCreatePurchasePackingListFromRMBToEURO(self, sequence=None,
sequence_list=None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source = sequence.get('organisation_rmb'),
destination = sequence.get('organisation_euro'),
quantity = 80,
price = 80,
create_line = True,
at_date = DateTime('2018/06/11 02:00:00 GMT+0'),
price_currency = sequence.get('rmb'),
packing_list_type = 'Purchase Packing List')
def stepCreatePurchasePackingListFromEUROToUSD(self, sequence=None,
sequence_list=None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source = sequence.get('organisation_euro'),
destination = sequence.get('organisation_dollar'),
quantity = 35,
price = 123,
create_line = True,
at_date = DateTime('2018/06/11 03:00:00 GMT+0'),
price_currency = sequence.get('euro'),
packing_list_type = 'Purchase Packing List')
def stepCreateProductionPackingListFromEUROWarehouseAToEuroWarehouseB(self, sequence=None,
sequence_list=None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source_section = sequence.get('organisation_euro'),
source = sequence.get('warehouseA'),
destination_section = sequence.get('organisation_euro'),
destination = sequence.get('warehouseB'),
quantity = 50,
price = 50,
create_line = True,
at_date = DateTime('2018/06/12 00:00:00 GMT+0'),
price_currency = sequence.get('euro'),
packing_list_type = 'Production Packing List')
def stepCreateInternalPackingListFromEUROWarehouseEuroToEuroWarehouseB(self, sequence=None,
sequence_list=None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source_section = sequence.get('organisation_euro'),
source = sequence.get('organisation_euro'),
destination_section = sequence.get('organisation_euro'),
destination = sequence.get('warehouseB'),
quantity = 14,
price = 16,
create_line = True,
at_date = DateTime('2018/06/13 00:00:00 GMT+0'),
price_currency = sequence.get('euro'),
packing_list_type = 'Internal Packing List')
def stepCreateSalesPackingListEUROToRMB(self, sequence=None,
sequence_list = None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source = sequence.get('organisation_euro'),
destination = sequence.get('organisation_rmb'),
create_line = False,
at_date = DateTime('2018/06/11 04:00:00 GMT+0'),
price_currency = sequence.get('euro'),
packing_list_type = 'Sale Packing List')
def stepCreateSalesPackingListRMBToUSD(self, sequence=None,
sequence_list = None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source = sequence.get('organisation_rmb'),
destination = sequence.get('organisation_dollar'),
create_line = False,
at_date = DateTime('2018/06/11 05:00:00 GMT+0'),
price_currency = sequence.get('rmb'),
packing_list_type='Sale Packing List')
def stepCreatePurchasePackingListFromUSDToRMB(self, sequence=None,
sequence_list=None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source = sequence.get('organisation_dollar'),
destination = sequence.get('organisation_rmb'),
create_line = False,
at_date = DateTime('2018/07/11 03:00:00 GMT+0'),
price_currency = sequence.get('dollar'),
packing_list_type='Purchase Packing List')
def stepCreateInternalPackingListFromEUROWarehouseEuroToEuroWarehouseB1(self, sequence=None,
sequence_list=None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source_section = sequence.get('organisation_euro'),
source = sequence.get('organisation_euro'),
destination_section = sequence.get('organisation_euro'),
destination = sequence.get('warehouseB'),
create_line = False,
at_date = DateTime('2018/08/01 04:00:00 GMT+0'),
price_currency = sequence.get('euro'),
packing_list_type = 'Internal Packing List')
def stepCreateProductionPackingListFromEUROWarehouseAToEuroWarehouseB1(self, sequence=None,
sequence_list=None, **kw):
self.stepCreatePackingList(
sequence=sequence,
sequence_list= sequence_list,
source_section = sequence.get('organisation_euro'),
source = sequence.get('warehouseA'),
destination_section = sequence.get('organisation_euro'),
destination = sequence.get('warehouseB'),
create_line = False,
at_date = DateTime('2018/08/02 04:00:00 GMT+0'),
price_currency = sequence.get('euro'),
packing_list_type = 'Production Packing List')
def stepCreatePackingList(self, sequence=None, sequence_list=None, **kw):
resource_list = sequence.get('resource_list')
quantity = kw.get('quantity', 100)
price = kw.get('price', 100)
price_currency = kw.get('price_currency')
create_line = kw.get('create_line', False)
at_date = kw.get('at_date', DateTime())
packing_list_type = kw.get('packing_list_type')
source = kw.get('source')
destination = kw.get('destination')
source_section=kw.get('source_section', source)
destination_section=kw.get('destination_section', destination)
packing_list_module = self.getPortal().getDefaultModule(
portal_type=packing_list_type)
packing_list = packing_list_module.newContent(
portal_type=packing_list_type)
start_date = stop_date = at_date
packing_list.edit(
specialise=self.business_process,
source_section_value = source_section,
source_value = source,
destination_section_value = destination_section,
destination_value = destination,
start_date = start_date,
stop_date = stop_date,
price_currency = price_currency.getRelativeUrl()
)
#create with last resource
if create_line:
packing_list_line = packing_list.newContent(
portal_type=packing_list_type + ' Line')
packing_list_line.edit(resource_value = resource_list[-1],
quantity = quantity,
price = price
)
sequence.edit(packing_list=packing_list)
def stepCreateVariatedSalesPackingListLine(self, sequence=None, sequence_list=None, **kw):
self.stepCreateVariatedPackingListLine(
sequence= sequence,
sequence_list=sequence_list,
packing_list_type='Sale Packing List')
def stepCreateVariatedPurchasePackingListLine(self, sequence=None, sequence_list=None, **kw):
self.stepCreateVariatedPackingListLine(
sequence= sequence,
sequence_list=sequence_list,
packing_list_type='Purchase Packing List',
quantity= 134,
price=32)
def stepCreateVariatedInternalPackingListLine(self, sequence=None, sequence_list=None, **kw):
self.stepCreateVariatedPackingListLine(
sequence= sequence,
sequence_list=sequence_list,
packing_list_type='Internal Packing List')
def stepCreateVariatedProductionPackingListLine(self, sequence=None, sequence_list=None, **kw):
self.stepCreateVariatedPackingListLine(
sequence= sequence,
sequence_list=sequence_list,
packing_list_type='Production Packing List')
def stepCreateVariatedPackingListLine(self, sequence=None, sequence_list=None, **kw):
resource_list = sequence.get('resource_list')
packing_list = sequence.get('packing_list')
#create with last resource
packing_list_type = kw.get('packing_list_type')
packing_list_line = packing_list.newContent(
portal_type=packing_list_type + ' Line')
packing_list_line.edit(resource_value = resource_list[-1])
resource_vcl = list(resource_list[-1].getVariationCategoryList(
omit_individual_variation=1, omit_optional_variation=1))
resource_vcl.sort()
self.assertEqual(len(resource_vcl),2)
packing_list_line.setVariationCategoryList(resource_vcl)
cell_key_list = list(packing_list_line.getCellKeyList(base_id='movement'))
price = kw.get('price', 50)
quantity = kw.get('quantity', 200)
for cell_key in cell_key_list:
cell = packing_list_line.newCell(base_id='movement',
portal_type=packing_list_type +' Cell',
*cell_key)
cell.edit(mapped_value_property_list=['price','quantity'],
price=price, quantity=quantity,
predicate_category_list=cell_key,
variation_category_list=cell_key,)
price += 1
quantity += 1
sequence.edit(packing_list=packing_list)
def stepDeliverPackingList(self, sequence=None,
sequence_list=None, **kw):
pl = sequence.get('packing_list')
pl.confirm()
pl.setReady()
pl.start()
pl.stop()
pl.deliver()
self.tic()
def stepSetResourceUnit(self, sequence=None,
sequence_list=None, **kw):
resource_list = sequence.get('resource_list')
resource = resource_list[-1]
resource.edit(
quantity_unit = ['unit/piece'])
def stepTestCalculateProduct(self, sequence=None, sequence_list=None, **kw):
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_rmb'),
destination_section_value = sequence.get('organisation_rmb'),
valuation_method = 'Fifo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.assertEqual(inventory_report.getSimulationState(), 'calculating')
self.tic()
self.assertEqual(inventory_report.getSimulationState(), 'recorded')
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 5)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -80-50)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, 0)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, 0)
self.assertEqual(inventory_report_line_list[2].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[3].total_quantity, 134)
self.assertAlmostEqual(inventory_report_line_list[3].total_asset_price, 134*32*6.95)
self.assertEqual(inventory_report_line_list[4].total_quantity, 135)
self.assertAlmostEqual(inventory_report_line_list[4].total_asset_price, 135*33*6.95)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_section_value = sequence.get('organisation_euro'),
destination_value = sequence.get('warehouseB'),
valuation_method = 'Fifo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 3)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, 50+14)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 50*50 + 14*16)
self.assertEqual(inventory_report_line_list[1].total_quantity, 200*2)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 200*50*2)
self.assertEqual(inventory_report_line_list[2].total_quantity, 201*2)
self.assertEqual(inventory_report_line_list[2].total_asset_price, 201*51*2)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_euro'),
destination_section_value = sequence.get('organisation_euro'),
valuation_method = 'Fifo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 5)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -201)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, -201)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, -200)
self.assertEqual(inventory_report_line_list[2].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[3].total_quantity, -200)
self.assertEqual(inventory_report_line_list[3].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[4].total_quantity, 45-14)
self.assertAlmostEqual(inventory_report_line_list[4].total_asset_price, (45-14)*80*0.13)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_euro'),
destination_section_value = sequence.get('organisation_euro'),
valuation_method = 'Filo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 5)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -201)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, -201)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, -200)
self.assertEqual(inventory_report_line_list[2].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[3].total_quantity, -200)
self.assertEqual(inventory_report_line_list[3].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[4].total_quantity, 45-14)
self.assertAlmostEqual(inventory_report_line_list[4].total_asset_price, (45-14)*50*0.13)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_euro'),
destination_section_value = sequence.get('organisation_euro'),
valuation_method = 'WeightedAverage'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 5)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -201)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, -201)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, -200)
self.assertEqual(inventory_report_line_list[2].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[3].total_quantity, -200)
self.assertEqual(inventory_report_line_list[3].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[4].total_quantity, 45-14)
#(45-14)*(80*80 + 50*50)/(80 + 50)*0.13
self.assertAlmostEqual(inventory_report_line_list[4].total_asset_price, 275.9)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_euro'),
destination_section_value = sequence.get('organisation_euro'),
valuation_method = 'MonthlyWeightedAverage'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 5)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -201)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, -201)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, -200)
self.assertEqual(inventory_report_line_list[2].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[3].total_quantity, -200)
self.assertEqual(inventory_report_line_list[3].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[4].total_quantity, 45-14)
#(45-14)*(80*80 + 50*50)/(80 + 50)*0.13
self.assertAlmostEqual(inventory_report_line_list[4].total_asset_price, 275.9)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_euro'),
destination_section_value = sequence.get('organisation_euro'),
at_date = DateTime('2018/06/11 04:00:00 GMT+0'),
valuation_method = 'Fifo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 3)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -201)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, -200)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, 80+50-35)
self.assertAlmostEqual(inventory_report_line_list[2].total_asset_price, (50-35)*50*0.13 + 80*80*0.13)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_euro'),
destination_section_value = sequence.get('organisation_euro'),
at_date = DateTime('2018/06/11 04:00:00 GMT+0'),
valuation_method = 'Filo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 3)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -201)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, -200)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, 80+50-35)
self.assertAlmostEqual(inventory_report_line_list[2].total_asset_price, 50*50*0.13 + (80-35)*80*0.13)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_euro'),
destination_section_value = sequence.get('organisation_euro'),
at_date = DateTime('2018/06/11 03:00:00 GMT+0'),
valuation_method = 'Filo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 1)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, 80+50-35)
self.assertAlmostEqual(inventory_report_line_list[0].total_asset_price, 50*50*0.13 + (80-35)*80*0.13)
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
inventory_report.edit(
destination_value = sequence.get('organisation_dollar'),
destination_section_value = sequence.get('organisation_dollar'),
valuation_method = 'Fifo'
)
self.tic()
inventory_report.InventoryReport_calculateProductStock(batch_mode=True)
self.tic()
inventory_report_line_list = inventory_report.contentValues(portal_type='Inventory Report Line')
self.assertEqual(len(inventory_report_line_list), 5)
inventory_report_line_list.sort(key=lambda x: x.total_quantity)
self.assertEqual(inventory_report_line_list[0].total_quantity, -135)
self.assertEqual(inventory_report_line_list[0].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[1].total_quantity, -134)
self.assertEqual(inventory_report_line_list[1].total_asset_price, 0)
self.assertEqual(inventory_report_line_list[2].total_quantity, 35+50)
self.assertAlmostEqual(inventory_report_line_list[2].total_asset_price, 50*50*1.14 + 35*123*1.14)
self.assertEqual(inventory_report_line_list[3].total_quantity, 200)
self.assertAlmostEqual(inventory_report_line_list[3].total_asset_price, 50*200*0.14)
self.assertEqual(inventory_report_line_list[4].total_quantity, 201)
self.assertAlmostEqual(inventory_report_line_list[4].total_asset_price, 51*201*0.14)
def test_01_workflowAndAccessPermission(self, run=run_all_test):
"""
"""
if not run: return
self.createUser('test_creator',
['Auditor', 'Author'])
user_id_list = ['test_creator', 'test_user', 'manager']
for user in user_id_list:
self.failUnlessUserCanAddDocument(user, self.getInventoryReportModule())
self.login(user_id_list[0])
inventory_report = self.getInventoryReportModule().newContent(portal_type='Inventory Report')
self.login()
for user in user_id_list:
self.failUnlessUserCanAddDocument(user, inventory_report)
inventory_report_line = inventory_report.newContent(portal_type='Inventory Report Line')
self.assertEqual(inventory_report.getSimulationState(), 'draft')
self.tic()
for user in user_id_list:
self.login(user)
self.assertEqual(self.portal.portal_workflow.isTransitionPossible(inventory_report, 'calculate'), True)
self.failUnlessUserCanModifyDocument(user, inventory_report)
self.failUnlessUserCanModifyDocument(user, inventory_report_line)
inventory_report.calculate()
self.tic()
self.assertEqual(inventory_report.getSimulationState(), 'calculating')
for user in user_id_list:
self.login(user)
self.assertEqual(self.portal.portal_workflow.isTransitionPossible(inventory_report, 'record'), True)
self.failUnlessUserCanModifyDocument(user, inventory_report)
self.failUnlessUserCanModifyDocument(user, inventory_report_line)
inventory_report.record()
self.tic()
self.assertEqual(inventory_report.getSimulationState(), 'recorded')
for user in user_id_list:
self.login(user)
self.assertEqual(self.portal.portal_workflow.isTransitionPossible(inventory_report, 'calculate'), False)
self.login()
self.failIfUserCanPassWorkflowTransition(user_id_list[0], 'cancel_action', inventory_report)
for user in user_id_list[1:]:
self.failUnlessUserCanPassWorkflowTransition(user, 'cancel_action', inventory_report)
for user in user_id_list[:-1]:
self.failIfUserCanModifyDocument(user, inventory_report)
self.failUnlessUserCanViewDocument(user, inventory_report)
self.failIfUserCanModifyDocument(user, inventory_report_line)
self.failUnlessUserCanViewDocument(user, inventory_report_line)
self.failUnlessUserCanModifyDocument('manager', inventory_report)
self.failUnlessUserCanModifyDocument('manager', inventory_report_line)
inventory_report.cancel()
self.tic()
self.assertEqual(inventory_report.getSimulationState(), 'cancelled')
for user in user_id_list[:-1]:
self.failIfUserCanModifyDocument(user, inventory_report)
self.failUnlessUserCanViewDocument(user, inventory_report)
self.failIfUserCanModifyDocument(user, inventory_report_line)
self.failUnlessUserCanViewDocument(user, inventory_report_line)
self.failUnlessUserCanModifyDocument('manager', inventory_report)
self.failUnlessUserCanModifyDocument('manager', inventory_report_line)
def test_02_checkCalculateProduct(self, run=run_all_test):
"""
2018/06/11 00:00:00 GMT+0
organisation_rmb ---> organisation_euro sale packing list,quantity: 50 price: 50 rmb, product: notvariatedressource
2018/06/11 02:00:00 GMT+0
organisation_rmb ---> organisation_euro purchase packing list, quantity: 80, price: 80 rmb, product: notvariatedresource
2018/06/11 03:00:00 GMT+0
organisation_euro ---> organisation_dollar purchase packing list, quantity: 35, price: 123 euro, product: notvariatedreosurce
2018/06/11 05:00:00 GMT+0
organisation_euro ---> organisation_dollar sale packing list, quantity: 50, price: 50 euro, product: notvariatedresource
2018/06/12 00:00:00 GMT+0
organisation_euro warehouseA ---> organisation_euro warehouseB production packing list, quantity: 50, price: 50 euro, product: notvariatedresource
2018/06/13 00:00:00 GMT+0
organisation_euro organisation_euro ---> organisation_euro warehouseB internal packing list, quantity: 14, price: 16 euro, product: notvariatedresource
2018/06/11 04:00:00 GMT+0
organisation_euro ---> organisation_rmb sale packing list, quantity: 200, price: 50 euro, product: variatedresourceA Child/32
organisation_euro ---> organisation_rmb sale packing list, quantity: 201, price: 51 euro, product: variatedresourceA Child/34
2018/06/11 05:00:00 GMT+0
organisation_rmb ---> organisation_dollar sale packing list, quantity: 200, price: 50 rmb, product: variatedresourceA child/32
organisation_rmb ---> organisation_dollar sale packing list, quantity: 201, price: 51 rmb, product: variatedresourceA Child/34
2018/07/11 03:00:00 GMT+0
organisation_dollar ---> organisation_rmb purchase packing list, quantity: 134, price: 32 dollar, product: variatedresourceB child/32
organisation_dollar ---> organisation_rmb purchase packing list, quantity: 135, price: 33 dollar, product: variatedresourceB child/34
2018/08/01 04:00:00 GMT+0
organisation_euro organisation_euro ---> organisation_euro warehouseB internal packing list, quantity: 200, price: 50 euro, product: variatedresourceA Child/32
organisation_euro organisation_euro ---> organisation_euro warehouseB internal packing list, quantity: 201, price: 51 euro, product: variatedresourceA Child/32
2018/08/02 04:00:00 GMT+0
organisation_euro warehouseA ---> organisation_euro warehouseB production packing list, quantity: 200, price: 50 euro, product: variatedresourceA Child/32
organisation_euro warehouseA ---> organisation_euro warehouseB production packing list, quantity: 201, price: 51 euro, product: variatedresourceA Child/32
"""
if not run: return
sequence_list = SequenceList()
sequence_string = 'CreateNotVariatedResource \
stepCreateThreeCurrencys \
stepSetResourceUnit \
stepCreateThreeOrganisations \
stepCreateTwoWarehouse \
stepTic \
stepCreateSalesPackingListRMBToEURO \
stepDeliverPackingList \
stepTic \
stepCreateSalesPackingListEUROToUSD \
stepDeliverPackingList \
stepTic \
stepCreatePurchasePackingListFromRMBToEURO \
stepDeliverPackingList \
stepTic \
stepCreatePurchasePackingListFromEUROToUSD \
stepDeliverPackingList \
stepTic \
stepCreateProductionPackingListFromEUROWarehouseAToEuroWarehouseB \
stepDeliverPackingList \
stepTic \
stepCreateInternalPackingListFromEUROWarehouseEuroToEuroWarehouseB \
stepDeliverPackingList \
stepTic \
stepCreateVariatedResource \
stepSetResourceUnit \
stepTic \
stepCreateSalesPackingListEUROToRMB \
stepCreateVariatedSalesPackingListLine \
stepDeliverPackingList \
stepTic \
stepCreateSalesPackingListRMBToUSD \
stepCreateVariatedSalesPackingListLine \
stepDeliverPackingList \
stepTic \
stepCreateVariatedResource \
stepSetResourceUnit \
stepTic \
stepCreatePurchasePackingListFromUSDToRMB \
stepCreateVariatedPurchasePackingListLine \
stepDeliverPackingList \
stepTic \
stepCreateInternalPackingListFromEUROWarehouseEuroToEuroWarehouseB1 \
stepCreateVariatedInternalPackingListLine \
stepDeliverPackingList \
stepTic \
stepCreateProductionPackingListFromEUROWarehouseAToEuroWarehouseB1 \
stepCreateVariatedProductionPackingListLine \
stepDeliverPackingList \
stepTic \
stepTestCalculateProduct \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def _test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestInventoryModule))
return suite
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