Commit eaba8962 authored by Sebastien Robin's avatar Sebastien Robin

add stop date on cash movement (by Vincent)

make sure that the cash status of foreign banknotes is valid

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14564 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2a481363
......@@ -97,6 +97,10 @@
<key> <string>init_script</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
......
......@@ -442,7 +442,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>size</string> </key>
......
......@@ -444,7 +444,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>size</string> </key>
......
......@@ -118,6 +118,7 @@
<value>
<list>
<string>my_start_date</string>
<string>my_stop_date</string>
<string>my_destination</string>
<string>my_description</string>
</list>
......
......@@ -288,6 +288,14 @@
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hidden_day_is_last_day</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_day</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>input_order</string> </key>
<value> <string>ymd</string> </value>
......@@ -312,7 +320,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Date</string> </value>
<value> <string>Start Date</string> </value>
</item>
</dictionary>
</value>
......
......@@ -76,7 +76,7 @@ if currency is None :\n
\n
\n
if currency != context.Baobab_getPortalReferenceCurrencyID():\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
else:\n
......
......@@ -3,7 +3,7 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle>
......@@ -16,102 +16,131 @@
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<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>id</string> </key>
<value> <string>confirmed</string> </value>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<key> <string>_owner</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validated By Vault Surface Manager</string> </value>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>confirm_to_deliver_action</string>
<string>deliver</string>
<string>reject</string>
<string>reject_action</string>
</tuple>
</value>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>type_list</string> </key>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple/>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<key> <string>bottom</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>DestinationAssignee</string>
<string>DestinationAssignor</string>
<string>Manager</string>
</tuple>
<list/>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<key> <string>center</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
<list/>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<key> <string>hidden</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
<list/>
</value>
</item>
<item>
<key> <string>View</string> </key>
<key> <string>left</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>DestinationAssignee</string>
<string>DestinationAssignor</string>
<string>Manager</string>
</tuple>
<list>
<string>my_comment</string>
<string>your_stop_date</string>
<string>my_workflow_action</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>CashMovement_viewStopWorkflowActionDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>CashMovement_viewStopWorkflowActionDialog</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></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -3,7 +3,7 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="FloatField" module="Products.Formulator.StandardFields"/>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_discount</string> </value>
<value> <string>my_workflow_action</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -27,14 +27,14 @@
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>not_float</string> </key>
<value> <string>You did not enter a floating point number.</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>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -86,6 +86,10 @@
<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>required</string> </key>
<value> <string></string> </value>
......@@ -94,6 +98,14 @@
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</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>
......@@ -115,7 +127,9 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -149,6 +163,10 @@
<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>required</string> </key>
<value> <string></string> </value>
......@@ -157,6 +175,14 @@
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</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>
......@@ -174,7 +200,7 @@
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>figure</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
......@@ -210,23 +236,27 @@
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string>-1 234.5</string> </value>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <int>0</int> </value>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>required</string> </key>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Fix Amount</string> </value>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
......@@ -238,4 +268,23 @@
</dictionary>
</pickle>
</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.REQUEST.workflow_action</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -323,7 +323,7 @@
<string>Site</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
</list>
......@@ -356,7 +356,7 @@
<string>Site</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
</list>
......
......@@ -105,7 +105,6 @@
<list>
<string>my_start_date</string>
<string>my_price</string>
<string>my_discount</string>
<string>my_discount_ratio</string>
<string>my_quantity</string>
<string>my_description</string>
......
......@@ -76,7 +76,7 @@ if currency is None :\n
\n
\n
\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
\n
......
......@@ -112,7 +112,6 @@
<list>
<string>my_start_date</string>
<string>my_price</string>
<string>my_discount</string>
<string>my_discount_ratio</string>
<string>my_quantity</string>
<string>my_description</string>
......
......@@ -74,7 +74,7 @@ if currency is None :\n
)\n
return request.RESPONSE.redirect( redirect_url )\n
\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
\n
......
......@@ -76,7 +76,7 @@ if currency is None :\n
return request.RESPONSE.redirect( redirect_url )\n
\n
if currency != context.Baobab_getPortalReferenceCurrencyID():\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
else:\n
......
......@@ -70,9 +70,9 @@ from Products.ERP5Type.Message import Message\n
\n
var_ressource_title = context.getResourceTitle().lower()\n
var_ressource_title = var_ressource_title.replace(" ", "_")\n
encaisse_devise = "/encaisse_des_devises/%s/entrante" %(var_ressource_title)\n
encaisse_devise = "/encaisse_des_devises/%s/sortante" %(var_ressource_title)\n
\n
#encaisse_devise = "/encaisse_des_devises/%s/entrante" %(context.getResourceTitle().lower())\n
#encaisse_devise = "/encaisse_des_devises/%s/sortante" %(context.getResourceTitle().lower())\n
\n
# first get the source of the document,\n
# we will need to add the counter\n
......
......@@ -120,7 +120,6 @@
<list>
<string>my_start_date</string>
<string>my_price</string>
<string>my_discount</string>
<string>my_discount_ratio</string>
<string>my_quantity</string>
<string>my_description</string>
......
......@@ -76,7 +76,7 @@ if currency is None :\n
\n
\n
\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
\n
......
......@@ -120,7 +120,6 @@
<list>
<string>my_start_date</string>
<string>my_price</string>
<string>my_discount</string>
<string>my_discount_ratio</string>
<string>my_quantity</string>
<string>my_description</string>
......
......@@ -76,7 +76,7 @@ if currency is None :\n
\n
\n
\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
\n
......
......@@ -65,7 +65,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>site_list = context.Baobab_getUserAssignedSiteList()\n
<value> <string>site_list = context.Baobab_getUserAssignedRootSiteList()\n
if len(site_list) == 0:\n
from Products.ERP5Type.Message import Message\n
message = Message(domain="ui", message="The owner is not assigned to the right vault.")\n
......
......@@ -75,7 +75,7 @@ if currency is None :\n
return request.RESPONSE.redirect( redirect_url )\n
\n
if currency != context.Baobab_getPortalReferenceCurrencyID():\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
else:\n
......
......@@ -72,7 +72,7 @@ var_ressource_title = var_ressource_title.replace(" ", "_")\n
#context.log(\'var_ressource_title\', var_ressource_title)\n
\n
#encaisse_devise = "/encaisse_des_devises/%s/entrante" %(context.getParentValue().getResourceTitle().lower())\n
encaisse_devise = "/encaisse_des_devises/%s/entrante" %(var_ressource_title)\n
encaisse_devise = "/encaisse_des_devises/%s/sortante" %(var_ressource_title)\n
\n
#context.log(\'encaisse_devise\', encaisse_devise)\n
\n
......
......@@ -76,7 +76,7 @@ if currency is None :\n
return request.RESPONSE.redirect( redirect_url )\n
\n
if currency != context.Baobab_getPortalReferenceCurrencyID():\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
else:\n
......
......@@ -75,7 +75,7 @@ if currency is None :\n
return request.RESPONSE.redirect( redirect_url )\n
\n
if currency != context.Baobab_getPortalReferenceCurrencyID():\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
else:\n
......
......@@ -456,17 +456,21 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Cash Delivery Line</string>
<string>Cash Delivery Line</string>
<string>Vault Transfer Line</string>
<string>Vault Transfer Line</string>
</tuple>
<tuple>
<string>Cash Delivery Cell</string>
<string>Cash Delivery Cell</string>
<string>Vault Transfer Cell</string>
<string>Vault Transfer Cell</string>
</tuple>
</list>
</value>
......@@ -497,7 +501,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>vault_transfer_selection</string> </value>
<value> <string>vault_transfer_line_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......@@ -540,11 +544,8 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
......@@ -76,7 +76,7 @@ if currency is None :\n
return request.RESPONSE.redirect( redirect_url )\n
\n
if currency != context.Baobab_getPortalReferenceCurrencyID():\n
cash_status = [\'not_defined\']\n
cash_status = [\'valid\']\n
emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n
else:\n
......@@ -84,7 +84,7 @@ else:\n
emission_letter = None\n
variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
\n
cash_detail_dict = {\'line_portal_type\' : \'Cash Delivery Line\'\n
cash_detail_dict = {\'line_portal_type\' : \'Vault Transfer Line\' #\'Cash Delivery Line\'\n
, \'operation_currency\' : currency\n
, \'cash_status_list\' : cash_status\n
, \'emission_letter_list\' : emission_letter\n
......
......@@ -57,7 +57,7 @@
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
<value> <string>validateDestinationCounterDate</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -51,7 +51,7 @@
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
<value> <string>setMovementStopDate</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -67,11 +67,8 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
......@@ -74,7 +74,8 @@ in_list = txn.objectValues(portal_type=\'Incoming Cash Sorting Incident Line\')\
out_list = txn.objectValues(portal_type=\'Outgoing Cash Sorting Incident Line\')\n
\n
# check again that we are in the good accounting date\n
if not txn.Baobab_checkCounterDateOpen():\n
vault = txn.getSource()\n
if not txn.Baobab_checkCounterDateOpen(site=vault, date=txn.getStartDate()):\n
msg = Message(domain = "ui", message="Transaction not in the good accounting date")\n
raise ValidationFailed, (msg,)\n
\n
......@@ -152,11 +153,11 @@ if len(out_list) !=0:\n
<string>_getattr_</string>
<string>in_list</string>
<string>out_list</string>
<string>vault</string>
<string>msg</string>
<string>price</string>
<string>in_price</string>
<string>out_price</string>
<string>vault</string>
<string>len</string>
<string>resource</string>
</tuple>
......
......@@ -55,7 +55,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Pay</string> </value>
<value> <string>Deliver</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
......
This diff is collapsed.
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