summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSwapnesh Shah <swapneshshah111@gmail.com>2021-05-02 19:39:13 +0000
committerGitHub <noreply@github.com>2021-05-02 19:39:13 +0000
commiteb332de42a36b7235d5578d39d345a5ff1df7759 (patch)
tree919fce1d4710ef3246fa3d0d116e313abca68f58 /addons
parent5da8c593353edcae4540bec696e259031f2d60f5 (diff)
[FIX] mrp: allow to select product w/o bom
Without this commit, User was not allowed to create Unbuild Order for the product without BoMs from Unbuild Orders menu. But User was able to create Unbuild Order using 'Unbuild Order' button on MO. With this commit, We are allowing user to select Products without BoMs to make this behavior consistent so user can create Unbuild Order from Unbuild Orders menu. closes odoo/odoo#70217 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/mrp/models/mrp_unbuild.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp/models/mrp_unbuild.py b/addons/mrp/models/mrp_unbuild.py
index 03eb22dbf00..6f2c9dfc4de 100644
--- a/addons/mrp/models/mrp_unbuild.py
+++ b/addons/mrp/models/mrp_unbuild.py
@@ -15,7 +15,7 @@ class MrpUnbuild(models.Model):
name = fields.Char('Reference', copy=False, readonly=True, default=lambda x: _('New'))
product_id = fields.Many2one(
'product.product', 'Product', check_company=True,
- domain="[('bom_ids', '!=', False), '|', ('company_id', '=', False), ('company_id', '=', company_id)]",
+ domain="[('type', 'in', ['product', 'consu']), '|', ('company_id', '=', False), ('company_id', '=', company_id)]",
required=True, states={'done': [('readonly', True)]})
company_id = fields.Many2one(
'res.company', 'Company',