From 70b09b1e4c1ab73edcb19ff61e645ca0383cc526 Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Mon, 30 Sep 2019 14:25:09 +0200 Subject: [PATCH] fix pylint --- product_contract_variable_quantity/models/product_template.py | 3 ++- product_contract_variable_quantity/models/sale_order_line.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/product_contract_variable_quantity/models/product_template.py b/product_contract_variable_quantity/models/product_template.py index ad039bf2..a99ae9aa 100644 --- a/product_contract_variable_quantity/models/product_template.py +++ b/product_contract_variable_quantity/models/product_template.py @@ -25,7 +25,8 @@ class ProductTemplate(models.Model): """ Clear the relation to contract_template_id when downgrading product from contract """ - super(ProductTemplate, self)._change_is_contract() + res = super(ProductTemplate, self)._change_is_contract() if not self.is_contract: self.qty_type = False self.qty_formula_id = False + return res diff --git a/product_contract_variable_quantity/models/sale_order_line.py b/product_contract_variable_quantity/models/sale_order_line.py index 2f211edb..d66b9874 100644 --- a/product_contract_variable_quantity/models/sale_order_line.py +++ b/product_contract_variable_quantity/models/sale_order_line.py @@ -25,11 +25,12 @@ class SaleOrderLine(models.Model): @api.onchange('product_id') def onchange_product(self): - super(SaleOrderLine, self).onchange_product() + res = super(SaleOrderLine, self).onchange_product() for rec in self: if rec.product_id.is_contract: rec.qty_type = rec.product_id.qty_type rec.qty_formula_id = rec.product_id.qty_formula_id + return res @api.multi def _prepare_contract_line_values(