[FIX] account : Added the company_id in product_id_change method in account_anglo_saxon module
lp bug: https://launchpad.net/bugs/813329 fixed bzr revid: bde@tinyerp.com-20110721095935-fm8t1pq9rg2rgdts
This commit is contained in:
parent
d844fd133b
commit
5783538775
|
@ -136,11 +136,11 @@ class account_invoice_line(osv.osv):
|
|||
res += diff_res
|
||||
return res
|
||||
|
||||
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
|
||||
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
|
||||
if not product:
|
||||
return super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context)
|
||||
return super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context, company_id)
|
||||
else:
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context)
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context, company_id)
|
||||
|
||||
if type in ('in_invoice','in_refund'):
|
||||
product_obj = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
||||
|
|
Loading…
Reference in New Issue