Skip to content
Snippets Groups Projects
Commit eb332de4 authored by Swapnesh Shah's avatar Swapnesh Shah Committed by GitHub
Browse files

[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: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
parent 5da8c593
Branches
Tags
No related merge requests found
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment