summaryrefslogtreecommitdiff
path: root/addons/project/models/project.py
diff options
context:
space:
mode:
authorjbm-odoo <jbm@odoo.com>2020-08-28 07:31:13 +0000
committerjbm-odoo <jbm@odoo.com>2020-09-02 13:17:55 +0000
commit5b3804402b3ebee5abe7004b8f8caccadaabfe1e (patch)
tree69bca5700824ae3e8cf35e8a2242689dc3d72bd5 /addons/project/models/project.py
parent9cae18b055f5eaf6de02c25bafc42cb541376830 (diff)
[FIX] hr_timesheet: Widget for planned hours
Before this commit: The field `planned_hours` and `subtask_planned_hours` are present twice. This causes problems with widget: different widgets are put on different fields, but only the last on was put on all of them. Code to edit label with hours/days is not flexible, we need to write each possibilities. After this commit: All fields are present only once in the view. A new widget is created to manage days with a factor. In this new widget, instead of having a toggle button, we can insert a float. When the widget timesheet_uom is set on a field, we modify his string with hours/days. closes odoo/odoo#56702 Taskid: 2326216 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/project/models/project.py')
-rw-r--r--addons/project/models/project.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/project/models/project.py b/addons/project/models/project.py
index dca8b1407ef..c75234eba9b 100644
--- a/addons/project/models/project.py
+++ b/addons/project/models/project.py
@@ -586,7 +586,7 @@ class Task(models.Model):
compute='_compute_project_id', store=True, readonly=False,
index=True, tracking=True, check_company=True, change_default=True)
planned_hours = fields.Float("Initially Planned Hours", help='Time planned to achieve this task (including its sub-tasks).', tracking=True)
- subtask_planned_hours = fields.Float("Sub-tasks Planned Hours", compute='_compute_subtask_planned_hours', help="Sum of the planned hours of all the sub-tasks linked to this task. Usually less or equal to the initially planned hours of this task.")
+ subtask_planned_hours = fields.Float("Sub-tasks Planned Hours", compute='_compute_subtask_planned_hours', help="Sum of the time planned of all the sub-tasks linked to this task. Usually less or equal to the initially time planned of this task.")
user_id = fields.Many2one('res.users',
string='Assigned to',
default=lambda self: self.env.uid,