-
Notifications
You must be signed in to change notification settings - Fork 76
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
[ADD][BR1228][T24770]Extra time application #206
Conversation
Is it ready to be reviewed @Miya609 ? |
@eric Caudal not yet.I am make test more perfect.
…------------------ Original ------------------
From: "Eric @ Elico Corp"<[email protected]>;
Date: Fri, Dec 15, 2017 03:58 PM
To: "Elico-Corp/odoo-addons"<[email protected]>;
Cc: "Miya Xing-Elico corp"<[email protected]>; "Mention"<[email protected]>;
Subject: Re: [Elico-Corp/odoo-addons] [ADD][BR1228][T24770]Extra timeapplication (#206)
Is it ready to be reviewed @Miya609 ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
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 fix
|
||
{ | ||
'name': 'Extra Time Application', | ||
'version': '10.0.1.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.
why version is '10.0.1.0.0'?
user = self.env.user | ||
is_exist = user.has_group( | ||
'extra_time_application.group_project_task_manager') | ||
remaining = self.remaining_hours |
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.
adapt api.multi
'The task have no enough time, ' | ||
'please Apply for more extra time' | ||
)) | ||
if not vals.get('project_id.is_modified'): |
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.
what't this?
submit_user_id = fields.Many2one( | ||
'res.users', 'Applicant', help='Applicant', | ||
) | ||
task_no = fields.Many2one('project.task', 'Task No', help='Task No') |
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.
m2o field should be named xxx_id
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.
Too many simple mistakes
extra_time_application/LICENSE
Outdated
@@ -0,0 +1,11 @@ | |||
Elico Proprietary License v1.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.
No need this file. This module can be AGPLv3
extra_time_application/README.rst
Outdated
------------ | ||
|
||
* Miya Xing <[email protected]> | ||
|
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 the other contributors (Eric, Sebastien, Hulk)
|
||
{ | ||
'name': 'Extra Time Application', | ||
'version': '10.0.0.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.
Actually @lonelysun 10.0.1.0.0 should be the correct start (first version of the module in v10)
'version': '10.0.0.0.0', | ||
'author': "Elico Corp", | ||
'website': 'https://www.elico-corp.com', | ||
'license': 'Other proprietary', |
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 are not being logical/consistent: here it says proprietary but everywhere you say AGPL!
license should be AGPLv3
log.env['extra.time.application'].create({ | ||
'submit_user_id': user.id, | ||
'task_id': log.id, | ||
'reason': 'Automaticity create From PM or Reviewer', |
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.
Automatically created from PM or Reviewer
@@ -0,0 +1,29 @@ | |||
# -*- coding: utf-8 -*- | |||
# © 2017 Elico Corp (www.elico-corp.com) | |||
# Elico Proprietary License v1.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.
license is AGPL (everywhere)
self.task_1.write(vals_2) | ||
try: | ||
self.task_2.write(vals_2) | ||
except Exception: |
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 am surprised: should not this trigger an error so that the test fails?
self.sub_extra_time = 0 | ||
self.timesheet_ids = self.env['account.analytic.line'].write([[ | ||
0, False, { | ||
'date_time': '2017-12-15', |
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.
For all date, I would suggest to use today() and relative dates in the future today()+2 for example
@api.multi | ||
def subscribe(self): | ||
user = self.env.user | ||
is_exist = user.has_group( |
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.
Improve the variable name
self.env['extra.time.application'].create({ | ||
'submit_user_id': self.submit_user_id.id, | ||
'task_id': self.task_id.id, | ||
'reason': 'Automaticity create From PM or Reviewer', |
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.
Automatically created from
@elicoidal No need for draft state,and I fix other error,could you review it? |
Travis still failing it seems |
class ProjectProjectInherit(models.Model): | ||
_inherit = 'project.project' | ||
|
||
is_modified = fields.Boolean() |
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.
What is this for?
This column is never assigned and has no title.
What is the usage?
cc @lonelysun
@elicoidal Please review it. |
Travis is still failing |
I’m finding the reason now.
Hulk Liu [Developer]
Phone: +86 186 1691 1517 (Cell), +86 21 6211 8017/27/37 (Office)
Elico Shanghai (Hong Kong/Shenzhen/Singapore) <http://www.elico-corp.com/>
Odoo Gold Partner // Best Odoo Partner APAC 2014 and 2016
Sent by Shanghai Elico Limited - 上海寰享网络科技有限公司 <http://www.elico-corp.com/> using Odoo <https://www.odoo.com/> about Timesheet Week 47 <https://www.elico-corp.com/web?db=elico_stable#action=mail.action_mail_redirect&login=hulk.liu%40elico-corp.com&message_id=417889>
|
… automatic create a extra time record
@seb-elico Could you tell me the reason that why the travis not working? |
move to #210 |
No description provided.