Commit 1f59904d authored by Vincent Pelletier's avatar Vincent Pelletier

Uniformise currency conversion code.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44625 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 239e1293
......@@ -71,7 +71,10 @@ if exchange_line.getBasePrice() in (None, 0, 0.0):\n
\n
\n
# We have to looking for other currency exchanges lines\n
temp_object = exchange_line.getParentValue().newContent(portal_type="Currency Exchange Line", temp_object=True)\n
# Note: SupplyCell is the class of Currency Exchange Line portal type objects\n
# But in reality, anything should do.\n
from Products.ERP5Type.Document import newTempSupplyCell as newTemp\n
temp_object = newTemp(context.getPortalObject(),\'temp_object\')\n
start_date = exchange_line.getStartDate()\n
temp_kw = {\'category_list\':[\'resource/%s\' % exchange_line.getParentValue().getRelativeUrl(),\n
\'price_currency/%s\' % exchange_line.getPriceCurrency()],\n
......@@ -154,7 +157,8 @@ for line in line_list:\n
<string>None</string>
<string>msg</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>newTempSupplyCell</string>
<string>newTemp</string>
<string>context</string>
<string>temp_object</string>
<string>start_date</string>
......
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