-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
[9.0][MIG] mgmtsystem_nonconformity_project #190
[9.0][MIG] mgmtsystem_nonconformity_project #190
Conversation
Let us know when you are ready to get reviewed. |
I'd say it's ready to review now, although test coverage declined. Is that a deal-breaker for merging? |
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, only a few nitpicks to improve
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
|
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.
Add short authorship/copyright notice (see https://github.com/OCA/maintainer-tools/blob/master/template/module/models/model_name.py#L2-L3)
@@ -0,0 +1,34 @@ | |||
# -*- coding: utf-8 -*- | |||
from openerp import api, models, fields |
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.
Add short authorship/copyright notice
action_type = fields.Selection([ | ||
('action', 'Action'), | ||
('project', 'Project'), | ||
], |
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.
Isn't this underindented?
for action in self: | ||
action.complete_name = '%s %s' % action.name_get()[0] | ||
|
||
name = fields.Char('Claim Subject', size=128) |
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.
Remove size
project_id = fields.Many2one('project.project', 'Project') | ||
complete_name = fields.Char('Complete Name', | ||
compute='_compute_complete_name', | ||
size=250, store=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.
Remove size
if o.action_type == 'project' and o.project_id: | ||
r = (o.id, o.project_id.name) | ||
res.append(r) | ||
return res |
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 see that this is preexisting code, but I don't see the point to replace the Action name by the corresponding Project name.
@max3903 can we just drop this?
@thinkwelltwd Can you address my comments please? |
Did you want the complete_name field yanked altogether in the model & views, or just set the complete_name to the value of the "name" field? |
#92