[IMP] project: remove assign_me button and clock icon from task form view

Description of the issue/feature this PR addresses:
Before this commit assign_me button and clock icon from start button is shown in
project task , project sharing as well as helpdesk ticket.

This commit remove assign_me buttom and clock icon from start button in project
task, project sharing and helpdesk ticket.

task-3292056

closes odoo/odoo#120378

Related: odoo/enterprise#40630
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
ravb-odoo
2023-05-10 19:17:07 +02:00
parent 728ceccca1
commit 571c08256f
3 changed files with 0 additions and 12 deletions
-6
View File
@@ -1356,12 +1356,6 @@ class Task(models.Model):
self.description = message.body
return super(Task, self)._message_post_after_hook(message, msg_vals)
def action_assign_to_me(self):
self.write({'user_ids': [(4, self.env.user.id)]})
def action_unassign_me(self):
self.write({'user_ids': [Command.unlink(self.env.uid)]})
def _get_all_subtasks(self):
return self.browse(set.union(set(), *self._get_subtask_ids_per_task_id().values()))
@@ -125,10 +125,6 @@
<field name="arch" type="xml">
<form string="Project Sharing: Task" class="o_form_project_tasks">
<header>
<button name="action_assign_to_me" string="Assign to Me" type="object" class="oe_highlight"
attrs="{'invisible' : &quot;[('user_ids', 'in', [uid])]&quot;}" data-hotkey="q" groups="base.group_user"/>
<button name="action_unassign_me" string="Unassign Me" type="object" class="oe_highlight"
attrs="{'invisible' : &quot;[('user_ids', 'not in', [uid])]&quot;}" data-hotkey="q"/>
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('project_id', '=', False), ('stage_id', '=', False)]}" />
</header>
<div groups="base.group_user" role="status" class="alert alert-info alert-dismissible rounded-0 fade show d-print-none css_editable_mode_hidden">
@@ -251,8 +251,6 @@
<field name="company_id" invisible="1"/>
<field name="is_private" invisible="1"/>
<header>
<button name="action_assign_to_me" string="Assign to Me" type="object" class="oe_highlight" attrs="{'invisible' : &quot;['|', ('user_ids', 'in', uid), ('user_ids', '!=', [])]&quot;}" data-hotkey="q"/>
<button name="action_assign_to_me" string="Assign to Me" type="object" attrs="{'invisible': &quot;['|', ('user_ids', 'in', uid), ('user_ids', '=', [])]&quot;}" data-hotkey="q"/>
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('project_id', '=', False), ('stage_id', '=', False)]}"/>
<field name="state" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" invisible="1"/>
<field name="personal_stage_type_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('is_private', '=', False)]}" domain="[('user_id', '=', uid)]" string="Personal Stage"/>