From 7a9e722c34615781863e282756c0be98c302f233 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Fri, 8 Sep 2006 12:02:41 +0000 Subject: [PATCH] added a report fixed base categories for checkbook delivery line fixed some workflow transitions git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9762 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../base_category_list.xml | 4 + .../portal_types/Checkbook%20Delivery.xml | 2 +- .../Base_getItemList.xml | 204 +++++++ ...elivery_generateCheckDetailInputDialog.xml | 40 +- .../CheckDetail_getFastInputColumnList.xml | 6 +- ...heckPaymentModule_viewCheckPaymentList.xml | 31 +- .../CheckbookDeliveryLine_view.xml | 9 +- .../my_aggregate_title_list.xml | 563 ++++++++++++++++++ .../my_resource_title.xml | 12 +- ...liveryModule_viewCheckbookDeliveryList.xml | 14 +- .../CheckbookDelivery_init.xml | 3 +- .../CheckbookDelivery_view.xml | 4 +- ...vementModule_viewCheckbookMovementList.xml | 14 +- ...ule_viewCheckbookUsualCashTransferList.xml | 4 +- ...rModule_viewCheckbookVaultTransferList.xml | 4 +- ...ptionModule_viewCheckbookReceptionList.xml | 4 +- .../Delivery_viewCheckbookInputDialog.xml | 30 +- .../Module_viewItemReport.xml | 156 +++++ .../Module_viewItemReport/listbox.xml | 553 +++++++++++++++++ .../Module_viewItemReportDialog.xml | 128 ++++ .../my_vault.xml} | 108 ++-- .../scripts/updateCheckAndCheckbook.xml | 5 +- .../scripts/validatePositionAccounting.xml | 275 +++++++++ .../transitions/deliver.xml | 2 +- .../transitions/deliver_action.xml | 2 +- .../worklists/checkbook_delivery_worklist.xml | 2 +- .../worklists/draft.xml | 28 +- .../worklists/ordered.xml | 2 +- .../template_portal_type_base_category_list | 2 + 29 files changed, 2072 insertions(+), 139 deletions(-) create mode 100644 bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_getItemList.xml create mode 100644 bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_aggregate_title_list.xml create mode 100644 bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport.xml create mode 100644 bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport/listbox.xml create mode 100644 bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReportDialog.xml rename bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/{CheckbookDeliveryLine_view/my_aggregate_list.xml => Module_viewItemReportDialog/my_vault.xml} (78%) create mode 100644 bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/validatePositionAccounting.xml diff --git a/bt5/erp5_banking_check/PortalTypeBaseCategoryTemplateItem/base_category_list.xml b/bt5/erp5_banking_check/PortalTypeBaseCategoryTemplateItem/base_category_list.xml index 4a4942a977..0ada2efd51 100644 --- a/bt5/erp5_banking_check/PortalTypeBaseCategoryTemplateItem/base_category_list.xml +++ b/bt5/erp5_banking_check/PortalTypeBaseCategoryTemplateItem/base_category_list.xml @@ -1,4 +1,8 @@ <base_category_list> + <portal_type id="Checkbook Delivery Line"> + <item>currency_exchange_type</item> + <item>check_amount</item> + </portal_type> <portal_type id="Checkbook Reception Line"> <item>check_amount</item> </portal_type> diff --git a/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Delivery.xml b/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Delivery.xml index 97db9a19a7..3030c74975 100644 --- a/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Delivery.xml +++ b/bt5/erp5_banking_check/PortalTypeTemplateItem/portal_types/Checkbook%20Delivery.xml @@ -117,7 +117,7 @@ </item> <item> <key> <string>init_script</string> </key> - <value> <string></string> </value> + <value> <string>CheckbookDelivery_init</string> </value> </item> <item> <key> <string>property_sheet_list</string> </key> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_getItemList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_getItemList.xml new file mode 100644 index 0000000000..72fa214088 --- /dev/null +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_getItemList.xml @@ -0,0 +1,204 @@ +<?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>from Products.ERP5Type.Document import newTempBase\n +\n +if vault is not None:\n + if not vault.endswith(\'encaisse_des_billets_et_monnaies\'):\n + vault = "%s/%s" % (vault,\'encaisse_des_billets_et_monnaies\')\n +\n +listbox_data = context.Delivery_viewCheckbookInputDialog(batch_mode=1,node=vault)\n +\n +result_list = []\n +i=0\n +for line in listbox_data:\n + result_list.append(newTempBase(context, "new_%3i" % i, **line))\n + i+=1\n +return result_list\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <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> <string>Script (Python):/baobab/portal_skins/erp5_banking_check_operation/Base_getItemList</string> </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>vault=None,at_date=None,from_date=None,**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>3</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>vault</string> + <string>at_date</string> + <string>from_date</string> + <string>kw</string> + <string>Products.ERP5Type.Document</string> + <string>newTempBase</string> + <string>None</string> + <string>_getattr_</string> + <string>context</string> + <string>listbox_data</string> + <string>result_list</string> + <string>i</string> + <string>_getiter_</string> + <string>line</string> + <string>_apply_</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <none/> + <none/> + <none/> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_getItemList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </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> + <value> + <dictionary/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDelivery_generateCheckDetailInputDialog.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDelivery_generateCheckDetailInputDialog.xml index 3ab66c56d3..1c1ed31876 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDelivery_generateCheckDetailInputDialog.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDelivery_generateCheckDetailInputDialog.xml @@ -137,26 +137,26 @@ else:\n if reference_range_min in (None,\'\'):\n message = \'Please set a start number\'\n generate_error(line,\'reference_range_min\',message)\n - if reference_range_max in (None,\'\'):\n - if quantity!=1:\n - message = \'Please set a stop number\'\n - generate_error(line,\'reference_range_max\',message)\n - else:\n - reference_range_max = reference_range_min\n - line[\'reference_range_max\'] = reference_range_max\n - if reference_range_min not in (None,\'\') and reference_range_max not in (None,\'\'):\n - reference_range_min = int(reference_range_min)\n - reference_range_max = int(reference_range_max)\n - check_quantity = 1\n - if check_amount is not None: # In the case of a check book\n - check_amount_relative_url = \'/\'.join(check_amount.split(\'/\')[1:])\n - line[\'check_amount_relative_url\'] = check_amount_relative_url\n - check_amount_value = context.getPortalObject().restrictedTraverse(check_amount_relative_url)\n - check_quantity = int(check_amount_value.getQuantity())\n - if (reference_range_max-reference_range_min+1)!=(check_quantity*quantity):\n - message = \'The range is not valid\'\n - generate_error(line,\'reference_range_min\',message)\n - generate_error(line,\'reference_range_max\',message)\n + if reference_range_max in (None,\'\') and reference_range_min not in (None,\'\'):\n + if quantity!=1:\n + message = \'Please set a stop number\'\n + generate_error(line,\'reference_range_max\',message)\n + else:\n + reference_range_max = reference_range_min\n + line[\'reference_range_max\'] = reference_range_max\n + if reference_range_min not in (None,\'\') and reference_range_max not in (None,\'\'):\n + reference_range_min = int(reference_range_min)\n + reference_range_max = int(reference_range_max)\n + check_quantity = 1\n + if check_amount is not None: # In the case of a check book\n + check_amount_relative_url = \'/\'.join(check_amount.split(\'/\')[1:])\n + line[\'check_amount_relative_url\'] = check_amount_relative_url\n + check_amount_value = context.getPortalObject().restrictedTraverse(check_amount_relative_url)\n + check_quantity = int(check_amount_value.getQuantity())\n + if (reference_range_max-reference_range_min+1)!=(check_quantity*quantity):\n + message = \'The range is not valid\'\n + generate_error(line,\'reference_range_min\',message)\n + generate_error(line,\'reference_range_max\',message)\n \n if batch_mode:\n return error_value\n diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_getFastInputColumnList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_getFastInputColumnList.xml index 31b924f10e..27210b7c65 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_getFastInputColumnList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_getFastInputColumnList.xml @@ -82,9 +82,9 @@ item_model = context.getPortalObject().restrictedTraverse(resource)\n if item_model.getPortalType()== \'Check Model\':\n if item_model.isAccountNumberEnabled():\n return_list.append([\'destination_payment_reference\',\'Account Reference\'])\n - if item_model.isQuantityRequired():\n - return_list.append([\'price\',\'Amount\'])\n - return_list.append([\'price_currency\',\'Currency\'])\n + #if item_model.isQuantityRequired():\n + # return_list.append([\'price\',\'Amount\'])\n + # return_list.append([\'price_currency\',\'Currency\'])\n if len(item_model.getVariationRangeCategoryList())>0:\n return_list.append([\'check_type\',\'Check Value\'])\n return_list.append([\'reference_range_min\',\'Start Number\'])\n diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckPaymentModule_viewCheckPaymentList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckPaymentModule_viewCheckPaymentList.xml index 243749190a..c076a0b9dd 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckPaymentModule_viewCheckPaymentList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckPaymentModule_viewCheckPaymentList.xml @@ -67,9 +67,6 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> <string>hidden</string> </list> @@ -80,27 +77,7 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> - <list> - <string>listbox_source_logical_path</string> - </list> - </value> - </item> - <item> - <key> <string>left</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> @@ -110,9 +87,11 @@ </value> </item> <item> - <key> <string>right</string> </key> + <key> <string>hidden</string> </key> <value> - <list/> + <list> + <string>listbox_source_logical_path</string> + </list> </value> </item> </dictionary> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view.xml index aef9f78c99..264df526fa 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view.xml @@ -68,7 +68,7 @@ <value> <list> <string>left</string> - <string>rigth</string> + <string>right</string> <string>center</string> <string>bottom</string> <string>hidden</string> @@ -94,9 +94,7 @@ <item> <key> <string>hidden</string> </key> <value> - <list> - <string>my_aggregate_list</string> - </list> + <list/> </value> </item> <item> @@ -106,11 +104,12 @@ <string>my_resource_title</string> <string>my_checkbook_type</string> <string>my_quantity</string> + <string>my_aggregate_title_list</string> </list> </value> </item> <item> - <key> <string>rigth</string> </key> + <key> <string>right</string> </key> <value> <list/> </value> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_aggregate_title_list.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_aggregate_title_list.xml new file mode 100644 index 0000000000..54b2440ec9 --- /dev/null +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_aggregate_title_list.xml @@ -0,0 +1,563 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Form.MultiRelationField</string> + <string>MultiRelationStringField</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>my_aggregate_title_list</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + <item> + <key> <string>line_too_long</string> </key> + <value> <string>A line was too long.</string> </value> + </item> + <item> + <key> <string>relation_result_ambiguous</string> </key> + <value> <string>Select appropriate document in the list.</string> </value> + </item> + <item> + <key> <string>relation_result_empty</string> </key> + <value> <string>No such document was found.</string> </value> + </item> + <item> + <key> <string>relation_result_too_long</string> </key> + <value> <string>Too many documents were found.</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>You entered too many characters.</string> </value> + </item> + <item> + <key> <string>too_many_lines</string> </key> + <value> <string>You entered too many lines.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>allow_creation</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>allow_jump</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>base_category</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>catalog_index</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>container_getter_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <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>display_maxwidth</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_width</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>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>jump_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>parameter_list</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>relation_setter_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>sort</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>update_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>allow_creation</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>allow_jump</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>base_category</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>catalog_index</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>container_getter_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <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>display_maxwidth</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_width</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>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>jump_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>parameter_list</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>relation_setter_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>sort</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>update_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>allow_creation</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>allow_jump</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>base_category</string> </key> + <value> <string>aggregate</string> </value> + </item> + <item> + <key> <string>catalog_index</string> </key> + <value> <string>title</string> </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>container_getter_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_maxwidth</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_width</string> </key> + <value> <int>20</int> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <int>5</int> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>jump_method</string> </key> + <value> <string>Base_jumpToRelatedDocument</string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>parameter_list</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> + <list> + <tuple> + <string>Check</string> + <string>Check</string> + </tuple> + <tuple> + <string>Checkbook</string> + <string>Checkbook</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>relation_setter_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>sort</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Check and Checkbooks</string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_method</string> </key> + <value> <string>Base_validateRelation</string> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<br /> + +]]></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <int>40</int> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_resource_title.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_resource_title.xml index da5fa77b89..a4e8e0aa84 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_resource_title.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_resource_title.xml @@ -397,7 +397,9 @@ </item> <item> <key> <string>default</string> </key> - <value> <string></string> </value> + <value> + <list/> + </value> </item> <item> <key> <string>default_module</string> </key> @@ -480,8 +482,12 @@ <value> <list> <tuple> - <string>Checkbook Type</string> - <string>Checkbook Type</string> + <string>Checkbook Model</string> + <string>Checkbook Model</string> + </tuple> + <tuple> + <string>Check Model</string> + <string>Check Model</string> </tuple> </list> </value> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryModule_viewCheckbookDeliveryList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryModule_viewCheckbookDeliveryList.xml index 4181a19b5d..530a8210d7 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryModule_viewCheckbookDeliveryList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryModule_viewCheckbookDeliveryList.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> + <string>bottom</string> <string>hidden</string> </list> </value> @@ -77,20 +77,20 @@ <value> <dictionary> <item> - <key> <string>hidden</string> </key> + <key> <string>bottom</string> </key> <value> <list> - <string>listbox_start_date</string> - <string>listbox_destination_logical_path</string> - <string>listbox_source_logical_path</string> + <string>listbox</string> </list> </value> </item> <item> - <key> <string>left</string> </key> + <key> <string>hidden</string> </key> <value> <list> - <string>listbox</string> + <string>listbox_start_date</string> + <string>listbox_destination_logical_path</string> + <string>listbox_source_logical_path</string> </list> </value> </item> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_init.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_init.xml index c06c37cf33..4a88606507 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_init.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_init.xml @@ -68,8 +68,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>context.setSource(context.getBaobabSource())\n -reference_currency = context.Baobab_getPortalReferenceCurrencyID()\n + <value> <string>reference_currency = context.Baobab_getPortalReferenceCurrencyID()\n context.setPriceCurrency(\'currency_module/%s\' %(reference_currency,))\n context.setCurrencyExchangeType(\'transfer\')\n </string> </value> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view.xml index b3e2debc10..ec66c44e9c 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_view.xml @@ -68,7 +68,7 @@ <value> <list> <string>left</string> - <string>rigth</string> + <string>right</string> <string>center</string> <string>bottom</string> </list> @@ -107,7 +107,7 @@ </value> </item> <item> - <key> <string>rigth</string> </key> + <key> <string>right</string> </key> <value> <list> <string>my_destination_payment_reference</string> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookMovementModule_viewCheckbookMovementList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookMovementModule_viewCheckbookMovementList.xml index 5b535e1d09..9c1911aa2e 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookMovementModule_viewCheckbookMovementList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookMovementModule_viewCheckbookMovementList.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> + <string>bottom</string> <string>hidden</string> </list> </value> @@ -77,20 +77,20 @@ <value> <dictionary> <item> - <key> <string>hidden</string> </key> + <key> <string>bottom</string> </key> <value> <list> - <string>listbox_source_logical_path</string> - <string>listbox_destination_logical_path</string> - <string>listbox_delivery_start_date</string> + <string>listbox</string> </list> </value> </item> <item> - <key> <string>left</string> </key> + <key> <string>hidden</string> </key> <value> <list> - <string>listbox</string> + <string>listbox_source_logical_path</string> + <string>listbox_destination_logical_path</string> + <string>listbox_delivery_start_date</string> </list> </value> </item> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookUsualCashTransferModule_viewCheckbookUsualCashTransferList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookUsualCashTransferModule_viewCheckbookUsualCashTransferList.xml index 6691062af2..555a3bce79 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookUsualCashTransferModule_viewCheckbookUsualCashTransferList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookUsualCashTransferModule_viewCheckbookUsualCashTransferList.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>bottom</string> <string>hidden</string> </list> </value> @@ -77,7 +77,7 @@ <value> <dictionary> <item> - <key> <string>Default</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransferModule_viewCheckbookVaultTransferList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransferModule_viewCheckbookVaultTransferList.xml index 16e025f7f1..01846d6b25 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransferModule_viewCheckbookVaultTransferList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookVaultTransferModule_viewCheckbookVaultTransferList.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>bottom</string> <string>hidden</string> </list> </value> @@ -77,7 +77,7 @@ <value> <dictionary> <item> - <key> <string>Default</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CkeckbookReceptionModule_viewCheckbookReceptionList.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CkeckbookReceptionModule_viewCheckbookReceptionList.xml index e893683661..21f18db6b9 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CkeckbookReceptionModule_viewCheckbookReceptionList.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CkeckbookReceptionModule_viewCheckbookReceptionList.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>bottom</string> </list> </value> </item> @@ -76,7 +76,7 @@ <value> <dictionary> <item> - <key> <string>Default</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Delivery_viewCheckbookInputDialog.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Delivery_viewCheckbookInputDialog.xml index 6dadc916cb..c08b41179a 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Delivery_viewCheckbookInputDialog.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Delivery_viewCheckbookInputDialog.xml @@ -78,11 +78,13 @@ if item_portal_type_list is None:\n \n if listbox is None:\n \n - node = context.getBaobabSource()\n + if node is None:\n + node = context.getBaobabSource()\n reference_date = DateTime()\n item_list = []\n listbox = []\n getCurrentTrackingList = context.portal_simulation.getCurrentTrackingList\n + context.log(\'current_tracking_list src\',getCurrentTrackingList(at_date=reference_date, node=node))\n current_tracking_list = [x.getObject() for x in getCurrentTrackingList(\n at_date=reference_date, node=node)]\n for item in current_tracking_list:\n @@ -93,8 +95,9 @@ if listbox is None:\n if resource.getProperty(property)!=value:\n exclude=1\n if destination_payment is not None:\n - if destination_payment!=item.getDestinationPayment():\n - exclude=1\n + if item.getDestinationPayment() is not None:\n + if destination_payment!=item.getDestinationPayment():\n + exclude=1\n if not exclude:\n item_portal_type = item.getPortalType()\n if item_portal_type in item_portal_type_list:\n @@ -113,11 +116,13 @@ if listbox is None:\n \n listbox.append(item_dict)\n \n - context.Base_updateDialogForm(listbox=listbox\n - )\n - return context.asContext(context=None\n - , portal_type=context.getPortalType()\n - ).CheckbookDelivery_fastInputForm(**kw)\n +if batch_mode:\n + return listbox\n +context.Base_updateDialogForm(listbox=listbox\n + )\n +return context.asContext(context=None\n + , portal_type=context.getPortalType()\n + ).CheckbookDelivery_fastInputForm(**kw)\n </string> </value> </item> <item> @@ -144,7 +149,7 @@ if listbox is None:\n </item> <item> <key> <string>_params</string> </key> - <value> <string>listbox=None, item_portal_type_list=None,destination_payment=None,model_filter_dict=None,**kw</string> </value> + <value> <string>listbox=None, item_portal_type_list=None,destination_payment=None,model_filter_dict=None,node=None,batch_mode=0,**kw</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -164,7 +169,7 @@ if listbox is None:\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>4</int> </value> + <value> <int>6</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -174,12 +179,13 @@ if listbox is None:\n <string>item_portal_type_list</string> <string>destination_payment</string> <string>model_filter_dict</string> + <string>node</string> + <string>batch_mode</string> <string>kw</string> <string>DateTime</string> <string>None</string> <string>_getattr_</string> <string>context</string> - <string>node</string> <string>reference_date</string> <string>item_list</string> <string>getCurrentTrackingList</string> @@ -213,6 +219,8 @@ if listbox is None:\n <none/> <none/> <none/> + <none/> + <int>0</int> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport.xml new file mode 100644 index 0000000000..dc26374a8f --- /dev/null +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport.xml @@ -0,0 +1,156 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Form.Form</string> + <string>ERP5Form</string> + </tuple> + <none/> + </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></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> + <string>listbox</string> + </list> + </value> + </item> + <item> + <key> <string>center</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>left</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>right</string> </key> + <value> + <list/> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Module_viewItemReport</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>Module_viewItemReport</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>Item Report</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> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport/listbox.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport/listbox.xml new file mode 100644 index 0000000000..686a65c3f8 --- /dev/null +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReport/listbox.xml @@ -0,0 +1,553 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Form.ListBox</string> + <string>ListBox</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>listbox</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>all_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>count_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>domain_root_list</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>domain_tree</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>global_attributes</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>list_action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>meta_types</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>portal_types</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>report_root_list</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>report_tree</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>search</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>search_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>select</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>selection_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>sort</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>sort_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>stat_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>stat_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>url_columns</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>all_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>count_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>domain_root_list</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>domain_tree</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>global_attributes</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>list_action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>meta_types</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>portal_types</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>report_root_list</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>report_tree</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>search</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>search_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>select</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>selection_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>sort</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>sort_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>stat_columns</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>stat_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>url_columns</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>all_columns</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>all_editable_columns</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> + <list> + <tuple> + <string>resource_title</string> + <string>Payment Type</string> + </tuple> + <tuple> + <string>check_amount_title</string> + <string>Payment Variation</string> + </tuple> + <tuple> + <string>reference_range_min</string> + <string>Start Number</string> + </tuple> + <tuple> + <string>reference_range_max</string> + <string>Stop Number</string> + </tuple> + <tuple> + <string>destination_trade</string> + <string>Owner</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>count_method</string> </key> + <value> <string></string> </value> + </item> + <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>default_params</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>domain_root_list</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>domain_tree</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>editable_columns</string> </key> + <value> + <list> + <tuple> + <string>total_quantity</string> + <string>Quantity</string> + </tuple> + <tuple> + <string>total_price</string> + <string>Total Price</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>global_attributes</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>lines</string> </key> + <value> <int>30</int> </value> + </item> + <item> + <key> <string>list_action</string> </key> + <value> <string>list</string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>meta_types</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>portal_types</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>report_root_list</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>report_tree</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>search</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>search_columns</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>select</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>selection_name</string> </key> + <value> <string>counter_report_selection</string> </value> + </item> + <item> + <key> <string>sort</string> </key> + <value> + <list> + <tuple> + <string>resource_title</string> + <string>resource_title</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>sort_columns</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>stat_columns</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>stat_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>listbox</string> </value> + </item> + <item> + <key> <string>url_columns</string> </key> + <value> + <list/> + </value> + </item> + </dictionary> + </value> + </item> + </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.CounterModule_getVaultTransactionList(column_names=1)</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.MethodField</string> + <string>Method</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>method_name</string> </key> + <value> <unicode>Base_getItemList</unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReportDialog.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReportDialog.xml new file mode 100644 index 0000000000..ccdbfac5da --- /dev/null +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReportDialog.xml @@ -0,0 +1,128 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Form.Form</string> + <string>ERP5Form</string> + </tuple> + <none/> + </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>Module_viewItemReport</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> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>left</string> </key> + <value> + <list> + <string>my_vault</string> + </list> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Module_viewItemReportDialog</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>Module_viewItemReportDialog</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_dialog</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>Report</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> diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_aggregate_list.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReportDialog/my_vault.xml similarity index 78% rename from bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_aggregate_list.xml rename to bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReportDialog/my_vault.xml index b123036db1..5000177f57 100644 --- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDeliveryLine_view/my_aggregate_list.xml +++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Module_viewItemReportDialog/my_vault.xml @@ -5,7 +5,7 @@ <tuple> <tuple> <string>Products.Formulator.StandardFields</string> - <string>StringField</string> + <string>ListField</string> </tuple> <none/> </tuple> @@ -14,7 +14,7 @@ <dictionary> <item> <key> <string>id</string> </key> - <value> <string>my_aggregate_list</string> </value> + <value> <string>my_vault</string> </value> </item> <item> <key> <string>message_values</string> </key> @@ -29,8 +29,8 @@ <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> + <key> <string>unknown_selection</string> </key> + <value> <string>You selected an item that was not in the list.</string> </value> </item> </dictionary> </value> @@ -56,27 +56,27 @@ <value> <string></string> </value> </item> <item> - <key> <string>display_maxwidth</string> </key> + <key> <string>editable</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>display_width</string> </key> + <key> <string>enabled</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>editable</string> </key> + <key> <string>external_validator</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>enabled</string> </key> + <key> <string>extra</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>external_validator</string> </key> + <key> <string>extra_item</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>extra</string> </key> + <key> <string>first_item</string> </key> <value> <string></string> </value> </item> <item> @@ -84,7 +84,7 @@ <value> <string></string> </value> </item> <item> - <key> <string>max_length</string> </key> + <key> <string>items</string> </key> <value> <string></string> </value> </item> <item> @@ -92,11 +92,11 @@ <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>size</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> <item> @@ -131,27 +131,27 @@ <value> <string></string> </value> </item> <item> - <key> <string>display_maxwidth</string> </key> + <key> <string>editable</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>display_width</string> </key> + <key> <string>enabled</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>editable</string> </key> + <key> <string>external_validator</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>enabled</string> </key> + <key> <string>extra</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>external_validator</string> </key> + <key> <string>extra_item</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>extra</string> </key> + <key> <string>first_item</string> </key> <value> <string></string> </value> </item> <item> @@ -159,19 +159,21 @@ <value> <string></string> </value> </item> <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> + <key> <string>items</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> </item> <item> <key> <string>required</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>size</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> <item> @@ -205,17 +207,9 @@ <key> <string>description</string> </key> <value> <string></string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <int>20</int> </value> - </item> <item> <key> <string>editable</string> </key> - <value> <int>0</int> </value> + <value> <int>1</int> </value> </item> <item> <key> <string>enabled</string> </key> @@ -229,25 +223,44 @@ <key> <string>extra</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <int>0</int> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <int>0</int> </value> </item> <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> + <key> <string>items</string> </key> + <value> + <list> + <tuple> + <string>a</string> + <string>a</string> + </tuple> + <tuple> + <string>z</string> + <string>z</string> + </tuple> + </list> + </value> </item> <item> <key> <string>required</string> </key> <value> <int>0</int> </value> </item> <item> - <key> <string>title</string> </key> - <value> <string>my_aggregate_list</string> </value> + <key> <string>size</string> </key> + <value> <int>1</int> </value> </item> <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> + <key> <string>title</string> </key> + <value> <string>Vault</string> </value> </item> <item> <key> <string>unicode</string> </key> @@ -263,4 +276,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.Delivery_getVaultItemList(vault_type=(\'site/caveau/auxiliaire\',\'site/surface/caisse_courante\',\'site/surface/banque_interne/guichet\',\'site/surface/operations_diverses/guichet\'), strict_membership=1,leaf_node=0,first_level=1)</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> 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 ce36ba9ca6..19bc67505c 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 @@ -84,9 +84,10 @@ for line in line_list:\n stop_number=aggregate.getReferenceRangeMax())\n for check in aggregate.objectValues(portal_type=\'Check\'):\n check.confirm()\n + check.setStartDate(transaction.getStartDate())\n elif aggregate.getPortalType()==\'Check\':\n - check.setStartDate(transaction.getStartDate())\n - check.confirm()\n + aggregate.setStartDate(transaction.getStartDate())\n + aggregate.confirm()\n </string> </value> </item> <item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/validatePositionAccounting.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/validatePositionAccounting.xml new file mode 100644 index 0000000000..a28e033f2a --- /dev/null +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/validatePositionAccounting.xml @@ -0,0 +1,275 @@ +<?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 encoding="cdata"><![CDATA[ + +from Products.DCWorkflow.DCWorkflow import ValidationFailed\n +from Products.ERP5Type.Message import Message\n +\n +transaction = state_change[\'object\']\n +\n +# First we have to look if we have some checks with some prices,\n +# if so, this means that we are saling such kinds of check, thus\n +# we must change the position of the customer account\n +movement_list = transaction.getMovementList()\n +total_debit = 0\n +for movement in movement_list:\n + aggregate_value_list = movement.getAggregateValueList()\n + for item in aggregate_value_list:\n + if item.getPortalType()==\'Check\':\n + if item.getPrice() is not None:\n + # then we must calculate the exchange value\n + base_price = movement.CurrencyExchange_getExchangeRateList()[0]\n + if base_price is None:\n + msg = Message(domain = "ui", message="Sorry, no valid price was found for this currency")\n + raise ValidationFailed, (msg,)\n + total_debit += base_price*item.getPrice()\n +if total_debit>0:\n + total_debit = round(total_debit+0.5)\n + # Source and destination will be updated automaticaly based on the category of bank account\n + # The default account chosen should act as some kind of *temp* account or *parent* account\n + movement = transaction.get(\'movement\',None)\n + if movement is None:\n + movement = transaction.newContent(portal_type=\'Banking Operation Line\',\n + id=\'movement\',\n + source=\'account_module/bank_account\', # Set default source\n + destination=\'account_module/bank_account\', # Set default destination\n + )\n + movement.setSourceDebit(total_debit)\n + transaction.setSourceTotalAssetPrice(total_debit)\n +\n + line = transaction.movement\n + bank_account = transaction.getDestinationPaymentValue()\n + price = total_debit\n +\n + # this prevents multiple transactions from being committed at the same time for this bank account.\n + bank_account.serialize()\n +\n + # Make sure there are no other operations pending for this account\n + if context.BankAccount_isMessagePending(bank_account):\n + msg = Message(domain=\'ui\', message="There are operations pending for this account that prevent form calculating its position. Please try again later.")\n + raise ValidationFailed, (msg,)\n +\n + # Index the banking operation line so it impacts account position\n + context.BankingOperationLine_index(line)\n +\n + # Test if the account balance is sufficient.\n + error = context.BankAccount_checkBalance(bank_account.getRelativeUrl(), price)\n + if error[\'error_code\'] == 1:\n + msg = Message(domain=\'ui\', message="Bank account is not sufficient.")\n + raise ValidationFailed, (msg,)\n + elif error[\'error_code\'] == 2:\n + msg = Message(domain=\'ui\', message="Bank account is not valid.")\n + raise ValidationFailed, (msg,)\n + elif error[\'error_code\'] != 0:\n + msg = Message(domain=\'ui\', message="Unknown error code.")\n + raise ValidationFailed, (msg,)\n +\n +date = transaction.getStartDate()\n +source = transaction.getSource(None)\n +if source is None:\n + msg = Message(domain=\'ui\', message=\'No counter defined.\')\n + raise ValidationFailed, (msg,)\n +\n +# check we are in an opened accounting day\n +if not transaction.Baobab_checkCounterDateOpen(site=source, date=date):\n + msg = Message(domain = "ui", message="Counter Date is not opened")\n + raise ValidationFailed, (msg,)\n +\n +site = transaction.getSourceValue()\n +\n +if \'guichet\' in site.getVaultType():\n + if not context.Baobab_checkCounterOpened(site):\n + msg = Message(domain = "ui", message="Counter is not opened")\n + raise ValidationFailed, (msg,)\n + + +]]></string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <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> <string>Script (Python):/baobab/portal_workflow/checkbook_delivery_workflow/scripts/validatePositionAccounting</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>state_change, **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>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>state_change</string> + <string>kw</string> + <string>Products.DCWorkflow.DCWorkflow</string> + <string>ValidationFailed</string> + <string>Products.ERP5Type.Message</string> + <string>Message</string> + <string>_getitem_</string> + <string>transaction</string> + <string>_getattr_</string> + <string>movement_list</string> + <string>total_debit</string> + <string>_getiter_</string> + <string>movement</string> + <string>aggregate_value_list</string> + <string>item</string> + <string>None</string> + <string>base_price</string> + <string>msg</string> + <string>round</string> + <string>line</string> + <string>bank_account</string> + <string>price</string> + <string>context</string> + <string>error</string> + <string>date</string> + <string>source</string> + <string>site</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>validatePositionAccounting</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </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> + <value> + <dictionary/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver.xml index a6a8aa950e..6ccb39a49b 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver.xml @@ -60,7 +60,7 @@ </item> <item> <key> <string>script_name</string> </key> - <value> <string></string> </value> + <value> <string>validateSourceAndDestination</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver_action.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver_action.xml index 9c0ffdcbeb..631e88a3d3 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver_action.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/transitions/deliver_action.xml @@ -60,7 +60,7 @@ </item> <item> <key> <string>script_name</string> </key> - <value> <string>validateSourceAndDestination</string> </value> + <value> <string>validatePositionAccounting</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/worklists/checkbook_delivery_worklist.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/worklists/checkbook_delivery_worklist.xml index 2a35e74996..6d0600154d 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/worklists/checkbook_delivery_worklist.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/worklists/checkbook_delivery_worklist.xml @@ -36,7 +36,7 @@ <key> <string>actbox_url</string> </key> <value> <string encoding="cdata"><![CDATA[ -Base_viewWorklist?simulation_state=draft&reset=1 +Base_viewWorklist?simulation_state=draft&reset=1&portal_type=Checkbook Delivery ]]></string> </value> </item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/draft.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/draft.xml index ed4284b79f..898bcef3ca 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/draft.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/draft.xml @@ -41,7 +41,7 @@ Base_viewWorklist?simulation_state=draft&portal_type=Checkbook Vault Transfer&re <item> <key> <string>guard</string> </key> <value> - <none/> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> </item> <item> @@ -51,13 +51,37 @@ Base_viewWorklist?simulation_state=draft&portal_type=Checkbook Vault Transfer&re <item> <key> <string>var_matches</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> </value> </item> </dictionary> </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.DCWorkflow.Guard</string> + <string>Guard</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>roles</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> <pickle> <tuple> <tuple> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/ordered.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/ordered.xml index a99e6cfc64..b02f5217b9 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/ordered.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_vault_transfer_workflow/worklists/ordered.xml @@ -30,7 +30,7 @@ <key> <string>actbox_url</string> </key> <value> <string encoding="cdata"><![CDATA[ -Base_viewWorklist?simulation_state=planned&reset=1&portal_type=Checkbook Vault Transfer +Base_viewWorklist?simulation_state=ordered&reset=1&portal_type=Checkbook Vault Transfer ]]></string> </value> </item> diff --git a/bt5/erp5_banking_check/bt/template_portal_type_base_category_list b/bt5/erp5_banking_check/bt/template_portal_type_base_category_list index 6ad5186587..6ba6f7b7a5 100644 --- a/bt5/erp5_banking_check/bt/template_portal_type_base_category_list +++ b/bt5/erp5_banking_check/bt/template_portal_type_base_category_list @@ -1 +1,3 @@ +Checkbook Delivery Line | check_amount +Checkbook Delivery Line | currency_exchange_type Checkbook Reception Line | check_amount \ No newline at end of file -- 2.30.9