diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode.py b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode.py new file mode 100644 index 0000000000000000000000000000000000000000..838fa3326032df874f77fc475b8a5d632285f276 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode.py @@ -0,0 +1,9 @@ +portal = context.getPortalObject() + +payment_mode_from_trade_condition = None +trade_condition = context.getSpecialiseValue() +if trade_condition is not None: + payment_mode_from_trade_condition = trade_condition.getPaymentConditionPaymentMode() + +return payment_mode_from_trade_condition or portal.portal_selections.getSelectionParamsFor( + 'accounting_create_related_payment_selection').get('payment_mode_for_related_payment') diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode.xml new file mode 100644 index 0000000000000000000000000000000000000000..70e5521f145bd2cf78eba76e95fab612bc2abe6a --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml index 45bb926b103bc3dafdfe14e063ff4701a24d1e2f..be9e08e53ad2f1936e41a27ec16d22f5ccec56b0 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml @@ -265,32 +265,20 @@ </record> <record id="2" aka="AAAAAAAAAAI="> <pickle> - <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> - </tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> </pickle> <pickle> <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_create_related_payment_selection\').get(\'payment_mode_for_related_payment\')</string> </value> + <value> <string>context/Invoice_getCreateRelatedPaymentTransactionDialogDefaultPaymentMode</string> </value> </item> </dictionary> </pickle> </record> <record id="3" aka="AAAAAAAAAAM="> <pickle> - <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> - </tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> </pickle> <pickle> <dictionary>