← Back to team overview

savoirfairelinux-openerp team mailing list archive

Re: [Merge] lp:~savoirfairelinux-openerp/openerp-canada/7.0-bug-missing-amount_in_word-proforma_voucher into lp:openerp-canada

 

Review: Needs Fixing code review, no test

l.26, a few comments:
Convention is to use:
        if context is None:
            context = {}
        if isinstance(ids, (int, long)):
            ids = [ids]

l.30-41 you want to use `for id in ids:` to avoid an index error if len(ids) == 0 or missed cases if len(ids) > 1
l.32 Have you considered cases where partner_id is a BrowseNull object?
l.37 Try using context=context for consistency
l.41 forgot to propagate context here

l.8,17,52: you're doing some pep8 fixes but you left the following 13, I would personally not touch any code I am not modifying in order to not screw up bzr annotate, or I would fix all the pep8 errors in a separate commit.
account_voucher.py:33:1: E302 expected 2 blank lines, found 1
account_voucher.py:38:5: F841 local variable 'context' is assigned to but never used
account_voucher.py:41:1: E302 expected 2 blank lines, found 1
account_voucher.py:47:5: F841 local variable 'cents' is assigned to but never used
account_voucher.py:52:9: F841 local variable 'stars' is assigned to but never used
account_voucher.py:53:5: F841 local variable 'AND' is assigned to but never used
account_voucher.py:59:1: E302 expected 2 blank lines, found 1
account_voucher.py:113:17: E123 closing bracket does not match indentation of opening bracket's line
account_voucher.py:115:13: E123 closing bracket does not match indentation of opening bracket's line
account_voucher.py:142:1: E302 expected 2 blank lines, found 1
account_voucher.py:144:1: W293 blank line contains whitespace
account_voucher.py:150:12: E225 missing whitespace around operator
account_voucher.py:156:1: W293 blank line contains whitespace

-- 
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-canada/7.0-bug-missing-amount_in_word-proforma_voucher/+merge/207570
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openerp-canada/7.0-bug-missing-amount_in_word-proforma_voucher.


References