-
-
Notifications
You must be signed in to change notification settings - Fork 777
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] account_chart_update: Migration to 17.0 #1989
[17.0][MIG] account_chart_update: Migration to 17.0 #1989
Conversation
7eca605
to
d6fa9c0
Compare
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.
these 3 diffs always appear on runbot even after applying the wizard twice with the same chart. I do not know if you want to take a look. Everything else works good.
It is true though that not being able to edit the chart template from inside odoo is less convenient (to change the number of padding zeroes for example).
string="Account template", | ||
required=True, | ||
) | ||
xml_id = fields.Char() |
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.
d6fa9c0
to
ae497db
Compare
Thanks, checked and fixed. |
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.
Code LGTM! Seems to be working fine also 👍
ae497db
to
49d121b
Compare
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.
Functional review 👍
/ocabot migration account_chart_update |
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.
Several things:
- Is there any possibility to only load in the "Chart template" dropdown those that are already installed?
- When a tax group is not present (because for example is added in the last update), you get an error. You can force to happen trying to load Spanish taxes on generic CoA for example.
49d121b
to
313753c
Compare
Changes done. The test error related to |
313753c
to
b20ed9d
Compare
The test error is finally fixed. |
The wizard does not take into account the selected language. In a plan update the name of the taxes always appears in English. With this change it works correctly. def _load_data(self, model, data):
"""Process similar to the one in chart template."""
template = self.env["account.chart.template"].with_context(
default_company_id=self.company_id.id,
allowed_company_ids=[self.company_id.id],
tracking_disable=True,
delay_account_group_sync=True,
lang=self.lang,
) |
b20ed9d
to
4346793
Compare
Thanks for the comment, it has been solved so that the language is correctly taken into account (the suggestion you proposed was not enough). |
The language thing is still not working correctly. Do the following:
|
[FIX]: Changed types to orm.Model, orm.TransientModel and orm.AbstractModel. [FIX]: Fix deletion method for some fields of objects. [FIX]: Contributions have been written in the standard format of the community. [FIX]: Changes in the form to work as a real wizard. [FIX]: Remove 'init_xml' keys, because it's no longer needed in v7. [FIX]: Rename 'demo_xml' key to the new standard 'demo'. [FIX]: Change imports calls. [FIX]: Remove __author__ variables in files, because authors are put on manifest file (__openerp__.py). [FIX]: Update view definitions to version 7.0 [FIX]: Rename variables to OpenERP standard. [FIX]: Increased compatibility with standard PEP8. [IMP]: User Invitu add the method call _reopen to keep open the wizard. [MRG]: User Invitu add frech language.
Currently translated at 94.1% (129 of 137 strings) Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_chart_update Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_chart_update/pt_BR/
Currently translated at 100.0% (137 of 137 strings) Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_chart_update Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_chart_update/sv/
Currently translated at 100.0% (137 of 137 strings) Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_chart_update Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_chart_update/pt_BR/
[BOT] post-merge updates
[BOT] post-merge updates
… and ditch decorators as mentioned in code review [BOT] post-merge updates
4346793
to
18e6cfc
Compare
Partially solved, this use case only happens when using |
About the languages, I'm afraid is not working when you change to other language than the original one that was installed: And another thing. As we have now a place where putting the button: don't create a separate section, but place it inside, and you can rename the existing one to "Reload for new elements", and the new one to "Update chart of accounts" (they can even be in the same row I think). |
Oh, wait, I was starting from a bad assumption: that the account name is not translatable. But that's not the case anymore in this version. Thus, now I understand what you were saying. In this case, I think we should directly remove the language in the wizard, and check all the languages at the same time, and refresh it if any is changed. |
18e6cfc
to
bd53f36
Compare
Changes done: - Purge translations - Squash administrative commits - Change name_get to _compute_display_name - Change attrs to invisible/required - Adapt to the new account.chart.template system without records - Remove recreate_xml_ids fields (It is always necessary for them to have the expected xml_id) TT49275
bd53f36
to
88bcb6a
Compare
Changes done. |
Ok, changes done. |
I have tried the update and the language now works well. |
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 all the changes and congratulations for the final result.
/ocabot merge nobump
On my way to merge this fine PR! |
Congratulations, your PR was merged at 1dbbf2a. Thanks a lot for contributing to OCA. ❤️ |
Supersedes #1888
Migration to 17.0
Changes done:
name_get
to_compute_display_name
attrs
to invisible/requiredaccount.chart.template
system without recordsPlease @pedrobaeza can you review it?
@Tecnativa TT49275