From 12406c3449d20a999dcb61126e5bc6e86404f41e Mon Sep 17 00:00:00 2001 From: svs-odoo Date: Mon, 4 Dec 2023 14:34:12 +0100 Subject: [PATCH] [FIX] stock: update stock.move form view The `stock.move` form view used for the detailed operation is also used when using Odoo on a mobile device and is not usable in such case (for example, the `product_id` is readonly.) To fix this issue, the view is modified this way: - The `product_id` is readonly only if the move has a id or already a move line (that way, the field is editable when creating a new move but is still readonly otherwise); - The `move_line_ids` is readonly until the move's product is set; - The demand qty. and the UoM are editable if the move is draft. Also, some similar mofifications are done to the `stock.move.line` form view too. OPW-3577844 Part-of: odoo/odoo#144282 --- addons/stock/views/stock_move_line_views.xml | 9 ++++++--- addons/stock/views/stock_move_views.xml | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/addons/stock/views/stock_move_line_views.xml b/addons/stock/views/stock_move_line_views.xml index 4dc203f5c0d..2eff0e12b16 100644 --- a/addons/stock/views/stock_move_line_views.xml +++ b/addons/stock/views/stock_move_line_views.xml @@ -73,12 +73,13 @@ + - + @@ -88,8 +89,10 @@ - - + + diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index 65e4c4ed542..c81b28d9ba1 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -160,11 +160,11 @@ - + @@ -174,7 +174,7 @@