Code review comment for lp:~camptocamp/account-financial-tools/fix-1189922

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

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):
        continue
    if bool(l.currency_id) != bool(l.amount_currency):
        return False

review: Needs Fixing

« Back to merge proposal