-
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 #210
base: 10.0
Are you sure you want to change the base?
Conversation
… automatic create a extra time record
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.
small details
class ProjectTaskInherit(models.Model): | ||
_inherit = 'project.task' | ||
|
||
sub_extra_time = fields.Float( |
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.
better total_extra_time
?
current_user = log.env.user | ||
remaining = log.remaining_hours | ||
spending_hours = 0 | ||
if not log.env.context.get('flag') and \ |
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.
flag?
remaining = log.remaining_hours | ||
spending_hours = 0 | ||
if not log.env.context.get('flag') and \ | ||
not log.env.context.get('flag_remaine'): |
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.
flag_remaine?
if remaining < 0: | ||
raise UserError( | ||
_( | ||
'The task has no enough time left, ' |
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 ->not
if not is_exist and self.project_id.user_id != current_user: | ||
raise UserError( | ||
_('You do not have permission to ' | ||
'create task belong to this 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.
belong to -> in
default=_get_task_id, readonly="True" | ||
) | ||
reason = fields.Text('Reason', help='the reason of apply') | ||
apply_hours = fields.Float('Apply Hours', help='the length of apply time') |
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.
help='Duration of applied time extension'
Extra Time Application | ||
====================== | ||
This module adds functionality to the application time and | ||
will not allow to add new items if the task time is less than 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.
item -> timesheets
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 perido
====================== | ||
Extra Time Application | ||
====================== | ||
This module adds functionality to the application time and |
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 module adds functionality of time application to extend the remaining time in tasks and
This module adds functionality to the application time and | ||
will not allow to add new items if the task time is less than 0 | ||
|
||
Bug Tracker |
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 runbot
@seb-elico what about this PR? |
replace #206
@Elico-Corp/odoo-reviewers