diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.xml index 464fe1867126d049f315139e5ab6bf9028dc5928..f07f2d56ef912cea5d1f15ae9303d62d4d9bd979 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createReversalTransactionList.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - <tuple/> - </tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> </pickle> <pickle> <dictionary> @@ -84,15 +81,16 @@ tag = \'reversal_creation_%s\' % random.randint(0, 1000)\n activated = 0\n for obj in object_list:\n obj = obj.getObject()\n - if obj.getSimulationState() == \'delivered\':\n - if countMessage(path=obj.getPath(),\n - method_id=\'AccountingTransaction_createReversalTransaction\'):\n - raise Redirect, "%s/view?portal_status_message=%s" % (\n - context.absolute_url(), translateString(\n - \'Reversal creation already in progress, abandon.\'))\n - obj.activate(tag=tag).AccountingTransaction_createReversalTransaction(\n - cancellation_amount=cancellation_amount)\n - activated += 1\n + if countMessage(path=obj.getPath(),\n + method_id=\'AccountingTransaction_createReversalTransaction\'):\n + raise Redirect, "%s/view?portal_status_message=%s" % (\n + context.absolute_url(), translateString(\n + \'Reversal creation already in progress, abandon.\'))\n + obj.activate(tag=tag).AccountingTransaction_createReversalTransaction(\n + cancellation_amount=cancellation_amount,\n + date=date,\n + plan=plan)\n + activated += 1\n \n if not activated:\n return context.Base_redirect(form_id,\n @@ -121,7 +119,7 @@ return context.Base_redirect(form_id,\n </item> <item> <key> <string>_params</string> </key> - <value> <string>cancellation_amount=False, uids=[], listbox_uid=[], selection_name=\'\', form_id=\'view\'</string> </value> + <value> <string>cancellation_amount=False, date=None, plan=False, uids=[], listbox_uid=[], selection_name=\'\', form_id=\'view\'</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -141,13 +139,15 @@ return context.Base_redirect(form_id,\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>5</int> </value> + <value> <int>7</int> </value> </item> <item> <key> <string>co_varnames</string> </key> <value> <tuple> <string>cancellation_amount</string> + <string>date</string> + <string>plan</string> <string>uids</string> <string>listbox_uid</string> <string>selection_name</string> @@ -187,6 +187,8 @@ return context.Base_redirect(form_id,\n <key> <string>func_defaults</string> </key> <value> <tuple> + <int>0</int> + <none/> <int>0</int> <list/> <list/> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog.xml index d10d144831895973bd676e698cabe3d5b23597e2..41404d4cdcdae3bca0cdb45572036a56ba0a80c3 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="ERP5Form" module="Products.ERP5Form.Form"/> - <tuple/> - </tuple> + <global name="ERP5Form" module="Products.ERP5Form.Form"/> </pickle> <pickle> <dictionary> @@ -97,6 +94,8 @@ <value> <list> <string>your_cancellation_amount</string> + <string>your_plan</string> + <string>your_date</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog/your_date.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog/your_date.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c6fca5a8bbd2012b83b2edaa8d125c5bae2102e --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog/your_date.xml @@ -0,0 +1,96 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default_now</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>your_date</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>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default_now</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>your_date</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog/your_plan.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog/your_plan.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7549353a4c83c5cffa3fe2535e981e8905c0e3f --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateReversalTransactionListDialog/your_plan.xml @@ -0,0 +1,168 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="CheckBoxField" module="Products.Formulator.StandardFields"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_plan</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>alternate_name</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>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>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>alternate_name</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>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>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>alternate_name</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> <int>0</int> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Plan the newly created transactions</string> </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>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Plan Transactions</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml index a99e25397dad68699ada7d2dd1cbeddab096ead4..ff6f8554a2bb35bddc76d619608a4951e1fddc1b 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - <tuple/> - </tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> </pickle> <pickle> <dictionary> @@ -92,14 +89,20 @@ reversal = accounting_module.newContent (\n )\n \n # copy dates\n -if context.getStartDate():\n - reversal.setStartDate(context.getStartDate())\n +if date:\n + start_date = stop_date = date\n +else:\n + start_date = context.getStartDate()\n + stop_date = context.getStopDate()\n +\n +if start_date:\n + reversal.setStartDate(start_date)\n \n if context.getStopDate() != context.getStartDate():\n # stop date is currently acquire from start date.\n # we try not to set a stop date on the reversal if it wasn\'t set on the\n # original\n - reversal.setStopDate(context.getStopDate())\n + reversal.setStopDate(stop_date)\n \n if context.getProperty(\'payment_mode\'):\n reversal.setProperty(\'payment_mode\', context.getProperty(\'payment_mode\'))\n @@ -137,6 +140,9 @@ for line in line_list:\n if line.getProperty(prop) != context.getProperty(prop):\n new_line.setProperty(prop, line.getProperty(prop))\n \n +if plan:\n + reversal.plan()\n +\n return reversal.Base_redirect(\'view\',\n keep_items=dict(portal_status_message=\n Base_translateString("Reversal Transaction for ${specific_reference} created.",\n @@ -151,7 +157,7 @@ return reversal.Base_redirect(\'view\',\n </item> <item> <key> <string>_params</string> </key> - <value> <string>cancellation_amount=False</string> </value> + <value> <string>cancellation_amount=False, date=None, plan=False</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -171,13 +177,15 @@ return reversal.Base_redirect(\'view\',\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>1</int> </value> + <value> <int>3</int> </value> </item> <item> <key> <string>co_varnames</string> </key> <value> <tuple> <string>cancellation_amount</string> + <string>date</string> + <string>plan</string> <string>_getattr_</string> <string>context</string> <string>Base_translateString</string> @@ -187,6 +195,8 @@ return reversal.Base_redirect(\'view\',\n <string>causality_value_list</string> <string>unicode</string> <string>reversal</string> + <string>start_date</string> + <string>stop_date</string> <string>line_list</string> <string>_getitem_</string> <string>line_portal_type</string> @@ -208,6 +218,8 @@ return reversal.Base_redirect(\'view\',\n <value> <tuple> <int>0</int> + <none/> + <int>0</int> </tuple> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog.xml index a4713d6b025dd701489c5e08ef5040328dd85ef5..ef6680fe2f60b8f55cea3a620c920424cda49dae 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="ERP5Form" module="Products.ERP5Form.Form"/> - <tuple/> - </tuple> + <global name="ERP5Form" module="Products.ERP5Form.Form"/> </pickle> <pickle> <dictionary> @@ -97,6 +94,8 @@ <value> <list> <string>your_cancellation_amount</string> + <string>your_plan</string> + <string>your_date</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog/your_date.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog/your_date.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c6fca5a8bbd2012b83b2edaa8d125c5bae2102e --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog/your_date.xml @@ -0,0 +1,96 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default_now</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>your_date</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>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default_now</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>your_date</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog/your_plan.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog/your_plan.xml new file mode 100644 index 0000000000000000000000000000000000000000..42b9adbdb36f39130af971c10899716d04ecccb9 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewCreateReversalTransactionDialog/your_plan.xml @@ -0,0 +1,168 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="CheckBoxField" module="Products.Formulator.StandardFields"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_plan</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>alternate_name</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>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>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>alternate_name</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>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>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>alternate_name</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> <int>0</int> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Plan the newly created transaction</string> </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>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Plan Transaction</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 2796f968cf167e1da171b10cf6f0bd16660c2076..987afa83193c6123ab5ff73a4f6e4197bf326b61 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1352 \ No newline at end of file +1353 \ No newline at end of file