-
-
Notifications
You must be signed in to change notification settings - Fork 700
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
base: 17.0
Are you sure you want to change the base?
[17.0][FIX] account_invoice_section_sale_order: FWD port and fix test-case #1871
Conversation
@sergiocorato @simahawk Could any of you kindly review this PR? Thank you! |
@TDu Can you take a look at this fix please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the tests! I see they were caused by Odoo adding taxes to demo products in odoo/odoo@1443e5503c7396512a. Hope we can merge this one fast. Just a small question.
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.
…nvoice_with_currency
17292ca
to
c62dfd9
Compare
@StefanRijnhart fine for you? |
FWD ports
#1774
#1862
#1770
Fix test-case
test_create_invoice_with_currency
change compare