projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e49eede
)
[FIX] account: reconciliation: taking into account that amount_residual can (very...
author
Arthur Maniet
<ama@odoo.com>
Wed, 10 Sep 2014 15:07:07 +0000
(17:07 +0200)
committer
Arthur Maniet
<ama@odoo.com>
Wed, 10 Sep 2014 15:07:07 +0000
(17:07 +0200)
addons/account/account_move_line.py
patch
|
blob
|
history
diff --git
a/addons/account/account_move_line.py
b/addons/account/account_move_line.py
index
c404b93
..
f359289
100644
(file)
--- a/
addons/account/account_move_line.py
+++ b/
addons/account/account_move_line.py
@@
-816,6
+816,12
@@
class account_move_line(osv.osv):
credit = currency_obj.compute(cr, uid, target_currency.id, company_currency.id, credit, context=ctx)
amount_str = rml_parser.formatLang(debit or credit, currency_obj=target_currency)
+ # Amount residual can be negative
+ if debit < 0:
+ debit, credit = credit, -debit
+ if credit < 0:
+ debit, credit = -credit, debit
+
ret_line['credit'] = credit
ret_line['debit'] = debit
ret_line['amount_str'] = amount_str