From 95d4cd39d007683452eed70237c38af86bef619c Mon Sep 17 00:00:00 2001 From: Magno Costa Date: Tue, 28 Nov 2023 16:00:59 -0300 Subject: [PATCH] [REF] stock_picking_invoicing: Avoid duplicate Name/Label in Invoice Line when Grouping Pickings by Partner/Product. --- stock_picking_invoicing/wizards/stock_invoice_onshipping.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stock_picking_invoicing/wizards/stock_invoice_onshipping.py b/stock_picking_invoicing/wizards/stock_invoice_onshipping.py index 2e18f729057..f316e37ea69 100644 --- a/stock_picking_invoicing/wizards/stock_invoice_onshipping.py +++ b/stock_picking_invoicing/wizards/stock_invoice_onshipping.py @@ -430,7 +430,6 @@ def _get_invoice_line_values(self, moves, invoice_values, invoice): :param invoice: account.move :return: dict """ - name = ", ".join(moves.mapped("name")) move = fields.first(moves) product = move.product_id partner_id = self.env["res.partner"].browse(invoice_values["partner_id"]) @@ -457,7 +456,7 @@ def _get_invoice_line_values(self, moves, invoice_values, invoice): values = line_obj.default_get(line_obj.fields_get().keys()) values.update( { - "name": name, + "name": move.name, "product_id": product.id, "quantity": quantity, "price_unit": price, @@ -466,7 +465,6 @@ def _get_invoice_line_values(self, moves, invoice_values, invoice): } ) values = self._simulate_invoice_line_onchange(values, price_unit=price) - values.update({"name": name}) return values def _update_picking_invoice_status(self, pickings):