You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When this module is instaled, if you select 2 or more orders with differents customers, it creates only a invoice. Not grouped by partner either partner_invoice_id.
To Reproduce
Affected versions: 16
Steps to reproduce the behavior:
Create 2 sale orders with diferent customers
Select the two orders and generate invoiced
Only one invoice is created
Expected behavior
Two diferent invoice created.
Additional context
It seems a lot of changes in this module in the last months. Very different to v 15 version.
I think the method def _get_invoice_grouping_keys(self) is the problem. It removes key partner_id and adds partner_invoice_id.
Odoo does not compare the grouping keys against the sale order, instead it does with the vals of the invoice, so no key partner_invoice_id in this dicctionary, it will allways be None, this is odoo code: for _grouping_keys, invoices in groupby(invoice_vals_list, key=lambda x: [x.get(grouping_key) for grouping_key in invoice_grouping_keys]):
invcoice_vals_list will never contain partner_invoice_id. When odoo creates this dict, 'partner_id' key is alrready partner_invoice_id of sale_order, so i think removing partner_id key is an error.
The text was updated successfully, but these errors were encountered:
Module
Partner Invoicing Mode
Describe the bug
When this module is instaled, if you select 2 or more orders with differents customers, it creates only a invoice. Not grouped by partner either partner_invoice_id.
To Reproduce
Affected versions: 16
Steps to reproduce the behavior:
Expected behavior
Two diferent invoice created.
Additional context
It seems a lot of changes in this module in the last months. Very different to v 15 version.
I think the method
def _get_invoice_grouping_keys(self)
is the problem. It removes key partner_id and adds partner_invoice_id.Odoo does not compare the grouping keys against the sale order, instead it does with the vals of the invoice, so no key partner_invoice_id in this dicctionary, it will allways be None, this is odoo code:
for _grouping_keys, invoices in groupby(invoice_vals_list, key=lambda x: [x.get(grouping_key) for grouping_key in invoice_grouping_keys]):
invcoice_vals_list will never contain partner_invoice_id. When odoo creates this dict, 'partner_id' key is alrready partner_invoice_id of sale_order, so i think removing partner_id key is an error.
The text was updated successfully, but these errors were encountered: