← 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

 

l.124 functions which gets from context should start with the following like you did on l.114
    if context is None:
        context = {}
then, l.128 to l.138 can be simplified to
    # get lang
    supplier_lang = context.get('lang', config.get('lang'))
    if i_id is not None:
        partner_id = self.browse(cr, uid, i_id, context=context).partner_id
        if partner_id:
            supplier_lang = partner_id.lang

l.140 I am really not a fan of context.copy, I have seen it cause hard to debug problems before: try using context=dict(context, lang=supplier_lang) on l.150, it's clearer to read and you don't get stuck with two separate contexts
-- 
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