From 4385307f4ee7b093e905e94fd163961be41e5255 Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Thu, 9 Sep 2021 09:26:02 +0000 Subject: [PATCH] [FIX] mrp: create MO from a mobile It is currently impossible to create a MO from a mobile if there are some work orders To reproduce the issue: 1. In Settings, enable "Work Orders" 2. Create two products P_finished, P_compo 3. Create a BoM: - Product: P_finished - Components: - 1 x P_compo - Operations: - Create a new one 4. Switch to mobile mode 5. Create a MO with P_finished Error: When saving the MO, a Validation Error is raised "The operation cannot be completed: - Create/update: a mandatory field is not set. [...] Model: Work Order (mrp.workorder), Field: Unit of Measure (product_uom_id)" For a work order to be created, the request needs to provide one additional field: `product_uom_id`. When setting the product P_finished, `product_uom_id` is returned but not included in the save request (because the field is declared as `readonly`) OPW-2557181 closes odoo/odoo#76572 X-original-commit: 57c5e06f4f6de60ebc8b933ed327613588256273 Signed-off-by: Arnold Moyaux Signed-off-by: Adrien Widart --- addons/mrp/views/mrp_workorder_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/views/mrp_workorder_views.xml b/addons/mrp/views/mrp_workorder_views.xml index f535198fda6..27eed61c81c 100644 --- a/addons/mrp/views/mrp_workorder_views.xml +++ b/addons/mrp/views/mrp_workorder_views.xml @@ -381,7 +381,7 @@ - +