Commit 6c299d06 authored by Sebastien Robin's avatar Sebastien Robin

- check the couter date in monetary destruction and monetary recall.

- small changes on description fields
- some bug fixes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11406 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e7e4f502
......@@ -104,7 +104,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: len(here.objectIds()) == 0</string> </value>
<value> <string>python: object.getSimulationState()==\'draft\'</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -98,7 +98,7 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
<value> <string>ForeignCashReception_init</string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -281,7 +281,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(current_url=here.getDestination(), vault_type=(\'site/caveau\'), user_site=0, leaf_node=1)</string> </value>
<value> <string>python:here.Base_sortItemList(here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/caveau\',),user_site=0,leaf_node=1,exclude_vault_type=(\'site/caveau/auxiliaire/encaisse_des_externes\'))+here.Delivery_getVaultItemList(vault_type=(\'site/caveau/auxiliaire/encaisse_des_externes\',),user_site=0,leaf_node=0)[1:],keep_first=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -281,7 +281,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/caveau\',))</string> </value>
<value> <string>python:here.Base_sortItemList(here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/caveau\',),leaf_node=1,exclude_vault_type=(\'site/caveau/auxiliaire/encaisse_des_externes\'))+here.Delivery_getVaultItemList(vault_type=(\'site/caveau/auxiliaire/encaisse_des_externes\',),leaf_node=0)[1:],keep_first=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -445,6 +445,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......@@ -486,7 +490,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string></string> </value>
<value> <string>cash_sorting_incident_incoming_line_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......
......@@ -445,6 +445,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......@@ -486,7 +490,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string></string> </value>
<value> <string>cash_sorting_incident_outgoing_line_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string>cash_detail_dict = {\'line_portal_type\' : \'Outgoing Cash Sorting Line\'\n
, \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n
, \'cash_status_list\' : [\'valid\', \'cancelled\', \'to_sort\']\n
, \'cash_status_list\' : [\'valid\', \'cancelled\', \'to_sort\', \'mixed\']\n
, \'emission_letter_list\' : None\n
, \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1)\n
, \'currency_cash_portal_type\': \'Banknote\'\n
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>reference_currency = context.Baobab_getPortalReferenceCurrencyID()\n
context.setPriceCurrency(\'currency_module/%s\' %(reference_currency,))\n
context.setCurrencyExchangeType(\'transfer\')\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>*args,**kw</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>args</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>reference_currency</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>ForeignCashReception_init</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -77,6 +77,12 @@
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
......@@ -148,4 +154,25 @@
</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>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -77,6 +77,12 @@
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
......@@ -147,4 +153,25 @@
</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>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -77,6 +77,12 @@
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
......@@ -147,4 +153,25 @@
</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>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -287,7 +287,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Delivery_getVaultItemList(user_site=1,vault_type=(\'site/surface/caisse_courante/billets_macules\',\'site/surface/caisse_courante/billets_mutiles\'),strict_membership=1,leaf_node=1,with_base=0)</string> </value>
<value> <string>python: here.Delivery_getVaultItemList(user_site=1,vault_type=(\'site/surface/caisse_courante/billets_macules\',\'site/surface/caisse_courante/billets_mutiles\'),strict_membership=1,leaf_node=1,with_base=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>cash_detail_dict = {\'line_portal_type\' : \'Incoming Mutilated Banknote Line\'\n
<value> <string>cash_detail_dict = {\'line_portal_type\' : \'Outgoing Mutilated Banknote Line\'\n
, \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n
, \'cash_status_list\' : None\n
, \'emission_letter_list\' : None\n
......
......@@ -454,8 +454,8 @@
<value>
<list>
<tuple>
<string>Outgoing Cash Sorting Line</string>
<string>Outgoing Cash Sorting Line</string>
<string>Outgoing Mutilated Banknote Line</string>
<string>Outgoing Mutilated Banknote Line</string>
</tuple>
<tuple>
<string>Cash Delivery Cell</string>
......@@ -490,7 +490,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>cash_sorting_outgoing_line_selection</string> </value>
<value> <string>mutilated_banknote_cash_sorting_outgoing_line_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......
......@@ -269,7 +269,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getTotalPrice(deliveryLineType=\'Incoming Cash Sorting Line\')</string> </value>
<value> <string>python: here.getTotalPrice(portal_type=(\'Outgoing Mutilated Banknote Line\',\'Cash Delivery Cell\'),fast=0)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,6 +77,12 @@
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
......@@ -147,4 +153,25 @@
</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>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -394,10 +394,6 @@
<string>resource_reference</string>
<string>Currency</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
......@@ -505,6 +501,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -73,6 +73,12 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
object = state_change.object\n
\n
# utilisation de la contrainte\n
vliste = object.checkConsistency()\n
object.log(\'vliste\', vliste)\n
if len(vliste) != 0:\n
raise ValidationFailed, (vliste[0].getMessage(),)\n
\n
if not \'encaisse_des_devises\' in object.getDestination():\n
msg = Message(domain="ui", message="Wrong Destination Selected.")\n
raise validationFailed, (msg,)\n
......@@ -138,6 +144,9 @@ if object_price != line_price:\n
<string>ValidationFailed</string>
<string>_getattr_</string>
<string>object</string>
<string>vliste</string>
<string>len</string>
<string>_getitem_</string>
<string>msg</string>
<string>validationFailed</string>
<string>object_price</string>
......
......@@ -80,6 +80,12 @@ transaction.Base_checkBaobabSourceAndDestination()\n
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
......@@ -151,4 +157,25 @@ transaction.Base_checkBaobabSourceAndDestination()\n
</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>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -82,6 +82,14 @@ if (\'encaisse_des_externes\' not in vault and \'encaisse_des_billets_retires_de
msg = Message(domain="ui", message="Invalid source.")\n
raise ValidationFailed, (msg,)\n
\n
\n
source_object = context.portal_categories.getCategoryValue(vault)\n
\n
# check again that we are in the good accounting date\n
if not transaction.Baobab_checkCounterDateOpen(site=source_object, date=transaction.getStartDate()):\n
msg = Message(domain = "ui", message="Transaction not in the good accounting date")\n
raise ValidationFailed, (msg,)\n
\n
# Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Cash Delivery Line\',\'Cash Delivery Cell\'],fast=0)\n
......@@ -156,6 +164,8 @@ elif resource <> 0 :\n
<string>vault</string>
<string>resource</string>
<string>msg</string>
<string>context</string>
<string>source_object</string>
<string>amount</string>
<string>total_price</string>
</tuple>
......
......@@ -83,6 +83,15 @@ if (\'encaisse_des_billets_et_monnaies\' not in vault):\n
\n
resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Monetary Recall Line\')\n
\n
\n
#source = baobab_source\n
source_object = context.portal_categories.getCategoryValue(vault)\n
\n
# check again that we are in the good accounting date\n
if not transaction.Baobab_checkCounterDateOpen(site=source_object, date=transaction.getStartDate()):\n
msg = Message(domain = "ui", message="Transaction not in the good accounting date")\n
raise ValidationFailed, (msg,)\n
\n
# Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Monetary Recall Line\',\'Cash Delivery Cell\'],fast=0)\n
......@@ -163,6 +172,8 @@ elif resource <> 0 :\n
<string>vault</string>
<string>msg</string>
<string>resource</string>
<string>context</string>
<string>source_object</string>
<string>amount</string>
<string>total_price</string>
</tuple>
......
......@@ -84,6 +84,12 @@ if len(ob.objectValues(portal_type="Exchanged Mutilated Banknote Line")) != 0:\n
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
......@@ -155,4 +161,25 @@ if len(ob.objectValues(portal_type="Exchanged Mutilated Banknote Line")) != 0:\n
</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>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
93
\ No newline at end of file
100
\ 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