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

[16.0][MIG] account_fiscal_month: Migration to 16.0 #1708

Merged
merged 15 commits into from
Sep 15, 2023

Conversation

BT-anieto
Copy link
Contributor

No description provided.

benwillig and others added 15 commits August 4, 2023 08:10
…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/
@BT-anieto BT-anieto force-pushed the 16.0-mig-account_fiscal_month branch from 5c75871 to 085417a Compare August 4, 2023 06:20
@BT-anieto BT-anieto mentioned this pull request Aug 4, 2023
33 tasks
@BT-anieto BT-anieto changed the title [16.0][MIG] account_move_fiscal_month: Migration to 16.0 [16.0][MIG] account_fiscal_month: Migration to 16.0 Aug 4, 2023
Copy link

@BT-rmartin BT-rmartin left a 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">

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>

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"],

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)

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"))

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-anieto
Copy link
Contributor Author

@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

Copy link

@BT-rmartin BT-rmartin left a 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

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@BT-anieto
Copy link
Contributor Author

@OCA/accounting-maintainers Could it be merged?

@etobella
Copy link
Member

/ocabot migration account_fiscal_month

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Sep 15, 2023
Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-1708-by-etobella-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit fc35005 into OCA:16.0 Sep 15, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 2836eb9. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.