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

[18.0] [MIG] project_task_default_stage: Migration to 18.0 #1383

Open
wants to merge 38 commits into
base: 18.0
Choose a base branch
from

Conversation

Borruso
Copy link

@Borruso Borruso commented Nov 27, 2024

Migration from 17.0 to 18.0

Issue: #1347

sergio-teruel and others added 30 commits November 27, 2024 11:20
Currently translated at 100,0% (16 of 16 strings)

Translation: project-11.0/project-11.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-11-0/project-11-0-project_task_default_stage/pt_BR/
Currently translated at 100,0% (16 of 16 strings)

Translation: project-11.0/project-11.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-11-0/project-11-0-project_task_default_stage/pt_PT/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-12.0/project-12.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_task_default_stage/gl/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-12.0/project-12.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_task_default_stage/es/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-12.0/project-12.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_task_default_stage/de/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-12.0/project-12.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_task_default_stage/pt_BR/
Currently translated at 94.1% (16 of 17 strings)

Translation: project-12.0/project-12.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-12-0/project-12-0-project_task_default_stage/it/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-13.0/project-13.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_task_default_stage/ca/
Currently translated at 100.0% (20 of 20 strings)

Translation: project-14.0/project-14.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_task_default_stage/es_AR/
Currently translated at 80.0% (16 of 20 strings)

Translation: project-14.0/project-14.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_task_default_stage/fr_FR/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-14.0/project-14.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_task_default_stage/fr/
Currently translated at 88.2% (15 of 17 strings)

Translation: project-16.0/project-16.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_default_stage/it/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-16.0/project-16.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_default_stage/hr/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-16.0/project-16.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_default_stage/de/
mymage and others added 7 commits November 27, 2024 11:23
Currently translated at 100.0% (17 of 17 strings)

Translation: project-16.0/project-16.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_default_stage/it/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-16.0/project-16.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_default_stage/pt_BR/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-16.0/project-16.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_default_stage/es/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-16.0/project-16.0-project_task_default_stage
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_default_stage/pt_BR/
- Switch to setUpClass for avoiding repeat the same setup for each test.
- Include context keys for avoiding mail operations overhead.
@Borruso Borruso force-pushed the 18.0-mig-project_task_default_stage branch from 418d38d to 79875ec Compare November 27, 2024 10:40
<field
name="auto_validation_state"
optional="hide"
groups="project.group_project_rating"
Copy link
Member

@zamberjo zamberjo Nov 27, 2024

Choose a reason for hiding this comment

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

The groups was not in previous versions, why add it?

Copy link
Author

Choose a reason for hiding this comment

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

I saw list in Odoo and Odoo add this group
I can also remove it there is no problem

Copy link
Member

Choose a reason for hiding this comment

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

No, if it is added by Odoo I see it consistent to apply the same groups.

Copy link
Member

@zamberjo zamberjo left a comment

Choose a reason for hiding this comment

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

Code review

@@ -10,8 +10,8 @@
</field>
</field>
</record>
<record id="task_type_tree" model="ir.ui.view">
<field name="name">project.task.type.tree.inherit</field>
<record id="task_type_list" model="ir.ui.view">
Copy link

Choose a reason for hiding this comment

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

That doesn't seem right. id= should be the same as that of the inherited.

@Borruso Borruso force-pushed the 18.0-mig-project_task_default_stage branch from 79875ec to 3da8cda Compare December 17, 2024 09:08
Copy link

@coleste coleste left a comment

Choose a reason for hiding this comment

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

LGTM

@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). 🤖

@rousseldenis
Copy link

/ocabot migration project_task_default_stage

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Dec 20, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Dec 20, 2024
10 tasks
Copy link

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

LGTM. Some refinements

_inherit = "project.project"

def _get_default_type_common(self):
ids = self.env["project.task.type"].search([("case_default", "=", True)])

Choose a reason for hiding this comment

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

IMHO, ids should be renamed (records or task_types or ...) as it is not ids

ids = self.env["project.task.type"].search([("case_default", "=", True)])
return ids

type_ids = fields.Many2many(default=lambda self: self._get_default_type_common())

Choose a reason for hiding this comment

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

Please put field on top

from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT


class TestProjectCaseDefault(TransactionCase):

Choose a reason for hiding this comment

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

FYI, you can inherit from BaseCommon class instead to avoid context line.

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.