[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:
@@ -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' : "[('user_ids', 'in', [uid])]"}" data-hotkey="q" groups="base.group_user"/>
|
||||
<button name="action_unassign_me" string="Unassign Me" type="object" class="oe_highlight"
|
||||
attrs="{'invisible' : "[('user_ids', 'not in', [uid])]"}" 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' : "['|', ('user_ids', 'in', uid), ('user_ids', '!=', [])]"}" data-hotkey="q"/>
|
||||
<button name="action_assign_to_me" string="Assign to Me" type="object" attrs="{'invisible': "['|', ('user_ids', 'in', uid), ('user_ids', '=', [])]"}" 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"/>
|
||||
|
||||
Reference in New Issue
Block a user