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

First Commit Scrum Project Module #1

Closed
wants to merge 4 commits into from

Conversation

mohamedhabibchallouf
Copy link

Add Scrum module to project agile Branch

Copy link

@elicoidal elicoidal left a 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

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 -*-

Choose a reason for hiding this comment

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


{
'name': 'Project Scrum',
'summary': 'Use Scrum Method to manager your project',

Choose a reason for hiding this comment

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

remove extra space

{
'name': 'Project Scrum',
'summary': 'Use Scrum Method to manager your project',
'version': '10',

Choose a reason for hiding this comment

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

'summary': 'Use Scrum Method to manager your project',
'version': '10',
'category': 'Project Management',
'description': """

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)

<openerp>
<data noupdate="0">


Choose a reason for hiding this comment

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

remove extra lines

<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>

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(&quot;http://localhost:8069/website/static/src/img/banner/mango.jpg&quot;); 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>-->

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>

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>

Choose a reason for hiding this comment

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

Create

@elicoidal elicoidal added this to the 10.0 milestone Nov 24, 2017
@elicoidal
Copy link

Actually it seems that the repo setup files have not been initiated.
Can you create a PR to init the repo files, following example on https://github.com/OCA/business-requirement (for example). We are talking about:

  • README.md
  • travis.yml
  • LICENSE file
  • CONTRIBUTING.md
  • oca_dependencies.txt

else:
pass

class project_user_stories(models.Model):
Copy link
Member

@bealdav bealdav Nov 24, 2017

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

return [], None

class project_actors(models.Model):
_name = 'project.scrum.actors'
Copy link
Member

@bealdav bealdav Nov 24, 2017

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

@bealdav
Copy link
Member

bealdav commented Nov 24, 2017

@mohamedhabibchallouf thanks a lot for this super module

Copy link
Member

@hbrunn hbrunn left a 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


_logger = logging.getLogger(__name__)

class scrum_sprint(models.Model):
Copy link
Member

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

])
if len(sprint) > 0:
return sprint[0]
return None
Copy link
Member

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_id', '=', project_id)
])
if len(sprint) > 0:
return sprint[0]
Copy link
Member

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
Copy link
Member

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

self.date_stop = fields.Date.from_string(self.date_start) +\
timedelta(days=self.project_id.default_sprintduration)
else:
pass
Copy link
Member

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

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")
Copy link
Member

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

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()
Copy link
Member

Choose a reason for hiding this comment

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

not better Html()?

_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)
Copy link
Member

Choose a reason for hiding this comment

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

index

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')
Copy link
Member

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

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):
Copy link
Member

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

@pedrobaeza
Copy link
Member

@hbrunn I don't know, as .travis.yml seems to be in place.

@hbrunn
Copy link
Member

hbrunn commented Nov 26, 2017

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

@pedrobaeza
Copy link
Member

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.

@pedrobaeza pedrobaeza closed this Nov 26, 2017
@pedrobaeza pedrobaeza reopened this Nov 26, 2017
@hbrunn
Copy link
Member

hbrunn commented Nov 26, 2017

@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

@mohamedhabibchallouf
Copy link
Author

@hbrunn i work on it now :)

@pnajman-modoolar
Copy link

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 project_agile (a.k.a Odoo Scrummer) code which will be released here in the up coming days.

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,
Petar Najman

@hbrunn
Copy link
Member

hbrunn commented Nov 27, 2017

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...

@dreispt
Copy link
Member

dreispt commented Nov 27, 2017

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

@pedrobaeza
Copy link
Member

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

@hbrunn
Copy link
Member

hbrunn commented Nov 27, 2017

...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

@bealdav
Copy link
Member

bealdav commented Nov 27, 2017

@pnajman-modoolar there was a real confusion here. Thanks to notice us.
@mohamedhabibchallouf which additionnal feature brings your module ?

Thanks for your work

@dreispt
Copy link
Member

dreispt commented Nov 27, 2017

I added the "Question" tag to remind us to compare with the Scrummer module, to be made available soon, before this can be merged.

@dreispt
Copy link
Member

dreispt commented Nov 27, 2017

@elicoidal The dotfiles are there; the branch needs a rebase to have them included.

@hbrunn
Copy link
Member

hbrunn commented Nov 28, 2017

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

@mohamedhabibchallouf
Copy link
Author

@hbrunn
Actually In Tenovar Ltd we are working on this module, since an early version (OpenERP 7), now I am pushing the code in his latest version (Odoo v10),
I just discovered that there is a similarity with vertlab, In any case, I can confess, that the code I am pushing is a result of tenovar working, and its a free to use, we are pushing it because we believe in the Opensource and sharing knowledge values.

@hbrunn
Copy link
Member

hbrunn commented Nov 28, 2017

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?

@hbrunn
Copy link
Member

hbrunn commented Nov 28, 2017

@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

@pedrobaeza
Copy link
Member

@hbrunn yes, the procedure includes 2 steps for runbot:

  • Create a webhook in GitHub repository with runbot URL.
  • Add the repository in our runbot instance.

@dreispt did you do both?

@dreispt
Copy link
Member

dreispt commented Nov 28, 2017

@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?
It is AGPL open source, so of course you can use it. However, authorship attribution is required by the license, otherwise it would be plagiarism.
And the OCA has an additional requirement that the authors need to have signed the CLA.
If this is so, we should add vertelab to the authors and ask them to agree with the CLA.

What do you think @mohamedhabibchallouf ?

@samirGuesmi
Copy link
Member

@dreispt
Hi, I would thank everyone here for the effort and checking,
Here we should mention that the base Module, was done by Odoo SA, (OpenERP V6). Vertelab and others propably based on that module and start putting more functionalities and trying to cater for more Agile-Scrum values.
As a Tenovar Ltd we did an effort on functional and technical side, Saying that does not mean that we are against adding more authors, we pushed it into OCA community to share our experience around Agile Scrum methodolgy.
Contributors are more than welcome, and of course, will be added to the authors.

screenshot of scrum agile development method - odoo apps

@hbrunn
Copy link
Member

hbrunn commented Nov 28, 2017

that this all derived from odoo's project_scrum somehow is clear and nobody questions this. That's also not the problem we're talking about here. The question is: Is this a further development of only odoo's sources or is this a derived work of @vertelab's derived work, which would force us to ask them for waiving their copyright or signing our CLA if we want to use the code. Alternative is to simply rewrite sections of code in question, preferably by a person who hasn't seen the original code before.

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.

@samirGuesmi
Copy link
Member

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

@robch2342
Copy link

robch2342 commented Nov 28, 2017

@hbrunn
For what it's worth, I have signed the ICLA, and I believe my boss (Anders Wallenquist) signed the CCLA for Vertel AB as well. If this is a derivative of our work then we would ofc want Vertel AB to be mentioned among the authors.

@hbrunn
Copy link
Member

hbrunn commented Nov 28, 2017

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!

@dreispt
Copy link
Member

dreispt commented Nov 28, 2017

I checked and Vertel AB has an ECLA, signed by CEO Anders Wallenquist.

@@ -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)
Copy link
Member

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)

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)
Copy link
Member

@dreispt dreispt Nov 30, 2017

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.

@daramousk
Copy link
Member

@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?

@hbrunn
Copy link
Member

hbrunn commented May 16, 2018

@daramousk please start a new one, this PR hasn't been updated for more than half a year

@hbrunn
Copy link
Member

hbrunn commented May 17, 2018

closing this in favor of #16 because of lack of activity and because we commit to get this done

@hbrunn hbrunn closed this May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.