From 173a471816d7440ca2e6bc9757c865dfb49b2a6d Mon Sep 17 00:00:00 2001 From: remi-filament <30716308+remi-filament@users.noreply.github.com> Date: Mon, 29 Apr 2019 10:18:19 +0200 Subject: [PATCH] Fix pyflakes issue --- repair_refurbish/models/product_template.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repair_refurbish/models/product_template.py b/repair_refurbish/models/product_template.py index a41024d39..3b6935e72 100644 --- a/repair_refurbish/models/product_template.py +++ b/repair_refurbish/models/product_template.py @@ -10,7 +10,8 @@ class ProductTemplate(models.Model): refurbish_product_id = fields.Many2one( comodel_name='product.product', string='Refurbished Product', compute='_compute_refurbish_product', - inverse='_set_refurbish_product', search='_search_refurbish_product', + inverse='_inverse_refurbish_product', + search='_search_refurbish_product', domain="[('type', '=', 'product')]") property_stock_refurbish = fields.Many2one( @@ -31,7 +32,7 @@ class ProductTemplate(models.Model): template.product_variant_ids.refurbish_product_id @api.multi - def _set_refurbish_product(self): + def _inverse_refurbish_product(self): for rec in self: if len(rec.product_variant_ids) == 1: rec.product_variant_ids.refurbish_product_id = \