From 5d7a376aab78deea3797a6984c344a19405f0616 Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Mon, 14 Feb 2022 14:19:54 +0000 Subject: [PATCH] [FIX] mrp: list all kit components in delivery slip When printing a delivery slip, if the delivered product is a kit composed with a subkit, the products of this subkit won't be listed To reproduced the issue: 1. Create 5 consumable products: 'Compo 01', 'Compo 02', 'Compo 03', 'Sub Kit', 'Super Kit' 2. Create two phantom-type boms: - Sub kit: - 1 x Compo 02 - 1 x Compo 03 - Super Kit: - 1 x Compo 01 - 1 x Sub Kit 3. Process a delivery with 1 x Super Kit (the picking must be done) 4. Print the delivery slip Error: The report only contains two lines, i.e. the name of the kit ('Super Kit') and the name of the 'direct' component ('Compo 01) The issue comes from the SML used to define `kit_move_lines` (XML side). It uses `has_kits` which only contains the top level kits' SML: https://github.com/odoo/odoo/blob/1b1067b0cf2a3de2773915ff8205084492b1bbe3/addons/mrp/report/report_deliveryslip.xml#L6-L9 This is the reason why the SML for Compo 02 and Compo 03 are not listed OPW-2740247 closes odoo/odoo#84735 X-original-commit: 586f900433eb09ee04d0ed073acfdcfa0fc59d58 Signed-off-by: Tiffany Chang Signed-off-by: Adrien Widart --- addons/mrp/report/report_deliveryslip.xml | 6 +- addons/mrp/tests/test_stock_report.py | 71 +++++++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/addons/mrp/report/report_deliveryslip.xml b/addons/mrp/report/report_deliveryslip.xml index 88370ca6e78..afea6e674da 100644 --- a/addons/mrp/report/report_deliveryslip.xml +++ b/addons/mrp/report/report_deliveryslip.xml @@ -27,6 +27,8 @@