-
-
Notifications
You must be signed in to change notification settings - Fork 693
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
[18.0][MIG] : Migration partner_invoicing_mode to 18.0 #1833
base: 18.0
Are you sure you want to change the base?
Conversation
chaule97
commented
Nov 6, 2024
•
edited
Loading
edited
- If a field is marked as readonly=True on the model, it won't be possible to import it through the Odoo import tool, so we avoid it as possible and define the readonly attribute on the views instead.
[UPD] Update partner_invoicing_mode.pot [UPD] README.rst partner_invoicing_mode 16.0.1.0.1
Translated using Weblate (Spanish) Currently translated at 100.0% (8 of 8 strings) Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode/es/ [UPD] README.rst
Translated using Weblate (Italian) Currently translated at 100.0% (8 of 8 strings) Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode/it/
Allow to have a better extension mechanism when having multiple invoicing modes.
The field one_invoice_per_order wasn't used correctly. So, now, create invoices using the partner option by calling the grouping option on sale orders
To improve flexibility, the invoicing grouping option could be different on the sale order level than on the partner level.
As the read_group() can aggregate sale order ids per partner, use the ids list instead.
…al field As a company can have several different invoicing address, invoicing can occur at different dates.
…tion As validation jobs could last long time if there are plenty, ensure that the wanted date is correctly set.
In order to be able to benefits from standard grouping function, override it and add missing keys. [UPD] Update partner_invoicing_mode.pot [BOT] post-merge updates Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode/ Translated using Weblate (Italian) Currently translated at 94.4% (17 of 18 strings) Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode/it/ Translated using Weblate (Italian) Currently translated at 100.0% (18 of 18 strings) Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode/it/ Translated using Weblate (Spanish) Currently translated at 100.0% (18 of 18 strings) Translation: account-invoicing-16.0/account-invoicing-16.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-partner_invoicing_mode/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-17.0/account-invoicing-17.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-partner_invoicing_mode/
Currently translated at 100.0% (18 of 18 strings) Translation: account-invoicing-17.0/account-invoicing-17.0-partner_invoicing_mode Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-partner_invoicing_mode/it/
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.
@@ -6,7 +6,8 @@ | |||
from freezegun import freeze_time | |||
|
|||
from odoo import fields | |||
from odoo.tests.common import Form, TransactionCase | |||
from odoo.tests import Form | |||
from odoo.tests.common import TransactionCase |
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.
Why CommonPartnerInvoicingMove isn't depending on TransactionCase?
It implements setUpClass
and calls super()
which no parent class implements.
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.
I have updated CommonPartnerInvoicingMove
depending on TransactionCase
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.
I would ask first the author of this: cc @rousseldenis your opinion on this change?
This CommonPartnerInvoicingMove
could be implemented this way to use it as a mixin by reverse dependencies, not as a common test class.
2f73859
to
03a1367
Compare
03a1367
to
2a89ba9
Compare
Hello everyone, I have changed a little about readonly attribute in model and field |
|
2a89ba9
to
a108a3f
Compare
I have removed it |
@@ -10,5 +10,4 @@ class ResCompany(models.Model): | |||
invoicing_mode_standard_last_execution = fields.Datetime( | |||
string="Last execution (standard)", | |||
help="Last execution of standard invoicing.", | |||
readonly=True, |
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.
Not sure I understand this change.
I can't think of a reason why we'd want tthis field to be imported
_inherit = "account.move" | ||
|
||
def _validate_invoice(self): | ||
return self.sudo().action_post() |
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.
I'm not sure I understand why this method is needed.
Can't we call/delay action_post
directly ?
|
||
invoicing_mode = fields.Selection([("standard", "Standard")], default="standard") | ||
one_invoice_per_order = fields.Boolean( | ||
default=False, |
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.
default=False, |
redundant
def _update_next_invoice_date(self): | ||
""" | ||
This will update the next invoice date from the configuration set on | ||
the partner if needed (not for standard invoicing_mode). | ||
""" | ||
return |
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.
Maybe I'm missing something..
What's the purpose of this method?
Seems rather useless..
This PR has the |