Commit fceafecc authored by Jérome Perrin's avatar Jérome Perrin

don't initialise tax line if the order already contains tax lines

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20551 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae642eab
......@@ -145,7 +145,8 @@ def initialiseTaxLineList(order, trade_condition):\n
for specialised_trade_condition in trade_condition.getSpecialiseValueList():\n
initialiseTaxLineList(order, specialised_trade_condition)\n
\n
initialiseTaxLineList(context, trade_condition)\n
if not len(context.contentValues(portal_type=\'Tax Line\')):\n
initialiseTaxLineList(context, trade_condition)\n
\n
# set specialise\n
new_category_dict[\'specialise\'] = trade_condition.getRelativeUrl()\n
......@@ -167,6 +168,12 @@ order.edit(**new_category_dict)\n
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>trade_condition, force=0</string> </value>
......@@ -209,6 +216,7 @@ order.edit(**new_category_dict)\n
<string>_write_</string>
<string>copyObjects</string>
<string>initialiseTaxLineList</string>
<string>len</string>
<string>_apply_</string>
</tuple>
</value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment