Commit 3b5b48dc authored by Jérome Perrin's avatar Jérome Perrin

fix operator priority in _edit ( - has priority over or )



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14130 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b2db43b1
......@@ -761,7 +761,8 @@ class Movement(XMLObject, Amount):
"""
quantity = 0
if kw.has_key('source_debit') and kw.has_key('source_credit'):
quantity += (kw.pop('source_credit') or 0 - kw.pop('source_debit') or 0)
quantity += ((kw.pop('source_credit') or 0) -
(kw.pop('source_debit') or 0))
kw['quantity'] = quantity
if kw.has_key('destination_debit') and kw.has_key('destination_credit'):
quantity += (kw.pop('destination_debit') or 0 -
......
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