[FIX] sale_journal: onchange_partner_id now takes context as argument

bzr revid: qdp-launchpad@openerp.com-20121126133557-7m75ke3smfwano6s
This commit is contained in:
Quentin (OpenERP) 2012-11-26 14:35:57 +01:00
parent dc4016bb48
commit cc69b33102
1 changed files with 3 additions and 3 deletions

View File

@ -87,10 +87,10 @@ class sale(osv.osv):
result.update(invoice_type_id=order.invoice_type_id and order.invoice_type_id.id or False)
return result
def onchange_partner_id(self, cr, uid, ids, part):
result = super(sale, self).onchange_partner_id(cr, uid, ids, part)
def onchange_partner_id(self, cr, uid, ids, part, context=None):
result = super(sale, self).onchange_partner_id(cr, uid, ids, part, context=context)
if part:
itype = self.pool.get('res.partner').browse(cr, uid, part).property_invoice_type
itype = self.pool.get('res.partner').browse(cr, uid, part, context=context).property_invoice_type
if itype:
result['value']['invoice_type_id'] = itype.id
return result