From e1830667cd333bf5d5c913f1f9b7f77053162932 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Wed, 12 Sep 2007 15:57:20 +0000 Subject: [PATCH] modified checkbook reception so that if we do an import we will confirm checks and checkbooks git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16308 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../Checkbook%20Reception/fastInput.xml | 2 +- .../CheckbookReceptionImport.py | 6 +- .../property_sheet_list.xml | 3 + .../portal_types/Checkbook%20Reception.xml | 4 + .../CheckbookReception.py | 39 ++++ .../my_previous_resource.xml | 30 +--- .../my_resource.xml | 2 +- .../CheckbookDelivery_view/my_source.xml | 9 +- ...ookReceptionLine_checkOrCreateItemList.xml | 13 +- ...eckbookReception_checkOrCreateItemList.xml | 8 +- ...heckbookReception_getBaobabDestination.xml | 14 +- .../CheckbookReception_view.xml | 1 + .../my_destination.xml | 9 +- .../CheckbookReception_view/my_imported.xml | 166 ++++++++++++++++++ .../my_destination.xml | 9 +- .../transitions/cancel.xml | 27 +-- .../transitions/confirm.xml | 27 +-- .../transitions/confirm_action.xml | 8 +- .../transitions/deliver.xml | 26 +-- .../transitions/order.xml | 8 +- .../transitions/order_action.xml | 8 +- .../transitions/plan.xml | 27 +-- .../transitions/plan_action.xml | 8 +- .../scripts/updateCheckAndCheckbook.xml | 1 + .../CheckbookReception_generateItemList.xml | 6 +- .../states/cancelled.xml | 5 +- .../worklists/confirmed.xml | 16 +- .../stop_payment_workflow/worklists/stop.xml | 16 +- bt5/erp5_banking_check/bt/revision | 2 +- .../template_portal_type_property_sheet_list | 1 + .../bt/template_property_sheet_id_list | 3 +- 31 files changed, 292 insertions(+), 212 deletions(-) create mode 100644 bt5/erp5_banking_check/PropertySheetTemplateItem/CheckbookReception.py create mode 100644 bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_imported.xml diff --git a/bt5/erp5_banking_check/ActionTemplateItem/portal_types/Checkbook%20Reception/fastInput.xml b/bt5/erp5_banking_check/ActionTemplateItem/portal_types/Checkbook%20Reception/fastInput.xml index 91f6a19830..2dda3f10f5 100644 --- a/bt5/erp5_banking_check/ActionTemplateItem/portal_types/Checkbook%20Reception/fastInput.xml +++ b/bt5/erp5_banking_check/ActionTemplateItem/portal_types/Checkbook%20Reception/fastInput.xml @@ -95,7 +95,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>python:object.getSimulationState() in (\'empty\', \'rejected\')</string> </value> + <value> <string>python:object.getSimulationState() in (\'empty\', \'rejected\') and not object.isImport()</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_check/ExtensionTemplateItem/CheckbookReceptionImport.py b/bt5/erp5_banking_check/ExtensionTemplateItem/CheckbookReceptionImport.py index 3bb13e34be..9ea7a15b0f 100644 --- a/bt5/erp5_banking_check/ExtensionTemplateItem/CheckbookReceptionImport.py +++ b/bt5/erp5_banking_check/ExtensionTemplateItem/CheckbookReceptionImport.py @@ -18,6 +18,7 @@ def CheckbookReception_importItemFile(self, import_file=None, REQUEST=None, **kw check_quantity = str(item.xpath("string(./check_quantity)")) reference_min = str(item.xpath("string(./reference_min)")) reference_max = str(item.xpath("string(./reference_max)")) + quantity = str(item.xpath("string(./quantity)")) internal_account_number = item.xpath("string(./numero_interne)") checkbook_type = item.xpath("string(./checkbook_type)") type = str(item.xpath("string(./checkbook_type)")) @@ -28,6 +29,7 @@ def CheckbookReception_importItemFile(self, import_file=None, REQUEST=None, **kw item_dict['reference_min'] = reference_min item_dict['reference_max'] = reference_max item_dict['check_quantity'] = check_quantity + item_dict['quantity'] = quantity item_dict['internal_account_number'] = internal_account_number listbox_dict = {} @@ -57,7 +59,8 @@ def CheckbookReception_importItemFile(self, import_file=None, REQUEST=None, **kw listbox_line['reference_range_min'] = item_dict['reference_min'] listbox_line['reference_range_max'] = item_dict['reference_max'] listbox_line['destination_payment_reference'] = item_dict['internal_account_number'] - listbox_line['quantity'] = 1 + #listbox_line['quantity'] = 1 + listbox_line['quantity'] = item_dict['quantity'] if is_checkbook: listbox_line['check_amount'] = resource_amount_dict[item_dict['check_quantity']] listbox.append(listbox_line) @@ -88,6 +91,7 @@ def CheckbookReception_importItemFile(self, import_file=None, REQUEST=None, **kw REQUEST=REQUEST) message = Message(domain='ui', message='File Imported successfully') + self.setImported(1) return message diff --git a/bt5/erp5_banking_check/PortalTypePropertySheetTemplateItem/property_sheet_list.xml b/bt5/erp5_banking_check/PortalTypePropertySheetTemplateItem/property_sheet_list.xml index 11e1823351..0bf8e2ee5a 100644 --- a/bt5/erp5_banking_check/PortalTypePropertySheetTemplateItem/property_sheet_list.xml +++ b/bt5/erp5_banking_check/PortalTypePropertySheetTemplateItem/property_sheet_list.xml @@ -15,6 +15,9 @@ <item>Amount</item> <item>Price</item> </portal_type> + <portal_type id="Checkbook Reception"> + <item>CheckbookReception</item> + </portal_type> <portal_type id="Checkbook Usual Cash Transfer"> <item>Price</item> <item>Amount</item> diff --git a/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Reception.xml b/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Reception.xml index aa31f8ec07..837b67b6fb 100644 --- a/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Reception.xml +++ b/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Reception.xml @@ -99,6 +99,10 @@ checks</string> </value> <key> <string>init_script</string> </key> <value> <string>CheckbookReception_init</string> </value> </item> + <item> + <key> <string>permission</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>property_sheet_list</string> </key> <value> diff --git a/bt5/erp5_banking_check/PropertySheetTemplateItem/CheckbookReception.py b/bt5/erp5_banking_check/PropertySheetTemplateItem/CheckbookReception.py new file mode 100644 index 0000000000..361ea3568a --- /dev/null +++ b/bt5/erp5_banking_check/PropertySheetTemplateItem/CheckbookReception.py @@ -0,0 +1,39 @@ +############################################################################## +# +# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +class CheckbookReception: + """ + Properties for Baobab Bank Account Objects + """ + + _properties = ( + {'id' : 'imported', + 'description' : 'Indicate if this document is used for an import', + 'type' : 'boolean', + 'mode' : 'w' + }, + ) diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_previous_resource.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_previous_resource.xml index 60f2a7d32a..52f1862f16 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_previous_resource.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_previous_resource.xml @@ -173,9 +173,7 @@ </item> <item> <key> <string>title</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>truncate</string> </key> @@ -273,11 +271,8 @@ <record id="2" aka="AAAAAAAAAAI="> <pickle> <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> </tuple> </pickle> <pickle> @@ -289,23 +284,4 @@ </dictionary> </pickle> </record> - <record id="3" aka="AAAAAAAAAAM="> - <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: None</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_resource.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_resource.xml index 3f684ea988..8c0eda3626 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_resource.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_viewLineFastInputForm/my_resource.xml @@ -335,7 +335,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python: ((request.get(\'resource\', False)) and (None, ) or (\'Type\', ))[0]</string> </value> + <value> <string>python: ((request.get(\'resource\', \'\')) and (\'\', ) or (\'Type\', ))[0]</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view/my_source.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view/my_source.xml index 8969135b9d..843b3cd683 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view/my_source.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view/my_source.xml @@ -273,18 +273,15 @@ <record id="2" aka="AAAAAAAAAAI="> <pickle> <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> </tuple> </pickle> <pickle> <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python:here.Delivery_getVaultItemList(vault_type=(\'site/surface/caisse_courante\',\'site/surface/banque_interne/guichet\',\'site/surface/operations_diverses/guichet\'),leaf_node=0,first_level=1)</string> </value> + <value> <string>python:here.Delivery_getVaultItemList(vault_type=(\'site/surface/caisse_courante\',\'site/surface/banque_interne/guichet\',\'site/surface/operations_diverses/guichet\'),leaf_node=0,first_level=1,current_url=here.getSource())</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReceptionLine_checkOrCreateItemList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReceptionLine_checkOrCreateItemList.xml index 76ab74b85a..a3a7cb6bfc 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReceptionLine_checkOrCreateItemList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReceptionLine_checkOrCreateItemList.xml @@ -233,6 +233,8 @@ for i in xrange(quantity):\n item.setTitle(\'%s - %s\' % (reference_range_min, reference_range_max))\n item.setCheckAmount(check_amount)\n destination_section = item.getDestinationSection()\n + if confirm_check:\n + item.confirm()\n for j in reference_list:\n #tag = \'check_%s_%s_%s\' % (model, destination_payment_uid, j)\n #encountered_check_identifiers_dict[tag] = None\n @@ -241,6 +243,8 @@ for i in xrange(quantity):\n check.setStartDate(start_date)\n check.setReference(j)\n check.setResource(model)\n + if confirm_check:\n + check.confirm()\n else:\n last_reference_value = reference_to_int(reference_range_min)\n if check == 1:\n @@ -253,6 +257,9 @@ for i in xrange(quantity):\n item_type = line.getCheckTypeValue()\n item.setPrice(item_type.getPrice())\n item.setPriceCurrency(line.getPriceCurrency())\n + if confirm_check:\n + item.setStartDate(start_date)\n + item.confirm()\n #tag = \'check_%s_%s_%s\' % (model, destination_payment_uid, reference_range_min)\n #encountered_check_identifiers_dict[tag] = None\n # update reference_range_min for the next pass\n @@ -293,7 +300,7 @@ return encountered_check_identifiers_dict\n </item> <item> <key> <string>_params</string> </key> - <value> <string>check=0, create=0, tag=None, encountered_check_identifiers_dict=None</string> </value> + <value> <string>check=0, create=0, tag=None, confirm_check=0, encountered_check_identifiers_dict=None</string> </value> </item> <item> <key> <string>_proxy_roles</string> </key> @@ -321,7 +328,7 @@ return encountered_check_identifiers_dict\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>4</int> </value> + <value> <int>5</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -330,6 +337,7 @@ return encountered_check_identifiers_dict\n <string>check</string> <string>create</string> <string>tag</string> + <string>confirm_check</string> <string>encountered_check_identifiers_dict</string> <string>Products.DCWorkflow.DCWorkflow</string> <string>ValidationFailed</string> @@ -401,6 +409,7 @@ return encountered_check_identifiers_dict\n <int>0</int> <int>0</int> <none/> + <int>0</int> <none/> </tuple> </value> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_checkOrCreateItemList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_checkOrCreateItemList.xml index f47e873fda..e3f8d5dce8 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_checkOrCreateItemList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_checkOrCreateItemList.xml @@ -97,7 +97,7 @@ if check == 1:\n if create==1:\n for line in line_list:\n line.activate(tag=checkbook_reception_tag).\\\n - CheckbookReceptionLine_checkOrCreateItemList(create=1, tag=checkbook_reception_tag)\n + CheckbookReceptionLine_checkOrCreateItemList(create=1, tag=checkbook_reception_tag, confirm_check=confirm_check)\n </string> </value> </item> <item> @@ -120,7 +120,7 @@ if create==1:\n </item> <item> <key> <string>_params</string> </key> - <value> <string>check=0, create=0</string> </value> + <value> <string>check=0, create=0, confirm_check=0</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -140,7 +140,7 @@ if create==1:\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>2</int> </value> + <value> <int>3</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -148,6 +148,7 @@ if create==1:\n <tuple> <string>check</string> <string>create</string> + <string>confirm_check</string> <string>Products.DCWorkflow.DCWorkflow</string> <string>ValidationFailed</string> <string>Products.ERP5Type.Message</string> @@ -176,6 +177,7 @@ if create==1:\n <tuple> <int>0</int> <int>0</int> + <int>0</int> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_getBaobabDestination.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_getBaobabDestination.xml index 78ca808d46..4cadf1c828 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_getBaobabDestination.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_getBaobabDestination.xml @@ -65,9 +65,12 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>destination = context.getDestination()\n -if destination is not None:\n - destination += \'/caveau/auxiliaire/encaisse_des_billets_et_monnaies\'\n + <value> <string>destination = None\n +# if import, then set destination to None\n +if not context.isImport():\n + destination = context.getDestination()\n + if destination is not None:\n + destination += \'/caveau/auxiliaire/encaisse_des_billets_et_monnaies\'\n \n return destination\n </string> </value> @@ -120,10 +123,11 @@ return destination\n <tuple> <string>args</string> <string>kw</string> + <string>None</string> + <string>destination</string> <string>_getattr_</string> <string>context</string> - <string>destination</string> - <string>None</string> + <string>_inplacevar_</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view.xml index f781dd3227..ab374e03c0 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view.xml @@ -104,6 +104,7 @@ <list> <string>my_source_reference</string> <string>my_destination</string> + <string>my_imported</string> </list> </value> </item> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_destination.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_destination.xml index ee32309725..9d138b5164 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_destination.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_destination.xml @@ -273,18 +273,15 @@ <record id="2" aka="AAAAAAAAAAI="> <pickle> <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> </tuple> </pickle> <pickle> <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python:here.Delivery_getVaultItemList(vault_type = \'site\', current_url = None, user_site = 1, leaf_node = 0, strict_membership = 1)</string> </value> + <value> <string>python:here.Delivery_getVaultItemList(vault_type = \'site\', current_url = here.getDestination(), user_site = 1, leaf_node = 0, strict_membership = 1)</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_imported.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_imported.xml new file mode 100644 index 0000000000..2c2907dea6 --- /dev/null +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookReception_view/my_imported.xml @@ -0,0 +1,166 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="LabelField" module="Products.Formulator.StandardFields"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_imported</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Imported File</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.isImported() and 1 or 0</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransfer_view/my_destination.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransfer_view/my_destination.xml index c1c113ffe6..bb12dfd890 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransfer_view/my_destination.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransfer_view/my_destination.xml @@ -273,18 +273,15 @@ <record id="2" aka="AAAAAAAAAAI="> <pickle> <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> </tuple> </pickle> <pickle> <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/caveau\',\'site/surface\',),strict_membership=1,leaf_node=0)</string> </value> + <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getDestination(), vault_type=(\'site/caveau\',\'site/surface\',),strict_membership=1,leaf_node=0)</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/cancel.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/cancel.xml index ffa0fff11c..accbe9b9c8 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/cancel.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/cancel.xml @@ -38,7 +38,7 @@ <item> <key> <string>guard</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <none/> </value> </item> <item> @@ -64,29 +64,4 @@ </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>Assignee</string> - <string>DestinationAssignee</string> - </tuple> - </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm.xml index 32de81d722..3ab4d0e03c 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm.xml @@ -38,7 +38,7 @@ <item> <key> <string>guard</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <none/> </value> </item> <item> @@ -64,29 +64,4 @@ </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> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm_action.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm_action.xml index a66e317c82..95a24c9b4c 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm_action.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/confirm_action.xml @@ -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> @@ -81,7 +78,6 @@ <value> <tuple> <string>Manager</string> - <string>Assignor</string> <string>Assignee</string> </tuple> </value> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/deliver.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/deliver.xml index 37b06e3dbf..ec84b504fe 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/deliver.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/deliver.xml @@ -38,7 +38,7 @@ <item> <key> <string>guard</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <none/> </value> </item> <item> @@ -64,28 +64,4 @@ </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>DestinationAssignee</string> - </tuple> - </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order.xml index cfc4f0cfa6..fb843fe124 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order.xml @@ -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> @@ -82,7 +79,6 @@ <tuple> <string>Manager</string> <string>Assignee</string> - <string>Assignor</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml index 1a84cb6fed..9f1abca9a2 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml @@ -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> @@ -82,7 +79,6 @@ <tuple> <string>Manager</string> <string>Assignee</string> - <string>Assignor</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan.xml index 8f7eb54290..0cae6e843c 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan.xml @@ -38,7 +38,7 @@ <item> <key> <string>guard</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <none/> </value> </item> <item> @@ -64,29 +64,4 @@ </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> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml index 1bcfaf8f08..e6c6b687f8 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml @@ -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> @@ -82,7 +79,6 @@ <tuple> <string>Manager</string> <string>Assignor</string> - <string>Assignee</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/updateCheckAndCheckbook.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/updateCheckAndCheckbook.xml index 5ca27152b5..dc8fd948f6 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/updateCheckAndCheckbook.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/updateCheckAndCheckbook.xml @@ -81,6 +81,7 @@ for line in line_list:\n for aggregate in aggregate_list:\n if aggregate.getPortalType()==\'Checkbook\':\n aggregate.setStartDate(transaction.getStartDate())\n + aggregate.confirm()\n for check in aggregate.objectValues(portal_type=\'Check\'):\n check.confirm()\n check.setStartDate(transaction.getStartDate())\n diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml index d761c51441..d1bf85e2bc 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml @@ -79,8 +79,9 @@ transaction.Base_checkBaobabSourceAndDestination()\n transaction.CheckbookReception_checkOrCreateItemList(check=1)\n \n # Start activities for each line\n -transaction.CheckbookReception_checkOrCreateItemList(create=1)\n -\n +confirm_check = transaction.isImported()\n +transaction.CheckbookReception_checkOrCreateItemList(create=1,\n + confirm_check=confirm_check)\n \n \n #from Products.DCWorkflow.DCWorkflow import ValidationFailed\n @@ -320,6 +321,7 @@ transaction.CheckbookReception_checkOrCreateItemList(create=1)\n <string>_getitem_</string> <string>transaction</string> <string>_getattr_</string> + <string>confirm_check</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml index 47adc2e5f5..ddade5d0a9 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml @@ -36,7 +36,10 @@ <item> <key> <string>transitions</string> </key> <value> - <tuple/> + <tuple> + <string>delete</string> + <string>delete_action</string> + </tuple> </value> </item> <item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/confirmed.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/confirmed.xml index 91b8b2f98e..20cfa0351e 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/confirmed.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/confirmed.xml @@ -57,11 +57,8 @@ Base_viewWorklist?simulation_state=confirmed&portal_type=Stop Payment <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> @@ -81,17 +78,14 @@ Base_viewWorklist?simulation_state=confirmed&portal_type=Stop Payment <record id="3" aka="AAAAAAAAAAM="> <pickle> <tuple> - <tuple> - <string>Persistence</string> - <string>PersistentMapping</string> - </tuple> - <none/> + <global name="PersistentMapping" module="Persistence.mapping"/> + <tuple/> </tuple> </pickle> <pickle> <dictionary> <item> - <key> <string>_container</string> </key> + <key> <string>data</string> </key> <value> <dictionary> <item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/stop.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/stop.xml index 8b4c607e70..10cedf7827 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/stop.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/worklists/stop.xml @@ -57,11 +57,8 @@ Base_viewWorklist?simulation_state=stopped&portal_type=Stop Payment <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> @@ -81,17 +78,14 @@ Base_viewWorklist?simulation_state=stopped&portal_type=Stop Payment <record id="3" aka="AAAAAAAAAAM="> <pickle> <tuple> - <tuple> - <string>Persistence</string> - <string>PersistentMapping</string> - </tuple> - <none/> + <global name="PersistentMapping" module="Persistence.mapping"/> + <tuple/> </tuple> </pickle> <pickle> <dictionary> <item> - <key> <string>_container</string> </key> + <key> <string>data</string> </key> <value> <dictionary> <item> diff --git a/bt5/erp5_banking_check/bt/revision b/bt5/erp5_banking_check/bt/revision index 1a7d3a1c84..194ba8cc75 100644 --- a/bt5/erp5_banking_check/bt/revision +++ b/bt5/erp5_banking_check/bt/revision @@ -1 +1 @@ -318 \ No newline at end of file +320 \ No newline at end of file diff --git a/bt5/erp5_banking_check/bt/template_portal_type_property_sheet_list b/bt5/erp5_banking_check/bt/template_portal_type_property_sheet_list index 745ff417a4..b709e7fdb5 100644 --- a/bt5/erp5_banking_check/bt/template_portal_type_property_sheet_list +++ b/bt5/erp5_banking_check/bt/template_portal_type_property_sheet_list @@ -6,6 +6,7 @@ Checkbook Delivery | Amount Checkbook Delivery | Price Checkbook Movement | Amount Checkbook Movement | Price +Checkbook Reception | CheckbookReception Checkbook Usual Cash Transfer | Amount Checkbook Usual Cash Transfer | Price Checkbook Vault Transfer | Amount diff --git a/bt5/erp5_banking_check/bt/template_property_sheet_id_list b/bt5/erp5_banking_check/bt/template_property_sheet_id_list index d6c92c065b..e667eea790 100644 --- a/bt5/erp5_banking_check/bt/template_property_sheet_id_list +++ b/bt5/erp5_banking_check/bt/template_property_sheet_id_list @@ -1 +1,2 @@ -StopPayment \ No newline at end of file +StopPayment +CheckbookReception \ No newline at end of file -- 2.30.9