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][MIG] partner_invoicing_mode_at_shipping: Migration to 17.0 #4

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

Conversation

chaule97
Copy link
Owner

@chaule97 chaule97 force-pushed the 17.0-mig-partner_invoicing_mode_at_shipping branch 4 times, most recently from fe2355e to 72a873b Compare December 31, 2024 08:32
@@ -12,6 +12,9 @@
"data/queue_job_data.xml",
"views/res_partner.xml",
],
"depends": ["account", "partner_invoicing_mode", "queue_job", "stock"],
"depends": ["account", "partner_invoicing_mode", "queue_job", "sale_stock"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this change.

  • depends: sale_stock is a module with auto_install = True and depends on the module sale, stock. And in partner_invoicing_mode it depends on sale. So sale_stock is already installed
Suggested change
"depends": ["account", "partner_invoicing_mode", "queue_job", "sale_stock"],
"depends": ["account", "partner_invoicing_mode", "queue_job", "stock"],

Comment on lines +1 to +2
# generated from manifests external_dependencies
openupgradelib

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need, you have declared it in external_dependencies. No need to add it here.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-commit generate it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete it. No need.
In sale_stock there is already this function with the same function

@@ -0,0 +1,4 @@
from . import res_partner
from . import stock_move

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from . import stock_move

> - Thierry Ducrest \<<[email protected]>\>

- Phuc (Tran Thanh) \<<[email protected]>\>
- Nils Coenen \<<[email protected]>\>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With some changes above you can put your name in this file. This decision depends on you 😉

@@ -0,0 +1,3 @@
The development of this module has been financially supported by:

- Camptocamp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update credits

and partner.one_invoice_per_shipping
):
raise ValidationError(
_(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe, small changes 😉.

Same with other similar things

Suggested change
_(
self.env._(

Copy link
Owner Author

@chaule97 chaule97 Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odoo in test CI doesn't know it

@chaule97 chaule97 force-pushed the 17.0-mig-partner_invoicing_mode_at_shipping branch 5 times, most recently from b1151a7 to 9496059 Compare January 3, 2025 08:34
@chaule97 chaule97 requested a review from thienvh332 January 3, 2025 08:37

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still needs to be kept.

@@ -1,7 +1,7 @@
# Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

from odoo import _, models
from odoo import _, api, models

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still exists _() below

@chaule97 chaule97 force-pushed the 17.0-mig-partner_invoicing_mode_at_shipping branch from 9496059 to de3c6c9 Compare January 3, 2025 08:54
@chaule97 chaule97 requested a review from thienvh332 January 3, 2025 08:58
Copy link

@thienvh332 thienvh332 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chaule97 chaule97 force-pushed the 17.0-mig-partner_invoicing_mode_at_shipping branch 2 times, most recently from 150f82d to d148854 Compare January 3, 2025 15:43
mmequignon and others added 12 commits February 4, 2025 09:49
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% (6 of 6 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode_at_shipping
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode_at_shipping/es/
OCA-git-bot and others added 20 commits February 4, 2025 09:50
Currently translated at 100.0% (6 of 6 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode_at_shipping
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode_at_shipping/it/
…ne_invoice_per_shipping' fill in / Use draft invoices.
…ing_validation function and add option auto validate invoice on partner
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode_at_shipping
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode_at_shipping/
Currently translated at 58.3% (7 of 12 strings)

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

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

Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode_at_shipping
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode_at_shipping/fr/
@chaule97 chaule97 force-pushed the 17.0-mig-partner_invoicing_mode_at_shipping branch from d148854 to 3f12bd5 Compare February 4, 2025 02:50
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.