Commit 77f3a39f authored by Jérome Perrin's avatar Jérome Perrin

Do not set asset price on the reversal transaction if it was not set on the

original transaction.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13579 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2c62cccb
......@@ -123,10 +123,13 @@ for line in line_list:\n
new_line.edit(\n
source=line.getSource(portal_type=\'Account\'),\n
destination=line.getDestination(portal_type=\'Account\'),\n
quantity= - line.getQuantity(),\n
source_total_asset_price= - (line.getSourceTotalAssetPrice() or 0),\n
destination_total_asset_price=\n
- (line.getDestinationTotalAssetPrice() or 0))\n
quantity= - line.getQuantity(), )\n
\n
if line.getSourceTotalAssetPrice():\n
new_line.setSourceTotalAssetPrice( - line.getSourceTotalAssetPrice() )\n
if line.getDestinationTotalAssetPrice():\n
new_line.setDestinationTotalAssetPrice(\n
- line.getDestinationTotalAssetPrice() )\n
\n
# copy some values if they are defined explicitly on line\n
for prop in [ \'source_section\', \'destination_section\',\n
......
220
\ No newline at end of file
221
\ 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