mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] - fix onchange
This commit is contained in:
@@ -26,9 +26,10 @@ class SaleOrderLine(models.Model):
|
|||||||
@api.onchange('product_id')
|
@api.onchange('product_id')
|
||||||
def onchange_product(self):
|
def onchange_product(self):
|
||||||
super(SaleOrderLine, self).onchange_product()
|
super(SaleOrderLine, self).onchange_product()
|
||||||
if self.product_id.is_contract:
|
for rec in self:
|
||||||
self.qty_type = self.product_id.qty_type
|
if rec.product_id.is_contract:
|
||||||
self.qty_formula_id = self.product_id.qty_formula_id
|
rec.qty_type = rec.product_id.qty_type
|
||||||
|
rec.qty_formula_id = rec.product_id.qty_formula_id
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _prepare_contract_line_values(self, contract):
|
def _prepare_contract_line_values(self, contract):
|
||||||
|
|||||||
Reference in New Issue
Block a user