From b9607c983f6c94988162aecdc03ebf4c6a49fd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 24 Aug 2009 09:34:54 +0000 Subject: [PATCH] When we apply trade condition on an invoice transaction, we can also initialise the resource using price currency git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28573 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_trade/Order_applyTradeCondition.xml | 6 ++++++ bt5/erp5_trade/bt/revision | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_applyTradeCondition.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_applyTradeCondition.xml index be731ff21a..6027eecad1 100644 --- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_applyTradeCondition.xml +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_applyTradeCondition.xml @@ -87,6 +87,12 @@ for category in category_list:\n v = getPropertyFromTradeCondition(trade_condition, category)\n if v:\n new_category_dict[category] = v\n + # for accounting transactions, we also initialize resource with the price\n + # currency\n + if category == \'price_currency\' and \\\n + context.getPortalType() in \\\n + context.getPortalAccountingTransactionTypeList():\n + new_category_dict[\'resource\'] = v\n \n \n def copyPaymentCondition(order, trade_condition):\n diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index 0fce07d0e3..849eaf846a 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -721 \ No newline at end of file +722 \ No newline at end of file -- 2.30.9