Commit 070020f2 authored by Jérome Perrin's avatar Jérome Perrin

use restrictedTraverse from the portal, to have the original acquisition context.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10536 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e71c8c2
......@@ -107,11 +107,12 @@ params.update(kw)\n
# \'net_balance\' is the sum of balance of all accounts found under the \'gap_id_list\' criterion\n
net_balance = 0.0\n
\n
ctool = context.getPortalObject().portal_categories\n
for gap_id in gap_id_list:\n
gap_path = getURL(gap_id)\n
\n
# Checks the node category exists\n
if context.restrictedTraverse(\'portal_categories/%s\' % gap_path, None) is not None:\n
if ctool.restrictedTraverse(gap_path, None) is not None:\n
params["node_category"] = gap_path\n
new_balance = 0.0\n
\n
......
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