Commit dc90ca2d authored by Nicolas Dumazet's avatar Nicolas Dumazet

fix Transformation_viewGlobalReport:

* it is incorrect to pass a Transformation object as an argument to
   getAggregatedAmountList, as it is not an Amount.
* hacking the REQUEST to pass it to asContext just to set variation_category on
   the new temp Document was quite nasty


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33902 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a4b678cc
......@@ -53,9 +53,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n
request.other[\'categories\'] = reference_variation_category_list\n
tmp_context = context.asContext(context=context, REQUEST=request)\n
<value> <string>from Products.ERP5Type.Document import newTempAmount\n
tmp_context = newTempAmount(context, "temp_context",\n
quantity=1.0,\n
variation_category_list=reference_variation_category_list,\n
resource=context.getRelativeUrl()) \n
price_currency = kw.get(\'price_currency\', None)\n
\n
result = context.getAggregatedAmountList(tmp_context)\n
......@@ -107,10 +109,10 @@ return result\n
<tuple>
<string>reference_variation_category_list</string>
<string>kw</string>
<string>_getattr_</string>
<string>Products.ERP5Type.Document</string>
<string>newTempAmount</string>
<string>context</string>
<string>request</string>
<string>_write_</string>
<string>_getattr_</string>
<string>tmp_context</string>
<string>None</string>
<string>price_currency</string>
......
481
\ No newline at end of file
482
\ 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