Commit 0263d3b2 authored by Aurel's avatar Aurel

- check the counter date of the source_section in monetary destruction wokflow

- renamed your_price fields by your_exchange_rate (by Vincent)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15141 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b95a6f4b
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<value> <value>
<list> <list>
<string>my_start_date</string> <string>my_start_date</string>
<string>your_price</string> <string>your_exchange_rate</string>
<string>my_price</string> <string>my_price</string>
<string>my_discount_ratio</string> <string>my_discount_ratio</string>
<string>my_quantity</string> <string>my_quantity</string>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_price</string> </value> <value> <string>your_exchange_rate</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<value> <value>
<list> <list>
<string>my_start_date</string> <string>my_start_date</string>
<string>your_price</string> <string>your_exchange_rate</string>
<string>my_price</string> <string>my_price</string>
<string>my_discount_ratio</string> <string>my_discount_ratio</string>
<string>my_quantity</string> <string>my_quantity</string>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_price</string> </value> <value> <string>your_exchange_rate</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<value> <value>
<list> <list>
<string>my_start_date</string> <string>my_start_date</string>
<string>your_price</string> <string>your_exchange_rate</string>
<string>my_price</string> <string>my_price</string>
<string>my_discount_ratio</string> <string>my_discount_ratio</string>
<string>my_quantity</string> <string>my_quantity</string>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_price</string> </value> <value> <string>your_exchange_rate</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<value> <value>
<list> <list>
<string>my_start_date</string> <string>my_start_date</string>
<string>rate</string> <string>your_exchange_rate</string>
<string>my_price</string> <string>my_price</string>
<string>my_discount_ratio</string> <string>my_discount_ratio</string>
<string>my_quantity</string> <string>my_quantity</string>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>rate</string> </value> <value> <string>your_exchange_rate</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_doSelect</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>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>hidden</string> </key>
<value>
<list>
<string>listbox_excess_price</string>
<string>listbox_deficit_price</string>
<string>listbox_start_date</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>IncidentModule_viewIncidentList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>IncidentModule_viewIncidentList</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>Incidents</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_translated_simulation_state_title</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_source_reference</string>
<string>my_incident_type</string>
<string>my_source</string>
<string>my_resource</string>
<string>my_source_total_asset_price</string>
<string>my_price</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_start_date</string>
<string>my_source_transport</string>
<string>my_destination_payment_reference</string>
<string>my_destination_payment_title</string>
<string>my_posted_price</string>
<string>my_description</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Incident_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Incident_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>Incident</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>_body</string> </key>
<value> <string>request = context.REQUEST\n
currency = context.getResourceId()\n
if currency is None :\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
, \'view\'\n
, \'portal_status_message=Please+select+a+currency.\'\n
)\n
return request.RESPONSE.redirect( redirect_url )\n
\n
cash_detail_dict = {\'line_portal_type\' : \'Incoming Incident Line\'\n
, \'operation_currency\' : currency\n
, \'cash_status_list\' : None\n
, \'emission_letter_list\' : None\n
, \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
, \'currency_cash_portal_type\': None\n
, \'read_only\' : False\n
, \'column_base_category\' : \'variation\'\n
}\n
\n
return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n
, cash_detail_dict = cash_detail_dict\n
, destination = context.getObject().absolute_url()\n
)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>currency</string>
<string>None</string>
<string>redirect_url</string>
<string>False</string>
<string>cash_detail_dict</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Incident_viewIncomingLineFastInputDialog</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>_body</string> </key>
<value> <string>request = context.REQUEST\n
currency = context.getResourceId()\n
if currency is None :\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
, \'view\'\n
, \'portal_status_message=Please+select+a+currency.\'\n
)\n
return request.RESPONSE.redirect( redirect_url )\n
\n
cash_detail_dict = {\'line_portal_type\' : \'Outgoing Incident Line\'\n
, \'operation_currency\' : currency\n
, \'cash_status_list\' : [\'valid\',\'new_emitted\', \'not_defined\']\n
, \'emission_letter_list\' : None\n
, \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
, \'currency_cash_portal_type\': None\n
, \'read_only\' : False\n
, \'column_base_category\' : \'variation\'\n
}\n
\n
return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n
, cash_detail_dict = cash_detail_dict\n
, destination = context.getObject().absolute_url()\n
)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>currency</string>
<string>None</string>
<string>redirect_url</string>
<string>False</string>
<string>cash_detail_dict</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Incident_viewOutgoingLineFastInputDialog</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -72,10 +72,10 @@ from Products.ERP5Type.Message import Message\n ...@@ -72,10 +72,10 @@ from Products.ERP5Type.Message import Message\n
\n \n
transaction = state_change[\'object\']\n transaction = state_change[\'object\']\n
\n \n
vaultDestination = transaction.getDestination()\n source_section = transaction.getSourceSection()\n
\n \n
# check again that we are in the good accounting date in site destination\n # check again that we are in the good accounting date in site destination\n
transaction.Baobab_checkCounterDateOpen(site=vaultDestination, date=transaction.getStopDate())\n transaction.Baobab_checkCounterDateOpen(site=source_section, date=transaction.getStopDate())\n
\n \n
# Check source counter stock & date again.\n # Check source counter stock & date again.\n
context.validateVaultBalance(state_change=state_change)\n context.validateVaultBalance(state_change=state_change)\n
...@@ -138,7 +138,7 @@ context.validateVaultBalance(state_change=state_change)\n ...@@ -138,7 +138,7 @@ context.validateVaultBalance(state_change=state_change)\n
<string>_getitem_</string> <string>_getitem_</string>
<string>transaction</string> <string>transaction</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>vaultDestination</string> <string>source_section</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
...@@ -84,6 +84,12 @@ if (\'encaisse_des_externes\' not in vault and \'encaisse_des_billets_retires_de ...@@ -84,6 +84,12 @@ if (\'encaisse_des_externes\' not in vault and \'encaisse_des_billets_retires_de
msg = Message(domain="ui", message="Invalid source.")\n msg = Message(domain="ui", message="Invalid source.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
if \'encaisse_des_externes\' in vault:\n
destination = transaction.getDestination()\n
if destination is None:\n
msg = Message(domain="ui", message="Invalid destination.")\n
raise ValidationFailed, (msg,)\n
\n
\n \n
\n \n
\n \n
...@@ -157,6 +163,8 @@ elif resource <> 0 :\n ...@@ -157,6 +163,8 @@ elif resource <> 0 :\n
<string>context</string> <string>context</string>
<string>source_object</string> <string>source_object</string>
<string>msg</string> <string>msg</string>
<string>destination</string>
<string>None</string>
<string>amount</string> <string>amount</string>
<string>total_price</string> <string>total_price</string>
</tuple> </tuple>
......
409 411
\ 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