Commit ae906ca8 authored by Fabien Morin's avatar Fabien Morin

copy the price_currency into the ressource on apply model

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25456 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e0e0315a
......@@ -61,7 +61,7 @@ paysheet = context\n
# copy categories\n
category_list = [\n
\'destination_section\', \'source_section\', \'source_payment\',\n
\'destination_payment\', \'price_currency\', \'ressource\',\n
\'destination_payment\', \'price_currency\',\n
]\n
new_category_dict = {}\n
\n
......@@ -88,6 +88,11 @@ for category in category_list:\n
if v:\n
new_category_dict[category] = v\n
\n
# copy the price_currency into the ressource :\n
price_currency = getPropertyFromModel(model, category)\n
if price_currency:\n
new_category_dict[\'resource\'] = price_currency\n
\n
def copyPaymentCondition(paysheet, model):\n
filter_dict = {\'portal_type\': \'Payment Condition\'}\n
to_copy = model.contentIds(filter=filter_dict)\n
......@@ -172,6 +177,7 @@ if not batch_mode:\n
<string>category</string>
<string>v</string>
<string>_write_</string>
<string>price_currency</string>
<string>copyPaymentCondition</string>
<string>filter_dict</string>
<string>list</string>
......
352
\ No newline at end of file
353
\ No newline at end of file
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