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 ...@@ -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 of all accounting lines in the group is 0.\n
Returns the list of ungroupped lines.\n Returns the list of ungroupped lines.\n
"""\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 portal = context.getPortalObject()\n
precision = context.getResourceValue(portal_type=\'Currency\').getQuantityPrecision()\n precision = context.getResourceValue(portal_type=\'Currency\').getQuantityPrecision()\n
\n \n
assert context.getGroupingReference()\n
\n
if context.AccountingTransaction_isSourceView():\n if context.AccountingTransaction_isSourceView():\n
node_uid = context.getSourceUid()\n node_uid = context.getSourceUid()\n
section_category = None\n section_category = None\n
...@@ -137,7 +141,6 @@ return line_list\n ...@@ -137,7 +141,6 @@ return line_list\n
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>precision</string> <string>precision</string>
<string>AssertionError</string>
<string>node_uid</string> <string>node_uid</string>
<string>None</string> <string>None</string>
<string>section_category</string> <string>section_category</string>
......
1086 1087
\ No newline at end of file \ 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