[FIX] purchase: fixed onchange of product that wasn't setting the supplier taxes
This commit is contained in:
@@ -582,20 +582,8 @@ class PurchaseOrderLine(models.Model):
|
|||||||
if product_lang.description_purchase:
|
if product_lang.description_purchase:
|
||||||
self.name += '\n' + product_lang.description_purchase
|
self.name += '\n' + product_lang.description_purchase
|
||||||
|
|
||||||
taxes = self.product_id.supplier_taxes_id
|
|
||||||
fpos = self.order_id.fiscal_position_id
|
fpos = self.order_id.fiscal_position_id
|
||||||
if fpos:
|
self.taxes_id = fpos.map_tax(self.product_id.supplier_taxes_id)
|
||||||
self.taxes_id = fpos.map_tax(taxes)
|
|
||||||
|
|
||||||
result['value'] = {
|
|
||||||
'name': self.name,
|
|
||||||
'product_uom': self.product_uom.id,
|
|
||||||
'product_qty': self.product_qty,
|
|
||||||
'date_planned': self.date_planned,
|
|
||||||
'taxes_id': self.taxes_id.ids,
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
class ProcurementRule(models.Model):
|
class ProcurementRule(models.Model):
|
||||||
|
|||||||
Reference in New Issue
Block a user