From 21f5771773b1ccd0980b3d80bb6d7efac8145dfe Mon Sep 17 00:00:00 2001 From: fw-bot Date: Mon, 23 Sep 2019 13:01:03 +0000 Subject: [PATCH] [FIX] purchase_stock: RFQ automatically created with an inactive vendor Steps to reproduce the bug: - Let's consider the storable product P and the vendor V - Set V as a supplier of P - Archive V - Go to product P and click on button "Replenish" Bug: A RFQ was created with the vendor V Fine tuning of https://github.com/odoo/odoo/commit/5040c17e873b8476c754f1f3e1686c2a02b36e48 opw:2066616 closes odoo/odoo#37285 Signed-off-by: Nicolas Martinelli (nim) --- addons/product/models/product.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/product/models/product.py b/addons/product/models/product.py index 986a59f5146..af1ec35d97b 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -614,7 +614,7 @@ class ProductProduct(models.Model): 'target': 'new'} def _prepare_sellers(self, params): - return self.seller_ids + return self.seller_ids.filtered(lambda s: s.name.active) @api.multi def _select_seller(self, partner_id=False, quantity=0.0, date=None, uom_id=False, params=False): @@ -805,7 +805,6 @@ class SupplierInfo(models.Model): 'res.partner', 'Vendor', domain=[('supplier', '=', True)], ondelete='cascade', required=True, help="Vendor of this product") - active = fields.Boolean(related='name.active', readonly=True) product_name = fields.Char( 'Vendor Product Name', help="This vendor's product name will be used when printing a request for quotation. Keep empty to use the internal one.")