mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
fix pylint
This commit is contained in:
@@ -25,7 +25,8 @@ class ProductTemplate(models.Model):
|
|||||||
""" Clear the relation to contract_template_id when downgrading
|
""" Clear the relation to contract_template_id when downgrading
|
||||||
product from contract
|
product from contract
|
||||||
"""
|
"""
|
||||||
super(ProductTemplate, self)._change_is_contract()
|
res = super(ProductTemplate, self)._change_is_contract()
|
||||||
if not self.is_contract:
|
if not self.is_contract:
|
||||||
self.qty_type = False
|
self.qty_type = False
|
||||||
self.qty_formula_id = False
|
self.qty_formula_id = False
|
||||||
|
return res
|
||||||
|
|||||||
@@ -25,11 +25,12 @@ 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()
|
res = super(SaleOrderLine, self).onchange_product()
|
||||||
for rec in self:
|
for rec in self:
|
||||||
if rec.product_id.is_contract:
|
if rec.product_id.is_contract:
|
||||||
rec.qty_type = rec.product_id.qty_type
|
rec.qty_type = rec.product_id.qty_type
|
||||||
rec.qty_formula_id = rec.product_id.qty_formula_id
|
rec.qty_formula_id = rec.product_id.qty_formula_id
|
||||||
|
return res
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _prepare_contract_line_values(
|
def _prepare_contract_line_values(
|
||||||
|
|||||||
Reference in New Issue
Block a user