if you don't give the company_id in the context, then it may fail, and you're 
not giving any special context for the invoice validation.

Also, the key used in the context should be 'force_company', as it will be that 
key that will be used for ir.property fields treatment in v6.1

so what you should do is:
company_id = user.company_id.id
if context.get('force_company',False):
   company_id = context['company_id']

(where user is a browse_record of uid.

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-5852-pso/+merge/66682
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-5852-pso.

_______________________________________________
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