-
-
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
[16.0][MIG] account_fiscal_month: Migration to 16.0 #1708
[16.0][MIG] account_fiscal_month: Migration to 16.0 #1708
Conversation
…n a multi-company context OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex
Update tests for unlink. Update tests. Update unlin ktest in super.
Currently translated at 100.0% (5 of 5 strings) Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_fiscal_month Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_fiscal_month/hr/
Currently translated at 100.0% (5 of 5 strings) Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_fiscal_month Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_fiscal_month/pt/
Currently translated at 100.0% (5 of 5 strings) Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_fiscal_month Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_fiscal_month/de/
Currently translated at 100.0% (5 of 5 strings) Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_fiscal_month Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_fiscal_month/pt_BR/
Currently translated at 40.0% (2 of 5 strings) Translation: account-financial-tools-15.0/account-financial-tools-15.0-account_fiscal_month Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-15-0/account-financial-tools-15-0-account_fiscal_month/it/
5c75871
to
085417a
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.
Good job with the migration. Just some tiny improvements that you might consider
<!-- Copyright 2017 ACSONE SA/NV | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
<record model="ir.ui.view" id="date_range_type_form_view"> |
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 not keeping same xml id as parent view_date_range_type_form_view and putting the id before the model?
</field> | ||
</record> | ||
<record model="ir.ui.view" id="date_range_type_tree_view"> | ||
<field name="name">date.range.type.tree (in account_fiscal_month)</field> |
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.
Same comment as above
"author": "ACSONE SA/NV, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/account-financial-tools", | ||
"depends": ["account", "date_range"], | ||
"data": ["data/date_range_type.xml", "views/date_range_type.xml"], |
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.
Better in several lines the depends and the data?
class DateRangeType(models.Model): | ||
_inherit = "date.range.type" | ||
|
||
fiscal_month = fields.Boolean(string="Is fiscal month?", 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.
If it's readonly when is the the value assigned? Or the goal is just having the unique date.range.type created as business data as fiscal month?
"account_fiscal_month.date_range_fiscal_month" | ||
) | ||
if date_range_type_fm.id in self.ids: | ||
raise UserError(_("You can't delete date range type: " "Fiscal month")) |
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.
Couldn't you better delete the others and skip the deletion of this one?
@BT-rmartin As far as I know, all the changes you request should be addressed in another PR tagged with [IMP] after the migration. The migration should minimise the changes. The only 'big' change I've made is the setUp by setUpClass, since I have seen several times the change in other similar PRs. If you are sure that your improvement can be addressed in this PR, I will do them because I agree with your suggestions |
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.
@BT-anieto You are right. Those changes should be done after merging probably.
Regarding your change to setUpClass it's perfect, as now TransactionCase acts as the old SavepointCase and then as it's a common creation of data for all tests we will save some time in the execution
This PR has the |
@OCA/accounting-maintainers Could it be merged? |
/ocabot migration account_fiscal_month |
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.
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 2836eb9. Thanks a lot for contributing to OCA. ❤️ |
No description provided.