Review: Needs Fixing

        -                        return i.id
18      +                        if context:
19      +                            invoice.write(cr, uid, [i.id], 
{'date_invoice': context['date_inv']})
20      +                        continue

your code will break if there is no date_invoice key in the context.
The check should be for date exist in context i.e context.has_key(date_inv) if 
there is no date then its useless to call a write here. also use 
context.get(date_inv) to get the value.

Thanks,
Naresh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579389-nep/+merge/126430
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-579389-nep.

_______________________________________________
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