Merge lp:~camptocamp/account-financial-tools/fix-1189922 into lp:~account-core-editors/account-financial-tools/7.0
Proposed by
Nicolas Bessi - Camptocamp
Status: | Merged |
---|---|
Merged at revision: | 115 |
Proposed branch: | lp:~camptocamp/account-financial-tools/fix-1189922 |
Merge into: | lp:~account-core-editors/account-financial-tools/7.0 |
Diff against target: |
15 lines (+4/-2) 1 file modified
account_constraints/account_constraints.py (+4/-2) |
To merge this branch: | bzr merge lp:~camptocamp/account-financial-tools/fix-1189922 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yannick Vaucher @ Camptocamp | code | Approve | |
Guewen Baconnier @ Camptocamp | code review, no test | Approve | |
Review via email: mp+168678@code.launchpad.net |
Description of the change
fix bug 1189922 that prevents validation of invoices with 0% export tax. Because it creates zero amount move line(s).
To post a comment you must log in.
Why do you cast bool for the first condition?
This condition leads to confusion especially when we have to deal with the precedence (+ has a higher precedence than 'not', while 'and' has a lower precedence than 'not').
Seems simpler to me:
if not (l.debit and l.credit): amount_ currency) :
continue
if bool(l.currency_id) != bool(l.
return False