diff options
| author | Goffin Simon <sig@odoo.com> | 2020-03-26 13:10:21 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-03-30 07:07:09 +0000 |
| commit | 2683b1f07320ccadc5d08dab28a37bb5b6162e1c (patch) | |
| tree | 5beab13760a6138e5c7b7d5d1e81119bb2b48a98 /addons | |
| parent | 5569768ec2473cd2aa378d5f9d55c20c10fd2507 (diff) | |
[FIX] mrp: Impossible to create a lot from MO
Steps to reproduce the bug:
- Let consider a user U from a single company C (Multi companies = False)
- Let's consider a BOM B for a finished product FP with product P1 as component and product P2 as byproduct
- Let's consider that P2 is tracked by lot
- Log as U and create a MO for FP
- Produce the MO
Bug:
A widard was opened but it was impossible to create a lot for P2
opw:2216028
closes odoo/odoo#48556
X-original-commit: 30ebdee091362b8c857bdcad2bdf44bd698572c4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mrp/wizard/mrp_product_produce_views.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp/wizard/mrp_product_produce_views.xml b/addons/mrp/wizard/mrp_product_produce_views.xml index e87bd3235f7..4d9d1598c3d 100644 --- a/addons/mrp/wizard/mrp_product_produce_views.xml +++ b/addons/mrp/wizard/mrp_product_produce_views.xml @@ -49,7 +49,7 @@ <field name="company_id" invisible="1"/> <field name="product_id" attrs="{'readonly': [('move_id', '!=', False)]}" required="1" domain="[('id', '!=', parent.product_id), ('type', 'in', ['product', 'consu']), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]" force_save="1"/> <field name="product_tracking" invisible="1"/> - <field name="lot_id" attrs="{'readonly': [('product_tracking', '=', 'none')]}" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/> + <field name="lot_id" attrs="{'readonly': [('product_tracking', '=', 'none')]}" context="{'default_product_id': product_id, 'default_company_id': company_id}" groups="stock.group_production_lot"/> <field name="qty_to_consume" string="To Produce" readonly="1" force_save="1"/> <field name="qty_done" string="Produced"/> <field name="product_uom_id" readonly="1" force_save="1" groups="uom.group_uom"/> |
