summaryrefslogtreecommitdiff
path: root/addons/hr_timesheet
diff options
context:
space:
mode:
authorHardik Prajapati <hpr@odoo.com>2020-04-07 12:15:57 +0000
committerYannick Tivisse <yti@odoo.com>2020-06-24 11:10:33 +0000
commit63cbe8678a35ddfbdeed731b1da28fa5a3b71173 (patch)
tree4e1e8cd33c5cd828ffc87accadd85f00102b9690 /addons/hr_timesheet
parentfdc20d13bb6c4f22bcfcf88384f8a13a2cb4b005 (diff)
[IMP] project,sale,hr(_timesheet): Generic improments for project
Done the below several improvement on project: - move the stage description and tooltips to the debug mode - remove the 'need assistance' tag - Change the app description in manifest file 'Organize and plan your projects.' - Change the burger menu sequence into: Edit/Delete/Share/Set Cover Image - change the description of the pad feature into, 'edit tasks description collaboratively in real time. see each author's text in a distinct color.' - add the following tooltip for the allow_billable field, 'invoice your time and material from tasks.' - add an fa-stopwatch icon in front of the Start & the Stop buttons in task's form view - rename the 'validate time spent' modal into 'confirm time spent ' + increase the size of the description field + this field should not be required - project overview: rename 'Hours recorded' into' Recorded Hours' - project form view: disable the creation for the portal users field - Rename the 'ready for next stage' kanban state into 'Ready' TaskID: 2232051 Related Enterprise PR: https://github.com/odoo/enterprise/pull/9961 closes odoo/odoo#49694 Closes: #49694 Related: odoo/enterprise#9961 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_timesheet')
-rw-r--r--addons/hr_timesheet/wizard/project_task_create_timesheet.py5
-rw-r--r--addons/hr_timesheet/wizard/project_task_create_timesheet_views.xml12
2 files changed, 4 insertions, 13 deletions
diff --git a/addons/hr_timesheet/wizard/project_task_create_timesheet.py b/addons/hr_timesheet/wizard/project_task_create_timesheet.py
index df74d492a10..e55043e982d 100644
--- a/addons/hr_timesheet/wizard/project_task_create_timesheet.py
+++ b/addons/hr_timesheet/wizard/project_task_create_timesheet.py
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from odoo import api, fields, models, _
+from odoo import api, fields, models
from datetime import datetime
-from odoo.exceptions import UserError
class ProjectTaskCreateTimesheet(models.TransientModel):
@@ -18,9 +17,7 @@ class ProjectTaskCreateTimesheet(models.TransientModel):
active_id = self._context.get('active_id')
if 'task_id' in fields and active_id:
- task_id = self.env['project.task'].browse(active_id)
result['task_id'] = active_id
- result['description'] = task_id.name
return result
time_spent = fields.Float('Time', digits=(16, 2))
diff --git a/addons/hr_timesheet/wizard/project_task_create_timesheet_views.xml b/addons/hr_timesheet/wizard/project_task_create_timesheet_views.xml
index 2b5deaf854a..db26070c345 100644
--- a/addons/hr_timesheet/wizard/project_task_create_timesheet_views.xml
+++ b/addons/hr_timesheet/wizard/project_task_create_timesheet_views.xml
@@ -7,15 +7,9 @@
<field name="arch" type="xml">
<form string="Save time">
<group>
- <group>
- <field name="task_id" invisible="True"/>
- <label for="time_spent"/>
- <div class="o_row" >
- <field name="time_spent" widget="float_time" required="True"/>
- hours
- </div>
- <field name="description" widget="text" required="True"/>
- </group>
+ <field name="task_id" invisible="True"/>
+ <field name="time_spent" string="Duration" class="oe_inline" widget="float_time" required="True"/>
+ <field name="description" widget="text" placeholder="Describe your activity..."/>
</group>
<footer>
<button string="Save" type="object" name="save_timesheet" class="btn btn-primary"/>