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
[MIG] project_gtd: migration 8.0 > 10.0 #308
Conversation
Hey @mmequignon, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
Note: @mmequignon is covered by the ABF OSIELL CLA. |
@sebalix fixed the CLA issue |
project_gtd/project_gtd.py
Outdated
'Context', size=64, required=True, translate=True) | ||
sequence = fields.Integer( | ||
'Sequence', | ||
help=("Gives the sequence order when displaying a list of contexts."), |
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 the line is short enough, you can get rid of the ( )
This looks really nice. |
Hey @mmequignon, Appreciation of efforts, |
1b190cb
to
ff2f6de
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.
I made some improvement suggestions. Nothing critical really.
project_gtd/__manifest__.py
Outdated
performing those tasks. | ||
""", | ||
'author': "OpenERP SA,Odoo Community Association (OCA)", | ||
'author': "OpenERP SA, Odoo Community Association (OCA), ABF OSIELL", |
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.
OpenERP --> Odoo
project_gtd/project_gtd.py
Outdated
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, | ||
submenu=False): | ||
res = super(ProjectTask, self).fields_view_get( | ||
view_id, view_type, toolbar=toolbar, submenu=submenu) |
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.
Arguments should be simplified with *args and **kwargs
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.
@Jerther sorry?
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.
Since all arguments are solely used in the super call, I think it'd be safer and cleaner to write:
def fields_view_get(self, *args, **kwargs):
res = super(ProjectTask, self).fields_view_get(*args, **kwargs)
project_gtd/project_gtd.py
Outdated
# Copyright 2017 ABF OSIELL <http://osiell.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models, api, tools |
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.
imported lines should be alphabetically sorted
|
||
from openerp.osv import fields, osv | ||
from openerp.tools.translate import _ | ||
from odoo import fields, models, api, exceptions |
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.
imported lines should be alphabetically sorted
|
||
from openerp.osv import fields, osv | ||
from odoo import fields, models, api |
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.
imported lines should be alphabetically sorted
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.
Made a few comment to fix.
project_gtd/project_gtd.py
Outdated
_order = "sequence, name" | ||
|
||
name = fields.Char( | ||
'Context', size=64, required=True, translate=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.
It is current practice to remove the size attribute from Chars
project_gtd/project_gtd.py
Outdated
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, | ||
submenu=False): | ||
res = super(ProjectTask, self).fields_view_get( | ||
view_id, view_type, toolbar=toolbar, submenu=submenu) |
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.
@Jerther sorry?
project_gtd/project_gtd_view.xml
Outdated
<record model="ir.ui.view" id="view_gtd_context_tree"> | ||
<field name="name">project.gtd.context.tree</field> | ||
<field name="model">project.gtd.context</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Context"> | ||
<tree name="Context"> |
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.
Isnt't "string" correct? Anyway, i don't think these attributes are really useful.
project_gtd/project_gtd_view.xml
Outdated
@@ -16,7 +15,7 @@ | |||
<field name="name">project.gtd.context.form</field> | |||
<field name="model">project.gtd.context</field> | |||
<field name="arch" type="xml"> | |||
<form string="Context" version="7.0"> | |||
<form name="Context" version="7.0"> |
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 believe you can remove the "7.0"
self.pool.get('project.task').write( | ||
cr, uid, data[0]['task_ids'], | ||
{'timebox_id': data[0]['timebox_to_id'][0]}) | ||
self.task_ids.write({'timebox_id': self.timebox_to_id.id}) | ||
return {'type': 'ir.actions.act_window_close'} | ||
|
||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
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 remove
It seems that tests are failing because of
I don't know what to do about this. |
95a4815
to
bce01b8
Compare
Since project_closing have been removed from project, tests are now ok. |
Squash your commits please. |
bce01b8
to
9d5e185
Compare
Yes, that's done, thank you ! |
It seems very nice to |
No description provided.