diff options
| -rw-r--r-- | addons/hr_timesheet/wizard/project_task_create_timesheet.py | 5 | ||||
| -rw-r--r-- | addons/hr_timesheet/wizard/project_task_create_timesheet_views.xml | 12 | ||||
| -rw-r--r-- | addons/pad_project/models/project.py | 2 | ||||
| -rw-r--r-- | addons/pad_project/views/project_views.xml | 3 | ||||
| -rw-r--r-- | addons/project/__manifest__.py | 2 | ||||
| -rw-r--r-- | addons/project/models/project.py | 2 | ||||
| -rw-r--r-- | addons/project/views/project_views.xml | 8 | ||||
| -rw-r--r-- | addons/project/views/res_config_settings_views.xml | 2 | ||||
| -rw-r--r-- | addons/sale_timesheet/models/project.py | 2 | ||||
| -rw-r--r-- | addons/sale_timesheet/views/hr_timesheet_templates.xml | 6 | ||||
| -rw-r--r-- | 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 @@ <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"/> diff --git a/addons/pad_project/models/project.py b/addons/pad_project/models/project.py index 8c58209a200..919755b9987 100644 --- a/addons/pad_project/models/project.py +++ b/addons/pad_project/models/project.py @@ -49,7 +49,7 @@ class ProjectProject(models.Model): pad_availability = fields.Selection([ ('internal', 'Internal Users'), - ('portal', 'Portal Users') + ('portal', 'Internal Users & Portal Users') ], compute='_compute_pad_availability', store=True, readonly=False, string='Availability of collaborative pads', required=True, default='internal') diff --git a/addons/pad_project/views/project_views.xml b/addons/pad_project/views/project_views.xml index 81278874bc9..d4dee168f2a 100644 --- a/addons/pad_project/views/project_views.xml +++ b/addons/pad_project/views/project_views.xml @@ -28,7 +28,8 @@ <div class="o_setting_right_pane"> <label for="use_pads" string="Collaborative Pads"/> <div class="text-muted"> - Use collaborative rich text pads on tasks + Edit tasks' description collaboratively in real time.<br/> + See each author's text in a distinct color. </div> <div class="content-group" attrs="{'invisible': ['|', ('use_pads', '=', False), ('privacy_visibility', '!=', 'portal')]}"> <div class="mt16 row"> diff --git a/addons/project/__manifest__.py b/addons/project/__manifest__.py index d727cf9cfc2..34a7624b63b 100644 --- a/addons/project/__manifest__.py +++ b/addons/project/__manifest__.py @@ -7,7 +7,7 @@ 'website': 'https://www.odoo.com/page/project-management', 'category': 'Services/Project', 'sequence': 10, - 'summary': 'Organize and schedule your projects ', + 'summary': 'Organize and plan your projects', 'depends': [ 'analytic', 'base_setup', diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 5136aa13116..4ab3f1380b3 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -29,7 +29,7 @@ class ProjectTaskType(models.Model): 'Red Kanban Label', default=lambda s: _('Blocked'), translate=True, required=True, help='Override the default value displayed for the blocked state for kanban selection, when the task or issue is in that stage.') legend_done = fields.Char( - 'Green Kanban Label', default=lambda s: _('Ready for Next Stage'), translate=True, required=True, + 'Green Kanban Label', default=lambda s: _('Ready'), translate=True, required=True, help='Override the default value displayed for the done state for kanban selection, when the task or issue is in that stage.') legend_normal = fields.Char( 'Grey Kanban Label', default=lambda s: _('In Progress'), translate=True, required=True, diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index 661a0ea955f..f452d6fb870 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -307,7 +307,7 @@ <field name="analytic_account_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" context="{'default_partner_id': partner_id}" groups="analytic.group_analytic_accounting"/> <field name="privacy_visibility" widget="radio"/> <field name="allowed_internal_user_ids" widget="many2many_tags" attrs="{'invisible': [('privacy_visibility', '!=', 'followers')]}"/> - <field name="allowed_portal_user_ids" widget="many2many_tags" attrs="{'invisible': [('privacy_visibility', '!=', 'portal')]}"/> + <field name="allowed_portal_user_ids" widget="many2many_tags" options="{'no_create': True}" attrs="{'invisible': [('privacy_visibility', '!=', 'portal')]}"/> <field name="company_id" groups="base.group_multi_company"/> </group> @@ -788,7 +788,11 @@ <div class="dropdown-menu" role="menu"> <a t-if="widget.editable" role="menuitem" type="set_cover" data-auto-open="1" class="dropdown-item" data-field="displayed_image_id">Set Cover Image</a> <a name="%(portal.portal_share_action)d" role="menuitem" type="action" class="dropdown-item">Share</a> - <a t-if="widget.editable" role="menuitem" type="edit" class="dropdown-item">Edit Task</a> + <a t-if="widget.editable" role="menuitem" type="edit" class="dropdown-item">Edit</a> + <a t-if="widget.editable" role="menuitem" class="dropdown-item" name="toggle_active" type="object"> + <t t-if="record.active.raw_value">Archive</t> + <t t-if="!record.active.raw_value">Restore</t> + </a> <a t-if="widget.deletable" role="menuitem" type="delete" class="dropdown-item">Delete</a> <div role="separator" class="dropdown-divider"></div> <ul class="oe_kanban_colorpicker" data-field="color"/> diff --git a/addons/project/views/res_config_settings_views.xml b/addons/project/views/res_config_settings_views.xml index 79b8e2a03cb..03db2df0758 100644 --- a/addons/project/views/res_config_settings_views.xml +++ b/addons/project/views/res_config_settings_views.xml @@ -17,7 +17,7 @@ <div class="o_setting_right_pane" name="pad_project_right_pane"> <label for="module_pad"/> <div class="text-muted"> - Use collaborative rich text pads on tasks + Edit tasks' description collaboratively in real time. See each author's text in a distinct color. </div> </div> </div> diff --git a/addons/sale_timesheet/models/project.py b/addons/sale_timesheet/models/project.py index 411e2f82202..87a56b3ecac 100644 --- a/addons/sale_timesheet/models/project.py +++ b/addons/sale_timesheet/models/project.py @@ -34,7 +34,7 @@ class Project(models.Model): sale_line_employee_ids = fields.One2many('project.sale.line.employee.map', 'project_id', "Sale line/Employee map", copy=False, help="Employee/Sale Order Item Mapping:\n Defines to which sales order item an employee's timesheet entry will be linked." "By extension, it defines the rate at which an employee's time on the project is billed.") - allow_billable = fields.Boolean("Bill from Tasks") + allow_billable = fields.Boolean("Bill from Tasks", help="Invoice your time and material from tasks.") display_create_order = fields.Boolean(compute='_compute_display_create_order') timesheet_product_id = fields.Many2one( 'product.product', string='Timesheet Product', diff --git a/addons/sale_timesheet/views/hr_timesheet_templates.xml b/addons/sale_timesheet/views/hr_timesheet_templates.xml index 61051d404e7..540ee5c7c27 100644 --- a/addons/sale_timesheet/views/hr_timesheet_templates.xml +++ b/addons/sale_timesheet/views/hr_timesheet_templates.xml @@ -47,8 +47,8 @@ </t> <t t-if="isinstance(stat_button['name'], list)"> <div class="oe_inline"> - <span class="o_stat_value mr-1" t-if="'count' in stat_button"> - <t t-esc="stat_button['count']"/> + <span class="o_stat_value mr-1"> + <t t-esc="stat_button.get('count')"/> </span> <span class="o_stat_value"> <t t-esc="stat_button['name'][0]"/> @@ -64,7 +64,7 @@ </div> <div class="o_title"> - <h2>Hours recorded and Profitability</h2> + <h2>Recorded Hours and Profitability</h2> </div> <t t-set="display_cost" t-value="dashboard['profit']['expense_cost'] != 0.0"/> diff --git a/addons/sale_timesheet/views/project_task_views.xml b/addons/sale_timesheet/views/project_task_views.xml index 54d2a598a7b..bc694b5e06f 100644 --- a/addons/sale_timesheet/views/project_task_views.xml +++ b/addons/sale_timesheet/views/project_task_views.xml @@ -41,7 +41,7 @@ <div class="text-muted" id="allow_billable_setting"> Invoice your time and material from tasks </div> - <field name="timesheet_product_id" attrs="{'invisible': ['|', ('allow_billable', '=', False), ('allow_timesheets', '=', False)], 'required': ['&', ('allow_billable', '=', True), ('allow_timesheets', '=', True)]}"/> + <field name="timesheet_product_id" attrs="{'invisible': ['|', ('allow_billable', '=', False), ('allow_timesheets', '=', False)], 'required': ['&', ('allow_billable', '=', True), ('allow_timesheets', '=', True)]}" context="{'default_type': 'service'}"/> </div> </div> </div> |
