Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] account_invoice_section_sale_order: FWD port and fix test-case #1871

Open
wants to merge 5 commits into
base: 17.0
Choose a base branch
from

Conversation

LucasTran380381
Copy link

FWD ports

#1862
#1770

Fix test-case

test_create_invoice_with_currency change compare

self.assertEqual(invoices.amount_total, 80) => self.assertEqual(invoices.amount_untaxed, 80)

mmequignon and others added 5 commits December 31, 2024 16:46
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.
@miguel-S73
Copy link
Contributor

@sergiocorato @simahawk Could any of you kindly review this PR? Thank you!

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.

5 participants