Skip to content

Conversation

@mt-software-de
Copy link
Contributor

No description provided.

TDu and others added 30 commits January 9, 2026 08:27
Description from the readme :

When invoicing multiple sale orders at the same time, sale orders may be grouped
by customer into a single invoice. Unfortunately when this happens, it is hard
to know which invoice line belongs to which sale order.

This module helps by grouping invoicing lines into sections with the name of the
targeted sale order.
This is only done when an invoice targets multiple sale order.
The function signature as changed in v14
[UPD] Update account_invoice_section_sale_order.pot

[UPD] README.rst
Translated using Weblate (Spanish)

Currently translated at 100.0% (1 of 1 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-account_invoice_section_sale_order
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_invoice_section_sale_order/es/
Currently translated at 100.0% (1 of 1 strings)

Translation: account-invoicing-17.0/account-invoicing-17.0-account_invoice_section_sale_order
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_invoice_section_sale_order/it/
Refactor preparation of sections

Refactor to allow different section grouping

Add field to allow different possibilities of grouping invoice lines from sale order
…on tests

In OCA repo, now we have this error:

 Traceback (most recent call last):
  File "/__w/account-invoicing/account-invoicing/account_invoice_section_sale_order/tests/test_invoice_group_by_sale_order.py", line 109, in test_create_invoice
    self.assertEqual(line.name, result[line.sequence][0])
KeyError: 1
Currently translated at 100.0% (18 of 18 strings)

Translation: account-invoicing-17.0/account-invoicing-17.0-account_invoice_section_sale_order
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_invoice_section_sale_order/it/
the `sale.order._create_invoices() method does not only requires
`create` access to the `account.move` and `account.move.line` models.

Because we're actually sorting lines after the creating, it requires
`read` access to sort, and `write` access to modify their sequence.

This is problematic when interracting with other modules like
`invoice_mode_at_shipping` where stock users are the ones to create
invoices.

This commit adds a few `sudo()` in the code, in order to avoid granting
`read` and `write` access to users that shouldn't be allowed to read and write invoices.
Currently translated at 100.0% (18 of 18 strings)

Translation: account-invoicing-18.0/account-invoicing-18.0-account_invoice_section_sale_order
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-account_invoice_section_sale_order/fr/
@mt-software-de mt-software-de force-pushed the 19.0-mig-account_invoice_section_sale_order branch 2 times, most recently from 1a491b9 to dd1d447 Compare January 9, 2026 08:36
@mt-software-de mt-software-de marked this pull request as ready for review January 9, 2026 08:42
@mt-software-de mt-software-de force-pushed the 19.0-mig-account_invoice_section_sale_order branch from dd1d447 to 85ac3f8 Compare January 9, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.