From 126b15cbbfa2df383d6a6106ca94ccbb9abd7264 Mon Sep 17 00:00:00 2001 From: Unai Beristain Date: Wed, 19 Jun 2024 11:41:15 +0200 Subject: [PATCH] [IMP] Improvements --- mrp_bom_structure_xlsx_cost/report/bom_structure_xlsx.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mrp_bom_structure_xlsx_cost/report/bom_structure_xlsx.py b/mrp_bom_structure_xlsx_cost/report/bom_structure_xlsx.py index 5d02c29d9..33a83a6c8 100644 --- a/mrp_bom_structure_xlsx_cost/report/bom_structure_xlsx.py +++ b/mrp_bom_structure_xlsx_cost/report/bom_structure_xlsx.py @@ -18,15 +18,10 @@ def print_bom_children(self, ch, sheet, row, level): sheet.write(i, 1, "> " * j) sheet.write(i, 2, ch.product_id.default_code or "") sheet.write(i, 3, ch.product_id.display_name or "") - sheet.write( - i, - 4, - ch.product_uom_id._compute_quantity(ch.product_qty, ch.product_id.uom_id) - or "", - ) + sheet.write(i, 4, ch.product_uom_id._compute_quantity(ch.product_qty, ch.product_id.uom_id) or "",) sheet.write(i, 5, ch.product_id.uom_id.name or "") sheet.write(i, 6, ch.bom_id.code or "") - sheet.write(i, 7, ch.product_uom_id._compute_quantity(ch.product_qty, ch.product_id.uom_id) * ch.product_id.standard_price or 0) + sheet.write(i, 7, '{:.4f}'.format(ch.product_uom_id._compute_quantity(ch.product_qty, ch.product_id.uom_id) * ch.product_id.standard_price or 0).replace('.', ',')) i += 1 # self.env.cache.invalidate()