[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>
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user