From 58a7f6cc61372bac82d36fc9a6e77a29ed3df904 Mon Sep 17 00:00:00 2001 From: "Abdelouahab (abla)" Date: Mon, 24 Jul 2023 08:51:34 +0000 Subject: [PATCH] [FIX] stock: don't require lot_id on reporting/location To Reproduce ============= - enable multi step routes - edit Receipts operation and uncheck the two options under Traceability - create storable product with Traceability using lot/serial number - make purchase of this product and receive it in your inventory - under inventory/reports/Locations click on line of this product you will be stuck at that page even if you click discard Problem ======= There is an inconsistency between the view and backend, as we allow receiving traceable product without setting `lot_id`, but in view require `lot_id` if tracking is enabled on product. Solution ======== following this [comment](https://github.com/odoo/odoo/blob/16.0/addons/stock/models/stock_move_line.py#L558-L560), `lot_id` shouldn't be required on view. opw-3422259 closes odoo/odoo#130793 X-original-commit: 768b1755909fa10c39a51c68675b7aa99c91b462 Signed-off-by: Arnold Moyaux (arm) Signed-off-by: Abdelouahab Laaroussi (abla) --- addons/stock/views/stock_quant_views.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/stock/views/stock_quant_views.xml b/addons/stock/views/stock_quant_views.xml index 5a2d462e3df..877efbe61c5 100644 --- a/addons/stock/views/stock_quant_views.xml +++ b/addons/stock/views/stock_quant_views.xml @@ -135,8 +135,7 @@ attrs="{'readonly': [('id', '!=', False)]}"/>