[FIX] mrp: operation type defined on a BOM not chosen
Steps to reproduce the bug: - Create two operation types OP1, OP2 with code = mrp_manufacture - Create a BOM B with operation type = OP2 - Create a MO with B Bug: The operation type set on the MO was OP1 instead of OP2 Technically: The default value was always taken from function _get_default_picking_type opw:2070370 closes odoo/odoo#37029 X-original-commit: 3c5338dce8db7606ac2ac0101473bcafe3bd4f76 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -391,6 +391,7 @@ class MrpProduction(models.Model):
|
||||
def _onchange_bom_id(self):
|
||||
self.product_qty = self.bom_id.product_qty
|
||||
self.product_uom_id = self.bom_id.product_uom_id.id
|
||||
self.picking_type_id = self.bom_id.picking_type_id or self.picking_type_id
|
||||
|
||||
@api.onchange('date_planned_start')
|
||||
def _onchange_date_planned_start(self):
|
||||
|
||||
Reference in New Issue
Block a user