Skip to content

Commit

Permalink
[FIX]partner_invoicing_mode: Remove invalid partner_invoice_id key to…
Browse files Browse the repository at this point in the history
… group sales. Fix #1747
  • Loading branch information
javierjcf committed Jun 27, 2024
1 parent 1df5e06 commit 36bf259
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions partner_invoicing_mode/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,11 @@ def generate_invoices(
def _get_invoice_grouping_keys(self) -> list:
"""
We override the standard (in sale) grouping function in order to
add some missing keys. We remove also the partner_id key.
add some missing keys.
"""
keys = super()._get_invoice_grouping_keys()
if "partner_invoice_id" not in keys:
keys.append("partner_invoice_id")
if "payment_term_id" not in keys:
keys.append("payment_term_id")
# Removing unwanted keys as we group on invoiced partner
if "partner_id" in keys:
keys.remove("partner_id")
return keys

def _get_generated_invoices(self, partition):
Expand Down

0 comments on commit 36bf259

Please sign in to comment.