-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
First Commit Scrum Project Module #1
Conversation
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.
Hi @mohamedhabibchallouf
Thanks for this first commit!
Please check https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md for the guidelines (and directories for templates).
Please fix travis and make it "green".
No test yet done on my side 😄
@@ -0,0 +1,4 @@ | |||
eclipse.preferences.version=1 |
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.
You should remove this directory (add it in .gitignore)
@@ -0,0 +1,3 @@ | |||
# -*- 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.
Please add a README file following: https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst
project_scrum/__manifest__.py
Outdated
|
||
{ | ||
'name': 'Project Scrum', | ||
'summary': 'Use Scrum Method to manager your 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.
remove extra space
project_scrum/__manifest__.py
Outdated
{ | ||
'name': 'Project Scrum', | ||
'summary': 'Use Scrum Method to manager your project', | ||
'version': '10', |
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.
version 10.0.1.0.0 (following: https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#version-numbers)
project_scrum/__manifest__.py
Outdated
'summary': 'Use Scrum Method to manager your project', | ||
'version': '10', | ||
'category': 'Project Management', | ||
'description': """ |
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.
This key is not needed in v10 (README file instead)
project_scrum/sequences_projects.xml
Outdated
<openerp> | ||
<data noupdate="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.
remove extra lines
project_scrum/sequences_projects.xml
Outdated
<record id="seq_use_story" model="ir.sequence"> | ||
<field name="name">Story Number</field> | ||
<field name="code">user.story</field> | ||
<field name="prefix">N°:%(year)s/%(month)s:</field> |
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 "N°:" and final ":"
<div class="item oe_img_bg active" style="background-image: url("http://localhost:8069/website/static/src/img/banner/mango.jpg"); height:300px;"> | ||
<div class="container"> | ||
<div class="row content"> | ||
<!--<h1 class="carousel-content col-sm-12 mb16 mt128 col-md-3 col-md-offset-1">Planning Work With Scrum</h1>--> |
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 dead codes
<data> | ||
<record model="ir.values" id="ps_make_test_task"> | ||
<field name="model_id" ref="model_project_scrum_sprint"/> | ||
<field name="name">Creat tasks for test</field> |
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.
Create
</record> | ||
|
||
<record model="ir.actions.server" id="ps_action_server_creat_test_task"> | ||
<field name="name">Creat Tasks from Test Cases</field> |
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.
Create
Actually it seems that the repo setup files have not been initiated.
|
project_scrum/project_scrum.py
Outdated
else: | ||
pass | ||
|
||
class project_user_stories(models.Model): |
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.
Class name must be camel case. Check class below too
Thanks
project_scrum/project_scrum.py
Outdated
return [], None | ||
|
||
class project_actors(models.Model): | ||
_name = 'project.scrum.actors' |
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 follow Odoo conventions instead of exceptions.
Each record of this model is a record of project.scrum.actor kind/type
Table is a collection of record if this type
@mohamedhabibchallouf thanks a lot for this super module |
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.
thanks! please don't get frustrated by the many nags, you only get so many because people are happy about your work and review closely.
@pedrobaeza @dreispt do you still need to configure CI? I see neither runbot nor travis. When travis has run, it will have a lot to complain too, so you could have a look at our coding conventions anyways: https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md
project_scrum/project_scrum.py
Outdated
|
||
_logger = logging.getLogger(__name__) | ||
|
||
class scrum_sprint(models.Model): |
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.
use CamelCase for class names, one file per model, and they live in /models
project_scrum/project_scrum.py
Outdated
]) | ||
if len(sprint) > 0: | ||
return sprint[0] | ||
return None |
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'd suggest to return an empty browse record here - then code using this function can treat the result with less caution
project_scrum/project_scrum.py
Outdated
('project_id', '=', project_id) | ||
]) | ||
if len(sprint) > 0: | ||
return sprint[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.
why make assumptions? if you really only want to return the first, add a limit clause above. and combine with the below, you can simply return the result of search
if self.project_id and self.project_id.manhours: | ||
self.planned_hours = self.project_id.manhours | ||
else: | ||
self.planned_hours = 0.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.
given the way empty browse records behave, all this is equivalent to self.planned_hours = self.project_id.manhours
project_scrum/project_scrum.py
Outdated
self.date_stop = fields.Date.from_string(self.date_start) +\ | ||
timedelta(days=self.project_id.default_sprintduration) | ||
else: | ||
pass |
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.
this does nothing. it's also better when you don't do anything in an else branch, to better check for the inverse and exit early. would save you two levels of indentation here
project_scrum/project_scrum.py
Outdated
user_story_ids = fields.One2many(comodel_name="project.scrum.us", inverse_name="project_id", string="User Sories") | ||
meeting_ids = fields.One2many(comodel_name="project.scrum.meeting", inverse_name="project_id", string="Meetings") | ||
test_case_ids = fields.One2many(comodel_name="project.scrum.test", inverse_name="project_id", string="Test Cases") | ||
sprint_count = fields.Integer(compute='_sprint_count', string="Sprints") |
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.
store all of them, those fields tend to be major performance eaters on bigger installations
project_scrum/project_scrum.py
Outdated
help="Default Sprint time for this project, in days") | ||
manhours = fields.Integer(string='Man Hours', required=False, | ||
help="How many hours you expect this project needs before it's finished") | ||
description = fields.Text() |
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.
not better Html()
?
project_scrum/project_scrum.py
Outdated
_order = 'sequence_test' | ||
|
||
name = fields.Char(string='Name', required=True) | ||
project_id = fields.Many2one(comodel_name='project.project', string='Project', ondelete='set null', select=True, track_visibility='onchange', change_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.
index
project_scrum/project_scrum.py
Outdated
sequence_test = fields.Integer(string='Sequence', select=True) | ||
stats_test = fields.Selection([('draft', 'Draft'), ('in progress', 'In Progress'), ('cancel', 'Cancelled')], string='State', required=False) | ||
company_id = fields.Many2one(related='project_id.analytic_account_id.company_id') | ||
color = fields.Integer(related='project_id.color') |
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.
this model might also profit from the kanban stage mixin
project_scrum/project_scrum.py
Outdated
company_id = fields.Many2one(related='project_id.analytic_account_id.company_id') | ||
color = fields.Integer(related='project_id.color') | ||
|
||
def _resolve_project_id_from_context(self, cr, uid, context=None): |
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.
also v8 api. consider moving the project related functionality to a mixin anyways
@hbrunn I don't know, as .travis.yml seems to be in place. |
a user with admin rights needs to go to https://travis-ci.org/OCA/project-agile and turn it on, I don't have the permissions |
Ouch, it was that! @dreispt, please check next time full "Create new PSC project" procedure, that includes this. Done. Closing and reopening for triggering Travis. |
@mohamedhabibchallouf I'm not such a fan of automated tools myself, so I never tried it, but there's https://github.com/OCA/maintainer-tools/blob/master/tools/autopep8_extended.py |
@hbrunn i work on it now :) |
Hi guys, I'm really happy to see the first pull request here and I appreciate the effort. In order to prevent any misunderstanding I would like to clarify that this pull request is not related, in any way, to the Here at Modoolar we are working to make modules compliant with the OCA coding standards and once we finish, we'll start making pull requests for each module (one by one) just as we agreed upon in the "Odoo Scrummer" mail thread. Cheers, |
but then this PR is the good place to agree on a data model for the basic entities. We can't have two scrum related modules, and first PR merged wins... |
@pedrobaeza Sure, just remember to share it with me.The doc I could find does not mention TravisCI. @pnajman-modoolar @mohamedhabibchallouf I can see that we have two independently implemented scrum modules. There is no point in having two modules doing the same. We need to check what each does differently and on what they overlap. |
@dreispt it's an internal OCA board task (https://odoo-community.org/web?#id=264&view_type=form&model=project.task&action=468&active_id=2), as it contains sensible information. |
...and if it turns out that they have interesting but incongruent features, we should try hard to move as much as possible to a shared base module so that the whole set of modules stays compatible |
@pnajman-modoolar there was a real confusion here. Thanks to notice us. Thanks for your work |
I added the "Question" tag to remind us to compare with the Scrummer module, to be made available soon, before this can be merged. |
@elicoidal The dotfiles are there; the branch needs a rebase to have them included. |
@mohamedhabibchallouf @HaojunZou @anderswallenquist In this PR, I identified quite striking similarities with the vertelab scrum version Is this an innocent case of code borrowing/using some common ancestor and forgetting to attribute or is this a case of license violation? @mohamedhabibchallouf please comment on this. In any case, you must be sure that the code you hand in is actually yours to give away. The other source being some free license is not enough, because by submitting code to the OCA you also push it under the OCA's CLA, which is an extra legal step. |
@hbrunn |
good to hear. I just want to avoid merging time bombs in the sense that if other people have a claim to code we in the OCA use, this will be a problem sooner or later. Can you trace it in your organization internally where the code originally comes from? |
@pedrobaeza does the secret list also say something about runbot? Would be good I think to have this in place for the functional people to discuss the functional aspects of this |
@mohamedhabibchallouf Hmm, your review and retrospective field definitions are identical to Vertelab's, introduced in a 2015 commit... Is there a chance someone borrowed this code? What do you think @mohamedhabibchallouf ? |
@dreispt |
that this all derived from odoo's I pinged two of the authors involved in the other module in #1 (comment), maybe they can shed light into this. The similarity I've found was created long after Odoo SA deprecated the module, so to be honest my assumption is you grabbed this code some time in the 8 lifecycle and kept improving it. Absolutely no problem with that in the open source world, but unfortunately, that still doesn't make it yours in terms of license decisions. Please clarify. |
@hbrunn Thanks, I will try to check the history of our Module. Otherwise, following your logic, we need to ask Odoo SA , as well as the Python Software Foundation since we are using python for coding. Again, our only intention is to share, an opensource, done by us from scratch or improved by us, to the community. |
@hbrunn |
now, that's great to hear. Then we'll be fine one way or the other (@dreispt can you confirm the CCLA? I don't know if a humble OCA member can see this at all, what I know is that I don't know how), and I leave it to you to gather the evidence for the authorship. But then we're sure we don't pull in code of people who don't want it to be pulled in, that was my whole point. Thanks. So back to technical stuff! |
I checked and Vertel AB has an ECLA, signed by CEO Anders Wallenquist. |
project_scrum/project_scrum.py
Outdated
@@ -251,7 +256,8 @@ def _resolve_project_id_from_context(self, cr, uid, context = None): | |||
return context['default_project_id'] | |||
if isinstance(context.get('default_project_id'), basestring): | |||
project_name = context['default_project_id'] | |||
project_ids = self.pool.get('project.project').name_search(cr, uid, name=project_name, context=context) | |||
project_ids = self.pool.get('project.project').name_search(cr, uid, | |||
name=project_name, context=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.
I personally dislike this formatting style. in case you agree with me, you can try breaking the line in a more space efficient way, like this:
project_ids = self.pool.get('project.project').name_search(
cr, uid, name=project_name, context=context)
project_scrum/project_scrum.py
Outdated
stats_test = fields.Selection([('draft', 'Draft'), ('in progress', 'In Progress'), ('cancel', 'Cancelled')], string='State', required=False) | ||
stats_test = fields.Selection([('draft', 'Draft'), | ||
('in progress', 'In Progress'), | ||
('cancel', 'Cancelled')], string='State', required=False) |
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.
To be PEP8 compliant, the line break must be right after the (
, so that the cr, uid,
go at the beginning of the next line.
Anyway, the cr, uid,
should go away soon, when the port to the new API.
@mohamedhabibchallouf I have made a PR that fixes a lot of stuff (this module is seriously broken). Are you going to follow up on this PR or should I start a new one? |
@daramousk please start a new one, this PR hasn't been updated for more than half a year |
closing this in favor of #16 because of lack of activity and because we commit to get this done |
Add Scrum module to project agile Branch