-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
base: 18.0
Are you sure you want to change the base?
Conversation
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/
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.
418d38d
to
79875ec
Compare
<field | ||
name="auto_validation_state" | ||
optional="hide" | ||
groups="project.group_project_rating" |
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.
The groups was not in previous versions, why add 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.
I saw list in Odoo and Odoo add this group
I can also remove it there is no problem
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.
No, if it is added by Odoo I see it consistent to apply the same groups.
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 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"> |
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.
That doesn't seem right. id=
should be the same as that of the inherited.
79875ec
to
3da8cda
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.
LGTM
This PR has the |
/ocabot migration project_task_default_stage |
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.
LGTM. Some refinements
_inherit = "project.project" | ||
|
||
def _get_default_type_common(self): | ||
ids = self.env["project.task.type"].search([("case_default", "=", 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.
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()) |
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.
Please put field on top
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT | ||
|
||
|
||
class TestProjectCaseDefault(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.
FYI, you can inherit from BaseCommon
class instead to avoid context line.
3da8cda
to
49dff3f
Compare
Migration from 17.0 to 18.0
Issue: #1347