Review: Needs Fixing

If you *never* want to enter the 'if' body when being called from the wizard, 
don't make the condition more complicated *only* in the right part of the 'or'.

For instance this is much more readable:

if context.get('fy_closing'):
    # We don't want to generate any write-off when being called from the
    # wizard used to close a fiscal year (and it doesn't give us any
    # writeoff_acc_id).
    pass
elif <existing condition>:
    ...
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-16328-ado/+merge/70002
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-16328-ado.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to