From 63cbe8678a35ddfbdeed731b1da28fa5a3b71173 Mon Sep 17 00:00:00 2001 From: Hardik Prajapati Date: Tue, 7 Apr 2020 12:15:57 +0000 Subject: [PATCH] [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) --- .../wizard/project_task_create_timesheet.py | 5 +---- .../wizard/project_task_create_timesheet_views.xml | 12 +++--------- addons/pad_project/models/project.py | 2 +- addons/pad_project/views/project_views.xml | 3 ++- addons/project/__manifest__.py | 2 +- addons/project/models/project.py | 2 +- addons/project/views/project_views.xml | 8 ++++++-- addons/project/views/res_config_settings_views.xml | 2 +- addons/sale_timesheet/models/project.py | 2 +- .../sale_timesheet/views/hr_timesheet_templates.xml | 6 +++--- addons/sale_timesheet/views/project_task_views.xml | 2 +- 11 files changed, 21 insertions(+), 25 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 @@
- - - + + +