Commit a4264054 authored by Sebastien Robin's avatar Sebastien Robin

remove many immediate_reindex

more checks in workflows
fixed some security settings

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11191 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a350de0a
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: len(here.objectIds()) == 0</string> </value> <value> <string>python: len(here.objectIds()) == 0 or here.objectValues()[0].getResourceValue().getPortalType()==\'Coin\'</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -542,6 +542,9 @@ ...@@ -542,6 +542,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -529,6 +529,9 @@ ...@@ -529,6 +529,9 @@
<permission type='tuple'> <permission type='tuple'>
<name>Manage Groups</name> <name>Manage Groups</name>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -529,6 +529,9 @@ ...@@ -529,6 +529,9 @@
<permission type='tuple'> <permission type='tuple'>
<name>Manage Groups</name> <name>Manage Groups</name>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -528,6 +528,9 @@ ...@@ -528,6 +528,9 @@
<permission type='tuple'> <permission type='tuple'>
<name>Manage Groups</name> <name>Manage Groups</name>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -542,6 +542,9 @@ ...@@ -542,6 +542,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -542,6 +542,9 @@ ...@@ -542,6 +542,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -546,6 +546,9 @@ ...@@ -546,6 +546,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -527,6 +527,9 @@ ...@@ -527,6 +527,9 @@
<permission type='tuple'> <permission type='tuple'>
<name>Manage Groups</name> <name>Manage Groups</name>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -526,6 +526,9 @@ ...@@ -526,6 +526,9 @@
<permission type='tuple'> <permission type='tuple'>
<name>Manage Groups</name> <name>Manage Groups</name>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -542,6 +542,9 @@ ...@@ -542,6 +542,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -527,6 +527,9 @@ ...@@ -527,6 +527,9 @@
<permission type='tuple'> <permission type='tuple'>
<name>Manage Groups</name> <name>Manage Groups</name>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -542,6 +542,9 @@ ...@@ -542,6 +542,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -542,6 +542,9 @@ ...@@ -542,6 +542,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -549,6 +549,9 @@ ...@@ -549,6 +549,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -542,6 +542,9 @@ ...@@ -542,6 +542,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -546,6 +546,9 @@ ...@@ -546,6 +546,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -553,6 +553,9 @@ ...@@ -553,6 +553,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -543,6 +543,9 @@ ...@@ -543,6 +543,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -553,6 +553,9 @@ ...@@ -553,6 +553,9 @@
<name>Manage Groups</name> <name>Manage Groups</name>
<role>Manager</role> <role>Manager</role>
</permission> </permission>
<permission type='list'>
<name>Manage Selenium test cases</name>
</permission>
<permission type='tuple'> <permission type='tuple'>
<name>Manage Transient Object Container</name> <name>Manage Transient Object Container</name>
<role>Manager</role> <role>Manager</role>
......
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>_aliases</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
<value> <value>
......
...@@ -281,9 +281,7 @@ ...@@ -281,9 +281,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -445,6 +445,10 @@ ...@@ -445,6 +445,10 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -486,7 +490,7 @@ ...@@ -486,7 +490,7 @@
</item> </item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string></string> </value> <value> <string>account_incident_incoming_line_list_selection</string> </value>
</item> </item>
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
......
...@@ -445,6 +445,10 @@ ...@@ -445,6 +445,10 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -486,7 +490,7 @@ ...@@ -486,7 +490,7 @@
</item> </item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string></string> </value> <value> <string>account_incident_outgoing_line_list_selection</string> </value>
</item> </item>
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
......
...@@ -281,9 +281,7 @@ ...@@ -281,9 +281,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(),vault_type=(\'site/surface/banque_interne\', \'site/surface/gros_paiement\', \'site/surface/gros_versement\', \'site/surface/operations_diverses\'), leaf_node=1, all=1)</string> </value> <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(),vault_type=(\'site\'), leaf_node=0, all=1)</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -142,6 +142,14 @@ ...@@ -142,6 +142,14 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>alternate_name</string> </key> <key> <string>alternate_name</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -154,13 +162,23 @@ ...@@ -154,13 +162,23 @@
<key> <string>catalog_index</string> </key> <key> <string>catalog_index</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>container_getter_id</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
...@@ -194,18 +212,46 @@ ...@@ -194,18 +212,46 @@
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>jump_method</string> </key> <key> <string>jump_method</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </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>parameter_list</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -218,6 +264,14 @@ ...@@ -218,6 +264,14 @@
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -281,9 +335,7 @@ ...@@ -281,9 +335,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
...@@ -416,4 +468,23 @@ ...@@ -416,4 +468,23 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getSourceDecisionTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -281,9 +281,7 @@ ...@@ -281,9 +281,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -281,9 +281,7 @@ ...@@ -281,9 +281,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
<value> <value>
<list> <list>
<string>listbox_total_price</string> <string>listbox_total_price</string>
<string>listbox_quantity</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -105,7 +106,6 @@ ...@@ -105,7 +106,6 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>listbox_quantity</string>
<string>my_total_price</string> <string>my_total_price</string>
</list> </list>
</value> </value>
......
...@@ -96,16 +96,17 @@ ...@@ -96,16 +96,17 @@
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list/> <list>
<string>listbox_quantity</string>
<string>listbox_total_price</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>listbox_quantity</string>
<string>my_total_price</string> <string>my_total_price</string>
<string>listbox_total_price</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -79,7 +79,6 @@ transaction = context\n ...@@ -79,7 +79,6 @@ transaction = context\n
\n \n
movement = transaction.newContent(portal_type=\'Banking Operation Line\',\n movement = transaction.newContent(portal_type=\'Banking Operation Line\',\n
id=\'movement\',\n id=\'movement\',\n
immediate_reindex=1,\n
source=\'account_module/bank_account\', # Set default source\n source=\'account_module/bank_account\', # Set default source\n
destination=\'account_module/bank_account\', # Set default destination\n destination=\'account_module/bank_account\', # Set default destination\n
)\n )\n
......
...@@ -365,9 +365,7 @@ ...@@ -365,9 +365,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -359,9 +359,7 @@ ...@@ -359,9 +359,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(current_url=here.getDestination(), vault_type=(\'site/caveau/devises\'), leaf_node=1,user_site=1)</string> </value> <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getDestination(), vault_type=(\'site/caveau/auxiliaire/encaisse_des_devises\'), leaf_node=1,user_site=1)</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -78,7 +78,6 @@ transaction.setResource(\'currency_module/\' + context.Baobab_getPortalReference ...@@ -78,7 +78,6 @@ transaction.setResource(\'currency_module/\' + context.Baobab_getPortalReference
\n \n
movement = context.newContent(portal_type=\'Banking Operation Line\',\n movement = context.newContent(portal_type=\'Banking Operation Line\',\n
id=\'movement\',\n id=\'movement\',\n
immediate_reindex=1,\n
source=\'account_module/bank_account\', # Set default source\n source=\'account_module/bank_account\', # Set default source\n
destination=\'account_module/bank_account\', # Set default destination\n destination=\'account_module/bank_account\', # Set default destination\n
)\n )\n
......
...@@ -78,6 +78,7 @@ if listbox is None:\n ...@@ -78,6 +78,7 @@ if listbox is None:\n
reference_date = DateTime()\n reference_date = DateTime()\n
container_list = []\n container_list = []\n
listbox = []\n listbox = []\n
#context.log("tracking list", context.portal_simulation.getCurrentTrackingList(at_date= reference_date, node = node))\n
for o in context.portal_simulation.getCurrentTrackingList(at_date= reference_date, node = node):\n for o in context.portal_simulation.getCurrentTrackingList(at_date= reference_date, node = node):\n
if o.getObject().getParentValue().getPortalType() in container_portal_type_list:\n if o.getObject().getParentValue().getPortalType() in container_portal_type_list:\n
cash_container = o.getObject()\n cash_container = o.getObject()\n
......
...@@ -169,7 +169,9 @@ def split_head(CD_file_line_list):\n ...@@ -169,7 +169,9 @@ def split_head(CD_file_line_list):\n
head_resource_string = CD_file_line_list[11][32:56]\n head_resource_string = CD_file_line_list[11][32:56]\n
head_emission_letter = CD_file_line_list[14][25:26]\n head_emission_letter = CD_file_line_list[14][25:26]\n
context.log(\'head_resource_string\',head_resource_string)\n context.log(\'head_resource_string\',head_resource_string)\n
\n context.log(\'head_start_date_string\',head_start_date_string)\n
context.log(\'head_movement_id\',head_movement_id)\n
\n
# find letter in the emission_letter category\n # find letter in the emission_letter category\n
default_emissionLetter_list = [x[1] for x in context.portal_categories.emission_letter.getCategoryChildTitleItemList()[1:]]\n default_emissionLetter_list = [x[1] for x in context.portal_categories.emission_letter.getCategoryChildTitleItemList()[1:]]\n
head_emission_letter = string.lower(head_emission_letter)\n head_emission_letter = string.lower(head_emission_letter)\n
...@@ -325,10 +327,14 @@ def url_redirection(error_message,delivery_id=None):\n ...@@ -325,10 +327,14 @@ def url_redirection(error_message,delivery_id=None):\n
\n \n
\n \n
request = context.REQUEST\n request = context.REQUEST\n
CD_file_line_list = import_file.readlines()\n if file_data is not None:\n
CD_file_line_list = file_data\n
else:\n
CD_file_line_list = import_file.readlines()\n
\n \n
# analyse the container head and split it into dictionnary\n context.log("new_line_list", CD_file_line_list)\n
\n \n
# analyse the container head and split it into dictionnary\n
split_head_result_dict = split_head(CD_file_line_list[:20])\n split_head_result_dict = split_head(CD_file_line_list[:20])\n
if split_head_result_dict[\'error\']:\n if split_head_result_dict[\'error\']:\n
return url_redirection(split_head_result_dict[\'message\'])\n return url_redirection(split_head_result_dict[\'message\'])\n
...@@ -382,7 +388,7 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del ...@@ -382,7 +388,7 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>import_file, **kw</string> </value> <value> <string>import_file=None, file_data=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
...@@ -410,13 +416,14 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del ...@@ -410,13 +416,14 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>import_file</string> <string>import_file</string>
<string>file_data</string>
<string>kw</string> <string>kw</string>
<string>message_dict</string> <string>message_dict</string>
<string>isSameSet</string> <string>isSameSet</string>
...@@ -443,7 +450,10 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del ...@@ -443,7 +450,10 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<list> <list>
<string>bottom</string> <string>left</string>
<string>hidden</string> <string>hidden</string>
</list> </list>
</value> </value>
...@@ -77,17 +77,17 @@ ...@@ -77,17 +77,17 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>bottom</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list/>
<string>listbox</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>left</string> </key>
<value> <value>
<list/> <list>
<string>my_import_file</string>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -78,7 +78,6 @@ transaction.setResource(\'currency_module/\' + context.Baobab_getPortalReference ...@@ -78,7 +78,6 @@ transaction.setResource(\'currency_module/\' + context.Baobab_getPortalReference
\n \n
movement = context.newContent(portal_type=\'Banking Operation Line\',\n movement = context.newContent(portal_type=\'Banking Operation Line\',\n
id=\'movement\',\n id=\'movement\',\n
immediate_reindex=1,\n
source=\'account_module/bank_account\', # Set default source\n source=\'account_module/bank_account\', # Set default source\n
destination=\'account_module/bank_account\', # Set default destination\n destination=\'account_module/bank_account\', # Set default destination\n
)\n )\n
......
...@@ -293,9 +293,7 @@ ...@@ -293,9 +293,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -287,9 +287,7 @@ ...@@ -287,9 +287,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -287,9 +287,7 @@ ...@@ -287,9 +287,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<value> <string>if context.getEmissionLetter() in context.Baobab_getUserEmissionLetterList():\n <value> <string>if context.getEmissionLetter() in context.Baobab_getUserEmissionLetterList():\n
return \'%s/auxiliaire/encaisse_des_billets_ventiles_et_detruits\' %(\'/\'.join(context.getSource().split(\'/\')[:-2]),)\n return \'%s/auxiliaire/encaisse_des_billets_ventiles_et_detruits\' %(\'/\'.join(context.getSource().split(\'/\')[:-2]),)\n
else:\n else:\n
return \'%s/externes/encaisse_des_externes\' %(\'/\'.join(context.getSource().split(\'/\')[:-2]),)\n return \'%s/auxiliaire/encaisse_des_externes\' %(\'/\'.join(context.getSource().split(\'/\')[:-2]),)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getTotalPrice(deliveryLineType=\'Outgoing Cash Incident Line\')</string> </value> <value> <string>python: cell.getTotalPrice(deliveryLineType=\'Outgoing Usual Cash Incident Line\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getTotalPrice(deliveryLineType=\'Incoming Cash Incident Line\')</string> </value> <value> <string>python: cell.getTotalPrice(deliveryLineType=\'Incoming Usual Cash Incident Line\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
<list> <list>
<string>my_source_reference</string> <string>my_source_reference</string>
<string>my_incident_type</string> <string>my_incident_type</string>
<string>my_source_transport</string>
<string>my_source_total_asset_price</string> <string>my_source_total_asset_price</string>
</list> </list>
</value> </value>
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_description</string> </value> <value> <string>my_description</string> </value>
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_incident_type</string> </value> <value> <string>my_incident_type</string> </value>
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_source_reference</string> </value> <value> <string>my_source_reference</string> </value>
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_source_total_asset_price</string> </value> <value> <string>my_source_total_asset_price</string> </value>
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_start_date</string> </value> <value> <string>my_start_date</string> </value>
...@@ -408,9 +414,9 @@ ...@@ -408,9 +414,9 @@
<key> <string>date</string> </key> <key> <string>date</string> </key>
<value> <value>
<list> <list>
<string>year</string> <string>year</string>
<string>month</string> <string>month</string>
<string>day</string> <string>day</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -418,9 +424,9 @@ ...@@ -418,9 +424,9 @@
<key> <string>time</string> </key> <key> <string>time</string> </key>
<value> <value>
<list> <list>
<string>hour</string> <string>hour</string>
<string>minute</string> <string>minute</string>
<string>ampm</string> <string>ampm</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_translated_simulation_state_title</string> </value> <value> <string>my_translated_simulation_state_title</string> </value>
......
...@@ -445,6 +445,10 @@ ...@@ -445,6 +445,10 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -486,7 +490,7 @@ ...@@ -486,7 +490,7 @@
</item> </item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string></string> </value> <value> <string>usual_cash_incident_incoming_line_list_selection</string> </value>
</item> </item>
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
......
...@@ -445,6 +445,10 @@ ...@@ -445,6 +445,10 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -486,7 +490,7 @@ ...@@ -486,7 +490,7 @@
</item> </item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string></string> </value> <value> <string>usual_cash_incident_outgoing_line_list_selection</string> </value>
</item> </item>
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
......
...@@ -68,14 +68,16 @@ ...@@ -68,14 +68,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># check that we don\'t have both incoming and outgoing line on the document\n <value> <string encoding="cdata"><![CDATA[
# check that we don\'t have both incoming and outgoing line on the document\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
\n \n
txn = state_change[\'object\']\n txn = state_change[\'object\']\n
in_list = txn.objectValues(portal_type=\'Incoming Account Incident Line\')\n in_list = txn.objectValues(portal_type=\'Incoming Account Incident Line\')\n
out_list = txn.objectValues(portal_type=\'Outgoing Account Incident Line\')\n out_list = txn.objectValues(portal_type=\'Outgoing Account Incident Line\')\n
\n vault = "%s/surface/salle_tri/encaisse_des_differences" %(txn.getSource(),)\n
price = txn.getSourceTotalAssetPrice()\n price = txn.getSourceTotalAssetPrice()\n
in_price = txn.getTotalPrice(portal_type=[\'Incoming Account Incident Line\',\'Cash Delivery Cell\'],fast=0)\n in_price = txn.getTotalPrice(portal_type=[\'Incoming Account Incident Line\',\'Cash Delivery Cell\'],fast=0)\n
out_price = txn.getTotalPrice(portal_type=[\'Outgoing Account Incident Line\',\'Cash Delivery Cell\'],fast=0)\n out_price = txn.getTotalPrice(portal_type=[\'Outgoing Account Incident Line\',\'Cash Delivery Cell\'],fast=0)\n
...@@ -86,10 +88,17 @@ if len(in_list) != 0 and len(out_list) != 0:\n ...@@ -86,10 +88,17 @@ if len(in_list) != 0 and len(out_list) != 0:\n
elif len(in_list) == 0 and len(out_list) == 0:\n elif len(in_list) == 0 and len(out_list) == 0:\n
msg = Message(domain = "ui", message="No resource.")\n msg = Message(domain = "ui", message="No resource.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
elif len(out_list) !=0:\n
resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Outgoing Account Incident Line\')\n
if resource <> 0 :\n
msg = Message(domain="ui", message="Insufficient Balance.")\n
raise ValidationFailed, (msg,)\n
elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != price):\n elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != price):\n
msg = Message(domain = "ui", message="Price differs between document and resource.")\n msg = Message(domain = "ui", message="Price differs between document and resource.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -147,11 +156,14 @@ elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != p ...@@ -147,11 +156,14 @@ elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != p
<string>_getattr_</string> <string>_getattr_</string>
<string>in_list</string> <string>in_list</string>
<string>out_list</string> <string>out_list</string>
<string>vault</string>
<string>price</string> <string>price</string>
<string>in_price</string> <string>in_price</string>
<string>out_price</string> <string>out_price</string>
<string>len</string> <string>len</string>
<string>msg</string> <string>msg</string>
<string>transaction</string>
<string>resource</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
<value> <string></string> </value> <value> <string>validateSourceAndDestination</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<value> <value>
<tuple> <tuple>
<string>archive</string> <string>archive</string>
<string>post_dialog_action</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Post</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/CashSortingIncident_viewPostDialog</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>post_dialog_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></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>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assignor</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -104,9 +104,7 @@ if base_price is None or base_price <= 0:\n ...@@ -104,9 +104,7 @@ if base_price is None or base_price <= 0:\n
fix_montant = transaction.getDiscount()\n fix_montant = transaction.getDiscount()\n
pourcentage = transaction.getDiscountRatio()\n pourcentage = transaction.getDiscountRatio()\n
\n \n
if (fix_montant is None or fix_montant < 0) and (pourcentage is None or fix_montant < 0):\n \n
msg = Message(domain="ui", message="You have to specify discount or discount ratio.")\n
raise ValidationFailed, (msg,)\n
\n \n
\n \n
resource_two = transaction.CashDelivery_checkCounterInventory(outgoing_source,portal_type=\'Outgoing Cash To Currency Purchase Line\')\n resource_two = transaction.CashDelivery_checkCounterInventory(outgoing_source,portal_type=\'Outgoing Cash To Currency Purchase Line\')\n
...@@ -128,7 +126,8 @@ elif billetage_sorti != quantity :\n ...@@ -128,7 +126,8 @@ elif billetage_sorti != quantity :\n
msg = Message(domain="ui", message="Return amount is different from output cash")\n msg = Message(domain="ui", message="Return amount is different from output cash")\n
raise ValidationFailed, (msg,) \n raise ValidationFailed, (msg,) \n
elif resource_two!= 0 :\n elif resource_two!= 0 :\n
raise ValidationFailed, \'Insufficient balance\'\n msg = Message(domain="ui", message="Insufficient balance")\n
raise ValidationFailed, (msg,)\n
]]></string> </value> ]]></string> </value>
......
...@@ -118,7 +118,8 @@ elif billetage_entre != quantity :\n ...@@ -118,7 +118,8 @@ elif billetage_entre != quantity :\n
msg = Message(domain="ui", message="Return amount is different from output cash")\n msg = Message(domain="ui", message="Return amount is different from output cash")\n
raise ValidationFailed, (msg,) \n raise ValidationFailed, (msg,) \n
elif resource_one != 0 :\n elif resource_one != 0 :\n
raise ValidationFailed, \'Insufficient balance\'\n msg = Message(domain="ui", message="Insufficient balance")\n
raise ValidationFailed, (msg,)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -72,8 +72,6 @@ ...@@ -72,8 +72,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -100,8 +98,6 @@ ...@@ -100,8 +98,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
......
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -105,7 +104,6 @@ ...@@ -105,7 +104,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
......
...@@ -77,8 +77,6 @@ ...@@ -77,8 +77,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -89,7 +87,6 @@ ...@@ -89,7 +87,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -100,7 +97,6 @@ ...@@ -100,7 +97,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
...@@ -111,8 +107,6 @@ ...@@ -111,8 +107,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
......
...@@ -76,6 +76,16 @@ date = transaction.getStartDate()\n ...@@ -76,6 +76,16 @@ date = transaction.getStartDate()\n
destination= transaction.getDestination(None)\n destination= transaction.getDestination(None)\n
transaction.log(\'destination:\',destination)\n transaction.log(\'destination:\',destination)\n
\n \n
amount = transaction.getSourceTotalAssetPrice()\n
if amount is None:\n
msg = Message(domain="ui", message="Sorry, you have to define a quantity.")\n
raise ValidationFailed, (msg,)\n
\n
destination_payment = transaction.getDestinationPayment()\n
if destination_payment is None:\n
msg = Message(domain="ui", message="Sorry, you have to define an account.")\n
raise ValidationFailed, (msg,)\n
\n
var_state = transaction.getSimulationState()\n var_state = transaction.getSimulationState()\n
if var_state == \'confirmed\': \n if var_state == \'confirmed\': \n
# Get price and total_price.\n # Get price and total_price.\n
...@@ -177,10 +187,11 @@ if len(counter_list) == 0:\n ...@@ -177,10 +187,11 @@ if len(counter_list) == 0:\n
<string>date</string> <string>date</string>
<string>None</string> <string>None</string>
<string>destination</string> <string>destination</string>
<string>var_state</string>
<string>amount</string> <string>amount</string>
<string>total_price</string>
<string>msg</string> <string>msg</string>
<string>destination_payment</string>
<string>var_state</string>
<string>total_price</string>
<string>site</string> <string>site</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
......
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
......
...@@ -68,23 +68,38 @@ ...@@ -68,23 +68,38 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># check that we don\'t have both incoming and outgoing line on the document\n <value> <string encoding="cdata"><![CDATA[
# check that we don\'t have both incoming and outgoing line on the document\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
\n transaction = state_change.object\n
txn = state_change[\'object\']\n txn = state_change[\'object\']\n
in_list = txn.objectValues(portal_type=\'Incoming Usual Cash Incident Line\')\n in_list = txn.objectValues(portal_type=\'Incoming Usual Cash Incident Line\')\n
out_list = txn.objectValues(portal_type=\'Outgoing Usual Cash Incident Line\')\n out_list = txn.objectValues(portal_type=\'Outgoing Usual Cash Incident Line\')\n
\n vault = "%s/surface/caisse_courante/encaisse_des_billets_et_monnaies" %(transaction.getSource(),)\n
date = transaction.getStartDate()\n
var_type =txn.getIncidentType()\n var_type =txn.getIncidentType()\n
var_source_transport =txn.getSourceTransport()\n var_source_transport =txn.getSourceTransport()\n
var_source = transaction.getSource()\n
\n
# check we are in an opened accounting day\n
if not transaction.Baobab_checkCounterDateOpen(site=var_source, date=date):\n
msg = Message(domain = "ui", message="Counter Date is not opened")\n
raise ValidationFailed, (msg,)\n
\n
if (var_type == \'reception\' and var_source_transport is None):\n if (var_type == \'reception\' and var_source_transport is None):\n
msg = Message(domain = "ui", message="Remote Site not null.")\n msg = Message(domain = "ui", message="Remote Site not null.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
if (var_type == \'reception\' and var_source_transport is not None):\n
if var_source.find(var_source_transport)>=0:\n
msg = Message(domain = "ui", message="Cannot choose local site.")\n
raise ValidationFailed, (msg,)\n
\n
price = txn.getSourceTotalAssetPrice()\n price = txn.getSourceTotalAssetPrice()\n
in_price = txn.getTotalPrice(portal_type=[\'Incoming Usual Cash Incident Line\',\'Cash Delivery Cell\'],fast=0)\n in_price = txn.getTotalPrice(deliveryLineType=\'Incoming Usual Cash Incident Line\')\n
out_price = txn.getTotalPrice(portal_type=[\'Outgoing Usual Cash Incident Line\',\'Cash Delivery Cell\'],fast=0)\n out_price = txn.getTotalPrice(deliveryLineType=\'Outgoing Usual Cash Incident Line\')\n
\n \n
if len(in_list) != 0 and len(out_list) != 0:\n if len(in_list) != 0 and len(out_list) != 0:\n
msg = Message(domain = "ui", message="You can\'t have excess and deficit on the document.")\n msg = Message(domain = "ui", message="You can\'t have excess and deficit on the document.")\n
...@@ -92,10 +107,19 @@ if len(in_list) != 0 and len(out_list) != 0:\n ...@@ -92,10 +107,19 @@ if len(in_list) != 0 and len(out_list) != 0:\n
elif len(in_list) == 0 and len(out_list) == 0:\n elif len(in_list) == 0 and len(out_list) == 0:\n
msg = Message(domain = "ui", message="No resource.")\n msg = Message(domain = "ui", message="No resource.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n
elif len(out_list) !=0:\n
resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Outgoing Usual Cash Incident Line\')\n
if resource <> 0 :\n
msg = Message(domain="ui", message="Insufficient Balance.")\n
raise ValidationFailed, (msg,)\n
\n
elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != price):\n elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != price):\n
msg = Message(domain = "ui", message="Price differs between document and resource.")\n msg = Message(domain = "ui", message="Price differs between document and resource.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -148,19 +172,24 @@ elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != p ...@@ -148,19 +172,24 @@ elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != p
<string>ValidationFailed</string> <string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
<string>_getattr_</string>
<string>transaction</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>txn</string> <string>txn</string>
<string>_getattr_</string>
<string>in_list</string> <string>in_list</string>
<string>out_list</string> <string>out_list</string>
<string>vault</string>
<string>date</string>
<string>var_type</string> <string>var_type</string>
<string>var_source_transport</string> <string>var_source_transport</string>
<string>None</string> <string>var_source</string>
<string>msg</string> <string>msg</string>
<string>None</string>
<string>price</string> <string>price</string>
<string>in_price</string> <string>in_price</string>
<string>out_price</string> <string>out_price</string>
<string>len</string> <string>len</string>
<string>resource</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.States</string>
<string>StateDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>cancelled</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
<value> <value>
<tuple> <tuple>
<string>cancel</string>
<string>cancel_action</string>
<string>deliver</string> <string>deliver</string>
<string>deliver_action</string> <string>deliver_action</string>
</tuple> </tuple>
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
<value> <value>
<tuple> <tuple>
<string>cancel</string>
<string>cancel_action</string>
<string>confirm</string> <string>confirm</string>
<string>confirm_action</string> <string>confirm_action</string>
</tuple> </tuple>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</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</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>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assignor : Assignee</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Cancel</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_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</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>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assignor</string>
<string>Assignee</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
54 85
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment