Commit 6bd0b623 authored by Jérome Perrin's avatar Jérome Perrin

This assert was wrong, for example when a transaction contained multiple lines grouped together

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31818 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f63b1874
......@@ -60,11 +60,15 @@ will be kept as is if the group is still valid, ie. the total quantity\n
of all accounting lines in the group is 0.\n
Returns the list of ungroupped lines.\n
"""\n
\n
if not context.getGroupingReference():\n
# The line grouping reference can alredy have been removed, for example when two\n
# lines of the same transaction have the same grouping reference.\n
return []\n
\n
portal = context.getPortalObject()\n
precision = context.getResourceValue(portal_type=\'Currency\').getQuantityPrecision()\n
\n
assert context.getGroupingReference()\n
\n
if context.AccountingTransaction_isSourceView():\n
node_uid = context.getSourceUid()\n
section_category = None\n
......@@ -137,7 +141,6 @@ return line_list\n
<string>context</string>
<string>portal</string>
<string>precision</string>
<string>AssertionError</string>
<string>node_uid</string>
<string>None</string>
<string>section_category</string>
......
1086
\ No newline at end of file
1087
\ 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