Commit 7ac8c7d9 authored by Jérome Perrin's avatar Jérome Perrin

When creating a reversal transaction for an existing transction, the new...

When creating a reversal transaction for an existing transction, the new transaction will have the same causality as the voided transaction (+this transaction itself)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14466 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 59c855c9
...@@ -79,6 +79,9 @@ if is_source:\n ...@@ -79,6 +79,9 @@ if is_source:\n
else:\n else:\n
specific_reference = context.getDestinationReference()\n specific_reference = context.getDestinationReference()\n
\n \n
causality_value_list = context.getCausalityValueList()\n
causality_value_list.append(context)\n
\n
reversal = accounting_module.newContent (\n reversal = accounting_module.newContent (\n
portal_type=context.getPortalType(),\n portal_type=context.getPortalType(),\n
source_section=context.getSourceSection(),\n source_section=context.getSourceSection(),\n
...@@ -93,7 +96,7 @@ reversal = accounting_module.newContent (\n ...@@ -93,7 +96,7 @@ reversal = accounting_module.newContent (\n
\'specific_reference\': specific_reference}),\n \'specific_reference\': specific_reference}),\n
resource=context.getResource(),\n resource=context.getResource(),\n
reference=context.getReference(),\n reference=context.getReference(),\n
causality_value=context,\n causality_value_list=causality_value_list,\n
created_by_builder=1 # XXX to prevent init script to create lines\n created_by_builder=1 # XXX to prevent init script to create lines\n
)\n )\n
\n \n
...@@ -189,6 +192,7 @@ return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n ...@@ -189,6 +192,7 @@ return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n
<string>accounting_module</string> <string>accounting_module</string>
<string>is_source</string> <string>is_source</string>
<string>specific_reference</string> <string>specific_reference</string>
<string>causality_value_list</string>
<string>unicode</string> <string>unicode</string>
<string>reversal</string> <string>reversal</string>
<string>line_list</string> <string>line_list</string>
......
300 301
\ 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