Skip to content

Commit

Permalink
[REF] stock_picking_invoicing: Avoid duplicate Name/Label in Invoice …
Browse files Browse the repository at this point in the history
…Line when Grouping Pickings by Partner/Product.
  • Loading branch information
mbcosta committed Nov 28, 2023
1 parent 3ae9762 commit 95d4cd3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions stock_picking_invoicing/wizards/stock_invoice_onshipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand All @@ -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,
Expand All @@ -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):
Expand Down

0 comments on commit 95d4cd3

Please sign in to comment.