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

[NEW] 360-degree-feedback module #19

Closed
wants to merge 4 commits into from

Conversation

mileo
Copy link
Member

@mileo mileo commented Nov 1, 2016

@mileo mileo force-pushed the feature/8.0-360-feedback branch 2 times, most recently from 068f14c to 8a2d715 Compare November 3, 2016 09:48
@coveralls
Copy link

coveralls commented Nov 3, 2016

Coverage Status

Coverage decreased (-4.8%) to 61.572% when pulling 8a2d715 on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

@coveralls
Copy link

coveralls commented Nov 3, 2016

Coverage Status

Coverage decreased (-4.8%) to 61.572% when pulling f1732cb on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.8%) to 61.572% when pulling 6b46fe2 on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.8%) to 61.572% when pulling 6b46fe2 on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.8%) to 61.572% when pulling c60401c on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.8%) to 61.572% when pulling c60401c on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.6%) to 61.739% when pulling 363ae93 on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.6%) to 61.739% when pulling 363ae93 on kmee:feature/8.0-360-feedback into 097493d on OCA:8.0.

Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

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

Hey @mileo, please increase coverage, complete the README and remove empty keys in the manifest file.

'hr_evaluation'
],
'data': [
],
Copy link
Member

Choose a reason for hiding this comment

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

Remove empty keys

@coveralls
Copy link

coveralls commented Nov 29, 2016

Coverage Status

Coverage decreased (-5.1%) to 61.207% when pulling 28accd8 on kmee:feature/8.0-360-feedback into abd11f4 on OCA:8.0.

@mileo mileo changed the title [WIP][NEW] 360-degree-feedback module [NEW] 360-degree-feedback module Nov 30, 2016
@mileo
Copy link
Member Author

mileo commented Nov 30, 2016

Hi, @tarteo No tests add yet, but can be tag as need review.

@coveralls
Copy link

coveralls commented Nov 30, 2016

Coverage Status

Coverage decreased (-5.1%) to 61.207% when pulling f999589 on kmee:feature/8.0-360-feedback into abd11f4 on OCA:8.0.

@tarteo
Copy link
Member

tarteo commented Dec 5, 2016

@mileo I'm not authorized to do that.

@dreispt dreispt added this to the 8.0 milestone Dec 5, 2016
@dreispt
Copy link
Sponsor Member

dreispt commented Dec 5, 2016

The linter found a small issue: https://travis-ci.org/OCA/survey/jobs/179964796#L314

Copy link
Sponsor Member

@dreispt dreispt left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!
I made a few questions and suggestions.


To use this module, you need to:

#. Go to ...
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Go ahead and write something about the Configuration steps to perform, and guide a new user to the steps to use it.

------------

* Firstname Lastname <email.address@example.org>
* Second Person <second.person@example.org>
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Put your name here 😄


Source: https://en.wikipedia.org/wiki/360-degree_feedback

"""
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

It's best to move this text into the README

for phase in evaluation.plan_id.phase_ids:
if phase.action != '360':
return super(HrEvaluationEvaluation,
self).button_plan_in_progress()
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

You want to perform superon evaluation instead of self.
And on the 360 case, do we really need to completely override/ignore the parent code?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes because core implementation set state as waiting withouy any validation

https://github.com/odoo/odoo/blob/8.0/addons/hr_evaluation/hr_evaluation.py#L230

[('department_id', '=',
evaluation.employee_id.department_id.id)]
)
children |= evaluation.employee_id
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

It would be nice to isolate this children logic into it's own preparation method.
That would make it easier to override/customize this logic.
For example, it could be extended to add Customer you worked to, or to implement some randomization on the final list.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.3%) to 61.044% when pulling 3be59dd on kmee:feature/8.0-360-feedback into 5d76df9 on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.3%) to 61.044% when pulling 3be59dd on kmee:feature/8.0-360-feedback into 5d76df9 on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.3%) to 61.044% when pulling 74f300f on kmee:feature/8.0-360-feedback into 5d76df9 on OCA:8.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-5.3%) to 61.044% when pulling 74f300f on kmee:feature/8.0-360-feedback into 5d76df9 on OCA:8.0.

@dreispt
Copy link
Sponsor Member

dreispt commented Jan 6, 2017

@mileo Thinking a bit longer on this, I think this module would be much better hosted in the OCA/hr project.
What do you think?

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.3%) to 61.044% when pulling 53dfcb2 on kmee:feature/8.0-360-feedback into 5d76df9 on OCA:8.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-5.3%) to 61.044% when pulling 53dfcb2 on kmee:feature/8.0-360-feedback into 5d76df9 on OCA:8.0.

@mileo
Copy link
Member Author

mileo commented Jan 6, 2017

@dreispt We are running our first evaluation internally this week. If we do not detect any bug i will make a new PR in hr.

But I'm not intending to add tests for now.

'author': 'KMEE,Odoo Community Association (OCA)',
'website': 'www.kmee.com.br',
'depends': [
'hr_evaluation'
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

This cries out "put in the the hr project!" 😄

item.phase_id.action == '360-anonymous'):
item.user_id = False
item.request_id.partner_id = False
item.request_id.email = False
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Use a more efficient single write call instead of the three implicit write operations?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Reading it again: why is a constraint validation function performing writes on the data?

)

@api.multi
def button_plan_in_progress(self):
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Is this overriding an hr_evaluation method? We should perform a super() call somewhere in order not to break the inheritance chain.
Also, the logic added is non-trivial enough to deserve a docstring explanation .


from openerp import api, fields, models

evaluation_360_list = []
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Shouldn't we use uppercase for globals?


children = self.env['hr.employee']
for item in evaluation_360_list:
children |= item(self, evaluation)
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

In a 360 evaluation not every evaluator is an Employee.
AFAIK it is common to ask evaluations from other Partners, such as Customers and Suppliers.

parser.parse(
datetime.now().strftime('%Y-%m-%d')
) + relativedelta(months=+1)).strftime(
'%Y-%m-%d'),
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Instead of a hardcoded deadline computation, it would be much nicer (and easier) to have this date configured in the Evaluation Plan.

@rafaelbn
Copy link
Member

Hi @mileo , do you want to continue with this PR? @dreispt made some comments. Let me know please. Thanks

@rafaelbn
Copy link
Member

Note that we are in the OCA Code Sprint and if runbot, travis are green and test coverage is above 80% you can get this merge today! Thanks!

@mileo
Copy link
Member Author

mileo commented May 31, 2017

Hi, @rafaelbn

I can´ t continue Today. But we are using in our Odoo in production.

Fell free to review Daniel comments.

Thanks in advance!

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 10, 2022
@github-actions github-actions bot closed this May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants