Module
account_invoice_report_grouped_by_picking
Describe the bug
When installing the account_invoice_report_grouped_by_picking module in Odoo 16, the standard invoice report stops respecting the original order of invoice lines, especially when multiple sections, notes, and products are used.
The main issues are:
- If the invoice contains multiple sections, the order in which they were defined (sections, products, notes) is not respected in the printed report.
- In general, the module does not preserve the sequence of lines, sections, and notes as defined on the invoice.
- An additional line with the text "Without reference" is added at the beginning of the invoice lines, even in invoices where this information should not appear (for example, invoices without pickings).
Although grouping by sales order/picking works properly in invoices generated from orders with multiple deliveries, the logic introduced by the module breaks the standard Odoo behavior when sections, notes, or non-picking invoices are involved.
To Reproduce
Affected versions:
16.0
Steps to reproduce the behavior
Case 1 – Invoice with multiple sections
- Install the
account_invoice_report_grouped_by_picking module.
- Create a customer invoice.
- Add several lines combining:
- Section 1
- Products under that section
- Section 2
- Products under the second section
- A note at the end or between sections.
- Confirm the invoice.
- Print the invoice report.
- Observe:
- The order of sections, products, and notes does not match the sequence defined on the invoice.
- The order of multiple sections is not preserved.
- A line with the text “Without reference” appears at the top of the invoice line list.
Case 2 – Invoice not related to pickings
- With the module installed, create a manual invoice not linked to any sales order or delivery order.
- Add normal lines (products, sections, notes if desired).
- Confirm the invoice.
- Print the invoice.
- Observe:
- The order of lines, sections, and notes may differ from the original order.
- The “Without reference” line is still added at the beginning, even though no pickings exist.
Expected behavior
With the module installed, the invoice report should:
- Preserve the exact order of invoice lines (sections, products, notes) based on their
sequence.
- Maintain the native Odoo functionality of subtotal by section, keeping each section and its related lines grouped correctly.
- Avoid adding any artificial line such as “Without reference” when no picking exists.
- Apply grouping by picking only when appropriate (invoices with delivery orders), without breaking the standard report behavior in all other cases.
Additional context
- The module behaves correctly when handling invoices derived from sales orders with multiple deliveries (showing order, picking, and related lines).
- The issues appear when:
- Multiple sections are used in the same invoice.
- A combination of sections, products, and notes is present.
- The invoice is not associated with pickings.
- The “Without reference” line being added at the top of the invoice line list is confusing for the end user and does not match standard Odoo behavior.
Module
account_invoice_report_grouped_by_pickingDescribe the bug
When installing the
account_invoice_report_grouped_by_pickingmodule in Odoo 16, the standard invoice report stops respecting the original order of invoice lines, especially when multiple sections, notes, and products are used.The main issues are:
Although grouping by sales order/picking works properly in invoices generated from orders with multiple deliveries, the logic introduced by the module breaks the standard Odoo behavior when sections, notes, or non-picking invoices are involved.
To Reproduce
Affected versions:
16.0
Steps to reproduce the behavior
Case 1 – Invoice with multiple sections
account_invoice_report_grouped_by_pickingmodule.Case 2 – Invoice not related to pickings
Expected behavior
With the module installed, the invoice report should:
sequence.Additional context