summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorfw-bot <otis@odoo.com>2019-09-23 13:01:03 +0000
committerGoffin Simon <sig@odoo.com>2019-09-23 13:42:31 +0000
commit21f5771773b1ccd0980b3d80bb6d7efac8145dfe (patch)
treeebcb0761a38f3659cf652a0c9ea4871e14ec1d0a /addons
parent2efc7b4c67f724faa953843827673bf0beef1dd6 (diff)
[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) <nim@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/product/models/product.py3
1 files changed, 1 insertions, 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.")