Current behaviour:
When checking on the activities that are "Late/Today/Future", the
resulting search view doesn't apply any filter.
Expected behaviour:
If you click on "Late" activities for Tasks, then you should see
only the "Late" activities, not all of them.
Steps to reproduce:
- Install Project
- Create a project and 3 tasks for that project
- On each task, put an activity that is "Late"/"Today"/"Future"
respectively (1 activity per task)
- Click on the activity widget (top-right in the header) > Tasks > Today
- All tasks are shown, not only those for "Today"
Reason for the problem:
Since the view refactoring from
b77f60b , search filters follow an
hierarchy of inheritance to reduce code duplication. The issue is
that it's "delegation" inheritance (so the childs have a mode of
type "primary") but all their priorities are the sames, so the
algorithm for view matching (refer to documentation) matches the
parent view, that doesn't contains the necessary filters for the
activities, which are defined a few level lower in the inheritance.
Fix:
Add descending priority in the inheritance chain so we match the
lowest child when web-client requests the search view.
Affected versions:
- saas-16.1
- saas-16.2
- master
opw-3234525
closes odoo/odoo#116337
X-original-commit: 609f484
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
993 lines
64 KiB
XML
993 lines
64 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Base search view, contains the fields and filters common to project, project sharing and fsm -->
|
|
<record id="view_task_search_form_base" model="ir.ui.view">
|
|
<field name="name">project.task.search.form</field>
|
|
<field name="model">project.task</field>
|
|
<field name="priority">100</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Tasks">
|
|
<field name="name" string="Tasks" filter_domain="['|', ('name', 'ilike', self), ('id', 'ilike', self)]"/>
|
|
<field name="tag_ids"/>
|
|
<field name="user_ids" filter_domain="[('user_ids', 'ilike', self), ('user_ids.active', 'in', [True, False])]"/>
|
|
<field name="stage_id"/>
|
|
<field name="milestone_id" groups="project.group_project_milestone"/>
|
|
<field name="partner_id" operator="child_of"/>
|
|
<field name="description"/>
|
|
<filter string="Followed" name="followed_by_me" domain="[('message_is_follower', '=', True)]"/>
|
|
<filter string="Unassigned" name="unassigned" domain="[('user_ids', '=', False)]"/>
|
|
<separator invisible="context.get('default_project_id')"/>
|
|
<filter string="Favorite Projects" name="favorite_projects" domain="[('project_id.is_favorite', '=', True)]" invisible="context.get('default_project_id')"/>
|
|
<separator groups="project.group_project_task_dependencies"/>
|
|
<filter string="Blocked" name="blocked" domain="[('state', '=', '04_waiting_normal')]" groups="project.group_project_task_dependencies"/>
|
|
<filter string="Blocking" name="blocking" domain="[('is_closed', '=', False), ('dependent_ids', '!=', False)]" groups="project.group_project_task_dependencies"/>
|
|
<separator/>
|
|
<filter string="Last Stage Update" name="date_last_stage_update" date="date_last_stage_update"/>
|
|
<separator/>
|
|
<filter string="Open Tasks" name="open_tasks" domain="[('is_closed', '=', False)]"/>
|
|
<filter string="Closed Tasks" name="closed_tasks" domain="[('is_closed', '=', True)]"/>
|
|
<filter string="Closed On" name="closed_on" domain="[('is_closed', '=', True)]" date="date_last_stage_update"/>
|
|
<separator/>
|
|
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
|
<group expand="0" string="Group By">
|
|
<filter string="Assignees" name="user" context="{'group_by': 'user_ids'}"/>
|
|
<filter string="Stage" name="stage" context="{'group_by': 'stage_id'}"/>
|
|
<filter string="Milestone" name="milestone" context="{'group_by': 'milestone_id'}" groups="project.group_project_milestone"/>
|
|
<filter string="Customer" name="customer" context="{'group_by': 'partner_id'}"/>
|
|
<filter string="Company" name="company_id" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
|
|
<filter string="Creation Date" name="create_date" context="{'group_by': 'create_date'}"/>
|
|
<filter string="Assignement Date" name="date_assign" context="{'group_by': 'date_assign'}"/>
|
|
<filter string="Last Stage Update" name="last_stage_update" context="{'group_by': 'date_last_stage_update'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Contains the fields and filters common to projet and fsm -->
|
|
<record id="view_task_search_form_project_fsm_base" model="ir.ui.view">
|
|
<field name="name">project.task.search.form.project.base</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_search_form_base"/>
|
|
<field name="mode">primary</field>
|
|
<field name="priority">50</field>
|
|
<field name="arch" type="xml">
|
|
<field name="stage_id" position="after">
|
|
<field name="project_id" string="Project"/>
|
|
</field>
|
|
<field name="partner_id" position="after">
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</field>
|
|
<field name="description" position="after">
|
|
<filter string="My Tasks" name="my_tasks" domain="[('user_ids', 'in', uid)]"/>
|
|
</field>
|
|
<filter name="stage" position="after">
|
|
<filter string="Project" name="project" context="{'group_by': 'project_id'}"/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Base search view for project only -->
|
|
<record id="view_task_search_form_project_base" model="ir.ui.view">
|
|
<field name="name">project.task.search.form.project.base</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_search_form_project_fsm_base"/>
|
|
<field name="mode">primary</field>
|
|
<field name="priority">25</field>
|
|
<field name="arch" type="xml">
|
|
<filter name="date_last_stage_update" position="after">
|
|
<filter string="Deadline" name="date_deadline" date="date_deadline"/>
|
|
</filter>
|
|
<filter name="last_stage_update" position="after">
|
|
<filter string="Deadline" name="deadline" context="{'group_by': 'date_deadline'}"/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_task_search_form" model="ir.ui.view">
|
|
<field name="name">project.task.search.form</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_search_form_project_base"></field>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<field name="description" position="after">
|
|
<field string="Properties" name="task_properties"/>
|
|
</field>
|
|
<filter name="inactive" position="before">
|
|
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]" groups="mail.group_mail_notification_type_inbox"/>
|
|
<separator/>
|
|
</filter>
|
|
<filter name="inactive" position="after">
|
|
<separator invisible="1"/>
|
|
<filter invisible="1" string="Late Activities" name="activities_overdue"
|
|
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
|
help="Show all records which has next action date is before today"/>
|
|
<filter invisible="1" string="Today Activities" name="activities_today"
|
|
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
|
<filter invisible="1" string="Future Activities" name="activities_upcoming_all"
|
|
domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_project_task_pivot" model="ir.ui.view">
|
|
<field name="name">project.task.pivot</field>
|
|
<field name="model">project.task</field>
|
|
<field name="arch" type="xml">
|
|
<pivot string="Tasks" sample="1" js_class="project_pivot">
|
|
<field name="project_id" type="row"/>
|
|
<field name="stage_id" type="col"/>
|
|
<field name="color" invisible="1"/>
|
|
<field name="sequence" invisible="1"/>
|
|
<field name="planned_hours" widget="float_time"/>
|
|
<field name="working_hours_close" widget="float_time"/>
|
|
<field name="working_hours_open" widget="float_time"/>
|
|
</pivot>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_project_task_pivot_inherit" model="ir.ui.view">
|
|
<field name="name">project.task.pivot.inherit</field>
|
|
<field name="model">project.task</field>
|
|
<field name="mode">primary</field>
|
|
<field name="inherit_id" ref="project.view_project_task_pivot"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="/pivot" position="inside">
|
|
<field name="user_ids" type="row"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="act_project_project_2_project_task_all" model="ir.actions.act_window">
|
|
<field name="name">Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field>
|
|
<field name="domain">[('project_id', '=', active_id)]</field>
|
|
<field name="context">{
|
|
'default_project_id': active_id,
|
|
'show_project_update': True,
|
|
'search_default_open_tasks': 1,
|
|
}</field>
|
|
<field name="search_view_id" ref="view_task_search_form"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No tasks found. Let's create one!
|
|
</p>
|
|
<p>
|
|
Keep track of the progress of your tasks from creation to completion.<br/>
|
|
Collaborate efficiently by chatting in real-time or via email.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Set pivot view and arrange in order -->
|
|
<record id="project_task_kanban_action_view" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="10"/>
|
|
<field name="view_mode">kanban</field>
|
|
<field name="act_window_id" ref="project.act_project_project_2_project_task_all"/>
|
|
</record>
|
|
|
|
<record id="project_task_tree_action_view" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="20"/>
|
|
<field name="view_mode">tree</field>
|
|
<field name="act_window_id" ref="project.act_project_project_2_project_task_all"/>
|
|
</record>
|
|
|
|
<record id="project_task_form_action_view" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="30"/>
|
|
<field name="view_mode">form</field>
|
|
<field name="act_window_id" ref="project.act_project_project_2_project_task_all"/>
|
|
</record>
|
|
|
|
<record id="project_all_task_calendar_action_view" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="40"/>
|
|
<field name="view_mode">calendar</field>
|
|
<field name="act_window_id" ref="project.act_project_project_2_project_task_all"/>
|
|
</record>
|
|
|
|
<record id="project_all_task_pivot_action_view" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="70"/>
|
|
<field name="view_mode">pivot</field>
|
|
<field name="view_id" ref="view_project_task_pivot_inherit"/>
|
|
<field name="act_window_id" ref="act_project_project_2_project_task_all"/>
|
|
</record>
|
|
|
|
<record id="project_all_task_graph_action_view" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="80"/>
|
|
<field name="view_mode">graph</field>
|
|
<field name="act_window_id" ref="project.act_project_project_2_project_task_all"/>
|
|
</record>
|
|
|
|
<record id="project_all_task_activity_action_view" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="90"/>
|
|
<field name="view_mode">activity</field>
|
|
<field name="act_window_id" ref="project.act_project_project_2_project_task_all"/>
|
|
</record>
|
|
|
|
<record id="project_task_action_sub_task" model="ir.actions.act_window">
|
|
<field name="name">Sub-tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field>
|
|
<field name="search_view_id" ref="project.view_task_search_form"/>
|
|
<field name="domain">[('id', 'child_of', active_id), ('id', '!=', active_id)]</field>
|
|
<field name="context">{'show_project_update': False, 'default_parent_id': active_id}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No tasks found. Let's create one!
|
|
</p>
|
|
<p>
|
|
Keep track of the progress of your tasks from creation to completion.<br/>
|
|
Collaborate efficiently by chatting in real-time or via email.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_send_mail_project_task" model="ir.actions.act_window">
|
|
<field name="name">Send Email</field>
|
|
<field name="res_model">mail.compose.message</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
<field name="context" eval="{
|
|
'default_composition_mode': 'mass_mail',
|
|
}"/>
|
|
<field name="binding_model_id" ref="project.model_project_task"/>
|
|
<field name="binding_view_types">list</field>
|
|
</record>
|
|
|
|
<record id="view_task_form2" model="ir.ui.view">
|
|
<field name="name">project.task.form</field>
|
|
<field name="model">project.task</field>
|
|
<field eval="2" name="priority"/>
|
|
<field name="arch" type="xml">
|
|
<form string="Task" class="o_form_project_tasks" js_class="project_task_form">
|
|
<field name="allow_subtasks" invisible="1" />
|
|
<field name="is_closed" invisible="1" />
|
|
<field name="allow_recurring_tasks" invisible="1" />
|
|
<field name="recurrence_id" invisible="1" />
|
|
<field name="allow_task_dependencies" invisible="1" />
|
|
<field name="rating_last_value" invisible="1"/>
|
|
<field name="rating_count" invisible="1"/>
|
|
<field name="allow_milestones" invisible="1" />
|
|
<field name="parent_id" invisible="1"/>
|
|
<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"/>
|
|
</header>
|
|
<sheet string="Task">
|
|
<div class="oe_button_box" name="button_box">
|
|
<!-- Dummy tag for organizing buttons, using position='replace' when inheriting -->
|
|
<span id="button_products" invisible="1"/>
|
|
<span id="button_worksheet" invisible="1"/>
|
|
<!-- Dummy tag used to organize buttons, englobing the 3 buttons modifies the width of the button -->
|
|
<span id="start_rating_buttons" invisible="1"/>
|
|
<field name="rating_avg" invisible="1"/>
|
|
<field name="rating_active" invisible="1"/>
|
|
<button name="action_open_ratings" type="object" attrs="{'invisible': ['|', ('rating_count', '=', 0), ('rating_active', '=', False)]}" class="oe_stat_button" groups="project.group_project_rating">
|
|
<i class="fa fa-fw o_button_icon fa-smile-o text-success" attrs="{'invisible': [('rating_avg', '<', 3.66)]}" title="Satisfied"/>
|
|
<i class="fa fa-fw o_button_icon fa-meh-o text-warning" attrs="{'invisible': ['|', ('rating_avg', '<', 2.33), ('rating_avg', '>=', 3.66)]}" title="Okay"/>
|
|
<i class="fa fa-fw o_button_icon fa-frown-o text-danger" attrs="{'invisible': [('rating_avg', '>=', 2.33)]}" title="Dissatisfied"/>
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value"><field name="rating_avg_text" nolabel="1"/></span>
|
|
<span class="o_stat_text">Last Rating</span>
|
|
</div>
|
|
</button>
|
|
<!-- Dummy tag used to organize buttons -->
|
|
<span id="end_rating_buttons" invisible="1"/>
|
|
<button name="action_open_parent_task" type="object" class="oe_stat_button" icon="fa-tasks" string="Parent Task" attrs="{'invisible': [('parent_id', '=', False)]}" groups="project.group_subtask_project"/>
|
|
<button name="action_recurring_tasks" type="object" attrs="{'invisible': ['|', ('active', '=', False), ('recurrence_id', '=', False)]}" class="oe_stat_button" icon="fa-repeat" groups="project.group_project_recurring_tasks">
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="recurring_count" widget="statinfo" nolabel="1" />
|
|
Tasks
|
|
</span>
|
|
<span class="o_stat_text">in Recurrence</span>
|
|
</div>
|
|
</button>
|
|
<button name="%(project_task_action_sub_task)d" type="action" class="oe_stat_button" icon="fa-tasks"
|
|
attrs="{'invisible' : ['|', '|', ('allow_subtasks', '=', False), ('id', '=', False), ('subtask_count', '=', 0)]}" context="{'default_user_ids': user_ids}">
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="subtask_count" widget="statinfo" nolabel="1"/>
|
|
</span>
|
|
<span class="o_stat_text">Sub-tasks</span>
|
|
</div>
|
|
</button>
|
|
<button name="action_dependent_tasks" type="object" attrs="{'invisible': [('dependent_tasks_count', '=', 0)]}" class="oe_stat_button" icon="fa-tasks" groups="project.group_project_task_dependencies">
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_text">Blocking</span>
|
|
<span class="o_stat_value ">
|
|
<field name="dependent_tasks_count" widget="statinfo" nolabel="1" />
|
|
Tasks
|
|
</span>
|
|
</div>
|
|
</button>
|
|
<!-- Dummy tag used to organize buttons -->
|
|
<span id="end_button_box" invisible="1"/>
|
|
</div>
|
|
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
|
<div class="oe_title pe-0">
|
|
<h1 class="d-flex justify-content-between align-items-center">
|
|
<div class="d-flex w-100">
|
|
<field name="priority" widget="priority_switch" class="me-3"/>
|
|
<field name="name" class="o_task_name text-truncate w-100 w-md-75 pe-2" placeholder="Task Title..."/>
|
|
</div>
|
|
<div class="d-flex justify-content-end o_state_container">
|
|
<field name="state" widget="project_task_state_selection" class="o_task_state_widget"/>
|
|
</div>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="project_id"
|
|
domain="[('active', '=', True), ('company_id', '=', company_id)]"
|
|
widget="project_private_task"
|
|
/>
|
|
<field name="milestone_id"
|
|
placeholder="e.g. Product Launch"
|
|
context="{'default_project_id': project_id}"
|
|
attrs="{'invisible': ['|', ('project_id', '=', False), ('allow_milestones', '=', False)]}"
|
|
/>
|
|
<field name="user_ids"
|
|
class="o_task_user_field"
|
|
options="{'no_open': True, 'no_quick_create': True}"
|
|
widget="many2many_avatar_user"
|
|
domain="[('share', '=', False), ('active', '=', True)]"/>
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" context="{'project_id': project_id}"/>
|
|
</group>
|
|
<group>
|
|
<field name="active" invisible="1"/>
|
|
<field name="partner_id" nolabel="0" widget="res_partner_many2one" class="o_task_customer_field" attrs="{'invisible': [('project_id', '=', False)]}"/>
|
|
<field name="partner_phone" widget="phone" attrs="{'invisible': True}"/>
|
|
<label for="date_deadline"/>
|
|
<div id="date_deadline_and_recurring_task" class="d-inline-flex w-100">
|
|
<field name="date_deadline" nolabel="1"/>
|
|
<field name="recurring_task" nolabel="1" class="ms-0" style="width: fit-content;"
|
|
widget="boolean_icon" options="{'icon': 'fa-repeat'}"
|
|
attrs="{'invisible': ['|', ('allow_recurring_tasks', '=', False), ('active', '=', False)]}"
|
|
groups="project.group_project_recurring_tasks"
|
|
/>
|
|
</div>
|
|
<label for="repeat_interval" groups="project.group_project_recurring_tasks" attrs="{'invisible': [('recurring_task', '=', False)]}" />
|
|
<div attrs="{'invisible': [('recurring_task', '=', False)]}" class="d-flex" groups="project.group_project_recurring_tasks">
|
|
<field name="repeat_interval" attrs="{'required': [('recurring_task', '=', True)]}"
|
|
class="me-2" style="max-width: 2rem !important;" />
|
|
<field name="repeat_unit" attrs="{'required': [('recurring_task', '=', True)]}"
|
|
class="me-2" style="max-width: 4rem !important;" />
|
|
<field name="repeat_type" attrs="{'required': [('recurring_task', '=', True)]}"
|
|
class="me-2" style="max-width: 15rem !important;" />
|
|
<field name="repeat_until" attrs="{'invisible': [('repeat_type', '!=', 'until')], 'required': [('repeat_type', '=', 'until')]}"
|
|
class="me-2" />
|
|
</div>
|
|
</group>
|
|
</group>
|
|
<field attrs="{'invisible': [('project_id', '=', False)]}"
|
|
name="task_properties" nolabel="1" columns="2" hideKanbanOption="1"/>
|
|
<notebook>
|
|
<page name="description_page" string="Description">
|
|
<field name="description" type="html" options="{'collaborative': true, 'resizable': false}" placeholder="Task description..."/>
|
|
</page>
|
|
<page name="sub_tasks_page" string="Sub-tasks" attrs="{'invisible': [('allow_subtasks', '=', False)]}">
|
|
<field name="child_ids"
|
|
context="{'default_user_ids': user_ids, 'default_parent_id': id,
|
|
'default_partner_id': partner_id, 'default_milestone_id': allow_milestones and milestone_id}"
|
|
widget="subtasks_one2many">
|
|
<tree editable="bottom" decoration-muted="is_closed == True">
|
|
<field name="is_closed" invisible="1"/>
|
|
<field name="allow_milestones" invisible="1"/>
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="priority" widget="priority" optional="show" nolabel="1"/>
|
|
<field name="state" widget="project_task_state_selection" optional="show" nolabel="1" options="{'hide_label': 1}" />
|
|
<field name="id" optional="hide"/>
|
|
<field name="child_text" invisible="1"/>
|
|
<field name="allow_subtasks" invisible="1"/>
|
|
<field name="name" widget="name_with_subtask_count"/>
|
|
<field name="project_id" string="Project" optional="hide" options="{'no_open': 1}"/>
|
|
<field name="milestone_id"
|
|
optional="hide"
|
|
context="{'default_project_id': project_id}"
|
|
attrs="{'invisible': [('allow_milestones', '=', False)], 'column_invisible': [('parent.allow_milestones', '=', False)]}"
|
|
/>
|
|
<field name="partner_id" optional="hide"/>
|
|
<field name="user_ids" widget="many2many_avatar_user" optional="show" domain="[('share', '=', False), ('active', '=', True)]"/>
|
|
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
|
|
<field name="company_id" invisible="1"/>
|
|
<field name="activity_ids" string="Next Activity" widget="list_activity" optional="hide"/>
|
|
<field name="date_deadline" attrs="{'invisible': [('is_closed', '=', True)]}" optional="show"/>
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide"/>
|
|
<field name="rating_last_text" string="Rating" decoration-danger="rating_last_text == 'ko'"
|
|
decoration-warning="rating_last_text == 'ok'" decoration-success="rating_last_text == 'top'"
|
|
attrs="{'invisible': [('rating_last_text', '=', 'none')]}"
|
|
class="fw-bold" widget="badge" optional="hide"/>
|
|
<field name="stage_id" optional="show" context="{'default_project_id': project_id}" invisible="1"/>
|
|
<button name="action_open_task" type="object" title="View Task" string="View Task" class="btn btn-link float-end"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page name="task_dependencies" string="Blocked By" attrs="{'invisible': [('allow_task_dependencies', '=', False)]}" groups="project.group_project_task_dependencies">
|
|
<field name="depend_on_ids" nolabel="1"
|
|
context="{'default_project_id': project_id, 'search_view_ref' : 'project.view_task_search_form', 'search_default_project_id': project_id, 'tree_view_ref': 'project.open_view_all_tasks_list_view', 'search_default_open_tasks': 1}">
|
|
<tree editable="bottom" decoration-muted="is_closed == True">
|
|
<field name="allow_milestones" invisible="1"/>
|
|
<field name="parent_id" invisible="1" />
|
|
<field name="is_closed" invisible="1" />
|
|
<field name="priority" widget="priority" optional="show" nolabel="1"/>
|
|
<field name="state" widget="project_task_state_selection" optional="show" nolabel="1"/>
|
|
<field name="child_text" invisible="1"/>
|
|
<field name="allow_subtasks" invisible="1"/>
|
|
<field name="name" widget="name_with_subtask_count"/>
|
|
<field name="id" optional="hide"/>
|
|
<field name="project_id" optional="hide" options="{'no_open': 1}" />
|
|
<field name="milestone_id"
|
|
optional="hide"
|
|
context="{'default_project_id': project_id}"
|
|
attrs="{'invisible': [('allow_milestones', '=', False)], 'column_invisible': [('parent.allow_milestones', '=', False)]}"
|
|
/>
|
|
<field name="partner_id" optional="hide"/>
|
|
<field name="parent_id" optional="hide" attrs="{'invisible': [('allow_subtasks', '=', False)]}" groups="base.group_no_one"/>
|
|
<field name="user_ids" widget="many2many_avatar_user" optional="show" domain="[('share', '=', False), ('active', '=', True)]"/>
|
|
<field name="company_id" optional="hide" groups="base.group_multi_company" />
|
|
<field name="company_id" invisible="1"/>
|
|
<field name="activity_ids" string="Next Activity" widget="list_activity" optional="hide"/>
|
|
<field name="date_deadline" attrs="{'invisible': [('is_closed', '=', True)]}" optional="show" />
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide"/>
|
|
<field name="rating_last_text" string="Rating" decoration-danger="rating_last_text == 'ko'"
|
|
decoration-warning="rating_last_text == 'ok'" decoration-success="rating_last_text == 'top'"
|
|
attrs="{'invisible': [('rating_last_text', '=', 'none')]}"
|
|
class="fw-bold" widget="badge" optional="hide"/>
|
|
<field name="stage_id" optional="show" invisible="1"/>
|
|
<button class="oe_link float-end" string="View Task" name="action_open_task" type="object"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page name="extra_info" string="Extra Info" groups="base.group_no_one">
|
|
<group>
|
|
<group>
|
|
<field name="parent_id" attrs="{'invisible': [('allow_subtasks', '=', False)]}" groups="base.group_no_one" context="{'search_view_ref' : 'project.view_task_search_form','search_default_project_id': project_id}"/>
|
|
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" context="{'default_partner_id': partner_id}"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
<field name="sequence" groups="base.group_no_one"/>
|
|
<field name="email_cc" groups="base.group_no_one"/>
|
|
<field name="displayed_image_id" groups="base.group_no_one" options="{'no_create': True}"/>
|
|
</group>
|
|
<group>
|
|
<field name="date_assign" groups="base.group_no_one"/>
|
|
<field name="date_last_stage_update" groups="base.group_no_one"/>
|
|
</group>
|
|
<group string="Working Time to Assign" attrs="{'invisible': [('working_hours_open', '=', 0.0)]}">
|
|
<field name="working_hours_open" widget="float_time" string="Hours"/>
|
|
<field name="working_days_open" string="Days"/>
|
|
</group>
|
|
<group string="Working Time to Close" attrs="{'invisible': [('working_hours_close', '=', 0.0)]}">
|
|
<field name="working_hours_close" widget="float_time" string="Hours"/>
|
|
<field name="working_days_close" string="Days"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" options="{'post_refresh':True}" groups="base.group_user"/>
|
|
<field name="activity_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="portal_share_action" model="ir.actions.act_window">
|
|
<field name="name">Share</field>
|
|
<field name="res_model">portal.share</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
<field name="binding_model_id" ref="model_project_task"/>
|
|
<field name="binding_view_types">form</field>
|
|
</record>
|
|
|
|
<record id="quick_create_task_form" model="ir.ui.view">
|
|
<field name="name">project.task.form.quick_create</field>
|
|
<field name="model">project.task</field>
|
|
<field name="priority">1000</field>
|
|
<field name="arch" type="xml">
|
|
<form class="o_form_project_tasks">
|
|
<group>
|
|
<field name="display_name" string = "Task Title" placeholder="e.g. Send Invitations" required="True"/>
|
|
<field name="project_id" widget="project_private_task" invisible="context.get('default_project_id', False)" class="o_project_task_project_field"/>
|
|
<field name="user_ids" options="{'no_open': True, 'no_quick_create': True}" domain="[('share', '=', False), ('active', '=', True)]"
|
|
widget="many2many_avatar_user"/>
|
|
<field name="company_id" invisible="1"/>
|
|
<field name="parent_id" invisible="1" groups="base.group_no_one"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="view_task_kanban">
|
|
<field name="name">project.task.kanban</field>
|
|
<field name="model">project.task</field>
|
|
<field name="arch" type="xml">
|
|
<kanban
|
|
default_group_by="stage_id"
|
|
class="o_kanban_small_column o_kanban_project_tasks"
|
|
on_create="quick_create"
|
|
quick_create_view="project.quick_create_task_form"
|
|
examples="project"
|
|
js_class="project_task_kanban" sample="1"
|
|
default_order="state, priority desc, date_deadline asc, sequence, id desc"
|
|
>
|
|
<field name="color"/>
|
|
<field name="priority"/>
|
|
<field name="stage_id" options='{"group_by_tooltip": {"description": "Description"}}'/>
|
|
<field name="user_ids"/>
|
|
<field name="partner_id"/>
|
|
<field name="sequence"/>
|
|
<field name="is_closed"/>
|
|
<field name="displayed_image_id"/>
|
|
<field name="active"/>
|
|
<field name="activity_ids"/>
|
|
<field name="activity_state"/>
|
|
<field name="rating_count"/>
|
|
<field name="rating_avg"/>
|
|
<field name="allow_subtasks"/>
|
|
<field name="child_text"/>
|
|
<field name="is_private"/>
|
|
<field name="rating_active"/>
|
|
<field name="has_late_and_unreached_milestone" />
|
|
<field name="allow_milestones" />
|
|
<field name="state" />
|
|
<field name="company_id"/>
|
|
<field name="recurrence_id" />
|
|
<field name="subtask_count"/>
|
|
<progressbar field="state" colors='{"1_done": "success", "03_approved": "success", "02_changes_requested": "warning", "1_canceled": "danger", "01_in_progress": "200", "04_waiting_normal": "200" }'/>
|
|
<templates>
|
|
<t t-name="kanban-menu" t-if="!selection_mode" groups="base.group_user">
|
|
<a t-if="widget.editable" role="menuitem" type="set_cover" 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</a>
|
|
<div role="separator" class="dropdown-divider"></div>
|
|
<ul class="oe_kanban_colorpicker" data-field="color"/>
|
|
</t>
|
|
<t t-name="kanban-box">
|
|
<div t-attf-class="{{!selection_mode ? 'oe_kanban_color_' + kanban_getcolor(record.color.raw_value) : ''}} oe_kanban_card oe_kanban_global_click">
|
|
<div class="oe_kanban_content">
|
|
<div class="o_kanban_record_top">
|
|
<div class="o_kanban_record_headings">
|
|
<strong class="o_kanban_record_title">
|
|
<s t-if="!record.active.raw_value"><field name="name" widget="name_with_subtask_count"/></s>
|
|
<t t-else=""><field name="name" widget="name_with_subtask_count"/></t>
|
|
</strong>
|
|
<span invisible="context.get('default_project_id', False)"><br/><field name="project_id" widget="project_private_task" options="{'no_open': True}"/></span>
|
|
<span t-if="record.allow_milestones.raw_value and record.milestone_id.raw_value" t-attf-class="{{record.has_late_and_unreached_milestone.raw_value ? 'text-danger' : ''}}">
|
|
<br/>
|
|
<field name="milestone_id" options="{'no_open': True}" />
|
|
</span>
|
|
<br />
|
|
<t t-if="record.partner_id.value">
|
|
<field name="partner_id"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
<div class="o_kanban_record_body">
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
|
<div t-if="record.date_deadline.raw_value" name="date_deadline" attrs="{'invisible': [('is_closed', '=', True)]}">
|
|
<field name="date_deadline" widget="remaining_days"/>
|
|
</div>
|
|
<div t-if="record.displayed_image_id.value">
|
|
<field name="displayed_image_id" widget="attachment_image"/>
|
|
</div>
|
|
</div>
|
|
<div class="o_kanban_record_bottom" t-if="!selection_mode">
|
|
<div class="oe_kanban_bottom_left">
|
|
<field name="priority" widget="priority"/>
|
|
<field name="activity_ids" widget="kanban_activity"/>
|
|
<b t-if="record.rating_active.raw_value and record.rating_count.raw_value > 0" groups="project.group_project_rating">
|
|
<span style="font-weight:bold;" class="fa fa-fw mt4 fa-smile-o text-success" t-if="record.rating_avg.raw_value >= 3.66" title="Average Rating: Satisfied" role="img" aria-label="Happy face"/>
|
|
<span style="font-weight:bold;" class="fa fa-fw mt4 fa-meh-o text-warning" t-elif="record.rating_avg.raw_value >= 2.33" title="Average Rating: Okay" role="img" aria-label="Neutral face"/>
|
|
<span style="font-weight:bold;" class="fa fa-fw mt4 fa-frown-o text-danger" t-else="" title="Average Rating: Dissatisfied" role="img" aria-label="Sad face"/>
|
|
</b>
|
|
<a t-if="record.subtask_count.raw_value and record.allow_subtasks.raw_value" class="subtask_list_button" title="See Subtasks" style="padding: 0px 5px 0px 0px; box-sizing: border-box; font-size: 20px;"/>
|
|
</div>
|
|
<div class="oe_kanban_bottom_right" t-if="!selection_mode">
|
|
<field name="state" widget="project_task_state_selection" options="{'hide_label': 1, 'is_toggle_mode': false}"/>
|
|
<field name="user_ids" widget="many2many_avatar_user" domain="[('share', '=', False)]"/>
|
|
</div>
|
|
</div>
|
|
<div class="kanban_bottom_subtasks_section"/>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- The main base of the project.task tree view -->
|
|
<record id="project_task_view_tree_main_base" model="ir.ui.view">
|
|
<field name="name">project.task.view.tree.main.base</field>
|
|
<field name="model">project.task</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Tasks" sample="1" default_order="state, priority desc, date_deadline asc, sequence, id desc">
|
|
<field name="company_id" invisible="1"/>
|
|
<field name="is_closed" invisible="1" />
|
|
<field name="is_private" invisible="1" />
|
|
<field name="sequence" invisible="1" readonly="1"/>
|
|
<field name="allow_milestones" invisible="1"/>
|
|
<field name="id" optional="hide"/>
|
|
<field name="priority" widget="priority" optional="show" nolabel="1"/>
|
|
<field name="state" widget="project_task_state_selection" optional="show" nolabel="1" options="{'hide_label': 1, 'is_toggle_mode': false}"/>
|
|
<field name="child_text" invisible="1"/>
|
|
<field name="allow_subtasks" invisible="1"/>
|
|
<field name="name" string="Title" widget="name_with_subtask_count"/>
|
|
<field name="project_id" widget="project_private_task" optional="show" readonly="1" options="{'no_open': 1}" invisible="context.get('default_project_id')"/>
|
|
<field name="milestone_id" attrs="{'invisible': [('allow_milestones', '=', False)]}" context="{'default_project_id': project_id}" groups="project.group_project_milestone" optional="hide"/>
|
|
<field name="partner_id" optional="hide" widget="res_partner_many2one" context="{'res_partner_search_mode': 'customer'}"/>
|
|
<field name="user_ids" optional="show" widget="many2many_avatar_user" domain="[('share', '=', False), ('active', '=', True)]"/>
|
|
<field name="company_id" groups="base.group_multi_company" optional="show" invisible="context.get('default_project_id')"/>
|
|
<field name="date_deadline" optional="hide" widget="remaining_days" attrs="{'invisible': [('is_closed', '=', True)]}"/>
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="show" context="{'project_id': project_id}"/>
|
|
<field name="stage_id" invisible="context.get('set_visible',False)" optional="show" readonly="not context.get('default_project_id')"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- common base of the tree view in project app -->
|
|
<record id="project_task_view_tree_base" model="ir.ui.view">
|
|
<field name="name">project.task.view.tree.base</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="project_task_view_tree_main_base"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<tree position="attributes">
|
|
<attribute name="multi_edit">1</attribute>
|
|
</tree>
|
|
<field name="date_deadline" position="after">
|
|
<field name="activity_ids" string="Next Activity" widget="list_activity" optional="show"/>
|
|
<field name="my_activity_date_deadline" string="My Deadline" widget="remaining_days" options="{'allow_order': '1'}" optional="hide"/>
|
|
<field name="rating_active" invisible="1"/>
|
|
<field name="rating_last_text" string="Rating" decoration-danger="rating_last_text == 'ko'"
|
|
decoration-warning="rating_last_text == 'ok'" decoration-success="rating_last_text == 'top'"
|
|
attrs="{'invisible': ['|', ('rating_active', '=', False), ('rating_last_text', '=', 'none')]}"
|
|
class="fw-bold" widget="badge" optional="hide" groups="project.group_project_rating"/>
|
|
</field>
|
|
<tree position="inside">
|
|
<field name="task_properties"/>
|
|
<field name="recurrence_id" invisible="1" />
|
|
</tree>
|
|
<xpath expr="//field[@name='partner_id']" position="after">
|
|
<field name="parent_id" optional="hide" context="{'search_view_ref' : 'project.view_task_search_form', 'search_default_project_id': project_id}" attrs="{'invisible': [('allow_subtasks', '=', False)]}" groups="base.group_no_one"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- main tree view -->
|
|
<record id="view_task_tree2" model="ir.ui.view">
|
|
<field name="name">project.task.tree</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="project_task_view_tree_base"/>
|
|
<field name="mode">primary</field>
|
|
<field name="priority">2</field>
|
|
<field name="arch" type="xml">
|
|
<tree position="attributes">
|
|
<attribute name="js_class">project_task_list</attribute>
|
|
<attribute name="default_group_by">stage_id</attribute>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_task_calendar" model="ir.ui.view">
|
|
<field name="name">project.task.calendar</field>
|
|
<field name="model">project.task</field>
|
|
<field eval="2" name="priority"/>
|
|
<field name="arch" type="xml">
|
|
<calendar date_start="date_deadline" string="Tasks" mode="month"
|
|
color="color" event_limit="5" hide_time="true"
|
|
event_open_popup="true" quick_add="false" show_unusual_days="True"
|
|
js_class="project_calendar"
|
|
scales="month,year">
|
|
<field name="allow_milestones" invisible="1" />
|
|
<field name="project_id" widget="project_private_task"/>
|
|
<field name="milestone_id" attrs="{'invisible': [('allow_milestones', '=', False)]}"/>
|
|
<field name="user_ids" widget="many2many_avatar_user"/>
|
|
<field name="partner_id" attrs="{'invisible': [('partner_id', '=', False)]}"/>
|
|
<field name="priority" widget="priority"/>
|
|
<field name="date_deadline"/>
|
|
<field name="tag_ids" widget="many2many_tags" attrs="{'invisible': [('tag_ids', '=', [])]}"/>
|
|
<field name="stage_id"/>
|
|
</calendar>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_task_all_calendar" model="ir.ui.view">
|
|
<field name="name">project.task.all.calendar</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_calendar"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//calendar" position="attributes">
|
|
<attribute name="color">project_color</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='project_id']" position="attributes">
|
|
<attribute name="filters">1</attribute>
|
|
<attribute name="color">color</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_project_task_graph" model="ir.ui.view">
|
|
<field name="name">project.task.graph</field>
|
|
<field name="model">project.task</field>
|
|
<field name="arch" type="xml">
|
|
<graph string="Tasks" sample="1" js_class="project_graph">
|
|
<field name="project_id"/>
|
|
<field name="stage_id"/>
|
|
<field name="color" invisible="1"/>
|
|
<field name="sequence" invisible="1"/>
|
|
<field name="rating_last_value" string="Rating (/5)"/>
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="project_task_view_activity" model="ir.ui.view">
|
|
<field name="name">project.task.activity</field>
|
|
<field name="model">project.task</field>
|
|
<field name="arch" type="xml">
|
|
<activity string="Project Tasks" js_class="project_activity">
|
|
<field name="user_ids"/>
|
|
<field name="project_id"/>
|
|
<field name="is_private" />
|
|
<templates>
|
|
<div class="justify-content-between" t-name="activity-box">
|
|
<div class="text-end col-6">
|
|
<span t-att-title="record.name.value">
|
|
<field name="name" display="full" class="text-truncate"/>
|
|
</span>
|
|
<span t-att-title="record.project_id.value">
|
|
<field t-if="record.project_id.value" name="project_id" muted="1" display="full"/>
|
|
<span t-elif="record.is_private.value" class="fst-italic text-muted"><i class="fa fa-lock"></i> Private</span>
|
|
</span>
|
|
</div>
|
|
<field name="user_ids" widget="many2many_avatar_user"/>
|
|
</div>
|
|
</templates>
|
|
</activity>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_view_task" model="ir.actions.act_window">
|
|
<field name="name">Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field>
|
|
<field name="context">{'search_default_my_tasks': 1}</field>
|
|
<field name="domain">[('project_id', '!=', False)]</field>
|
|
<field name="search_view_id" ref="view_task_search_form"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No tasks found. Let's create one!
|
|
</p>
|
|
<p>
|
|
Keep track of the progress of your tasks from creation to completion.<br/>
|
|
Collaborate efficiently by chatting in real-time or via email.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_task_kanban_inherit_my_task" model="ir.ui.view">
|
|
<field name="name">project.task.kanban.inherit.my.task</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_kanban"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//kanban" position="attributes">
|
|
<attribute name="default_group_by">personal_stage_type_ids</attribute>
|
|
<attribute name="examples"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_task_kanban_inherit_all_task" model="ir.ui.view">
|
|
<field name="name">project.task.kanban.inherit.all.task</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_kanban"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//kanban" position="attributes">
|
|
<attribute name="default_group_by">project_id</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="open_view_my_tasks_list_view" model="ir.ui.view">
|
|
<field name="name">open.view.my.tasks.list.view</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_tree2"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<tree position="attributes">
|
|
<attribute name="default_group_by">personal_stage_type_ids</attribute>
|
|
</tree>
|
|
<field name="stage_id" position="replace">
|
|
<field name="stage_display" optional="show" string="Stage"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="open_view_all_tasks_list_view" model="ir.ui.view">
|
|
<field name="name">open.view.all.tasks.list.view</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="view_task_tree2"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<tree position="attributes">
|
|
<attribute name="default_group_by"/>
|
|
</tree>
|
|
<field name="project_id" position="attributes">
|
|
<attribute name="invisible">0</attribute>
|
|
</field>
|
|
<field name="stage_id" position="replace">
|
|
<field name="stage_display" optional="show" string="Stage"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_view_my_task" model="ir.actions.act_window">
|
|
<field name="name">My Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field>
|
|
<field name="context">{
|
|
'search_default_open_tasks': 1,
|
|
'all_task': 0,
|
|
'default_user_ids': [(4, uid)],
|
|
}</field>
|
|
<field name="search_view_id" ref="view_task_search_form"/>
|
|
<field name="domain">[('user_ids', 'in', uid)]</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No tasks found. Let's create one!
|
|
</p>
|
|
<p>
|
|
Organize your tasks by dispatching them across the pipeline.<br/>
|
|
Collaborate efficiently by chatting in real-time or via email.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="open_view_task_list_kanban" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="0"/>
|
|
<field name="view_mode">kanban</field>
|
|
<field name="act_window_id" ref="action_view_task"/>
|
|
</record>
|
|
|
|
<record id="open_view_task_list_tree" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="1"/>
|
|
<field name="view_mode">tree</field>
|
|
<field name="act_window_id" ref="action_view_task"/>
|
|
</record>
|
|
|
|
<record id="open_view_my_task_list_kanban" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="10"/>
|
|
<field name="view_mode">kanban</field>
|
|
<field name="view_id" ref="view_task_kanban_inherit_my_task"/>
|
|
<field name="act_window_id" ref="action_view_my_task"/>
|
|
</record>
|
|
|
|
<record id="open_view_my_task_list_tree" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="20"/>
|
|
<field name="view_mode">tree</field>
|
|
<field name="view_id" ref="open_view_my_tasks_list_view"/>
|
|
<field name="act_window_id" ref="action_view_my_task"/>
|
|
</record>
|
|
|
|
<record id="open_view_my_task_list_calendar" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="40"/>
|
|
<field name="view_mode">calendar</field>
|
|
<field name="act_window_id" ref="action_view_my_task"/>
|
|
<field name="view_id" ref="view_task_all_calendar"/>
|
|
</record>
|
|
|
|
<record id="action_view_all_task" model="ir.actions.act_window">
|
|
<field name="name">All Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field>
|
|
<field name="domain">['|', ('is_private', '=', True), ('project_id', '!=', False)]</field>
|
|
<field name="context">{'search_default_open_tasks': 1, 'default_user_ids': [(4, uid)]}</field>
|
|
<field name="search_view_id" ref="view_task_search_form"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No tasks found. Let's create one!
|
|
</p>
|
|
<p>
|
|
Organize your tasks by dispatching them across the pipeline.<br/>
|
|
Collaborate efficiently by chatting in real-time or via email.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="open_view_all_task_list_tree" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="10"/>
|
|
<field name="view_mode">tree</field>
|
|
<field name="act_window_id" ref="action_view_all_task"/>
|
|
<field name="view_id" ref="open_view_all_tasks_list_view"/>
|
|
</record>
|
|
|
|
<record id="open_view_all_task_list_kanban" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="20"/>
|
|
<field name="view_mode">kanban</field>
|
|
<field name="view_id" ref="view_task_kanban_inherit_all_task"/>
|
|
<field name="act_window_id" ref="action_view_all_task"/>
|
|
</record>
|
|
|
|
<record id="open_view_all_task_list_calendar" model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="40"/>
|
|
<field name="view_mode">calendar</field>
|
|
<field name="act_window_id" ref="action_view_all_task"/>
|
|
<field name="view_id" ref="view_task_all_calendar"/>
|
|
</record>
|
|
|
|
<record id="action_server_view_my_task" model="ir.actions.server">
|
|
<field name="name">menu view My Tasks</field>
|
|
<field name="model_id" ref="project.model_project_task"/>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
model._ensure_personal_stages(); action = env["ir.actions.actions"]._for_xml_id("project.action_view_my_task")
|
|
</field>
|
|
</record>
|
|
|
|
<record id="project_task_action_from_partner" model="ir.actions.act_window">
|
|
<field name="name">Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="search_view_id" ref="view_task_search_form"/>
|
|
</record>
|
|
|
|
<record id="action_view_task_overpassed_draft" model="ir.actions.act_window">
|
|
<field name="name">Overpassed Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">tree,form,calendar,graph,kanban</field>
|
|
<field name="domain">[('is_closed', '=', False), ('date_deadline','<',time.strftime('%Y-%m-%d')), ('project_id', '!=', False)]</field>
|
|
<field name="filter" eval="True"/>
|
|
<field name="search_view_id" ref="view_task_search_form"/>
|
|
</record>
|
|
|
|
<!-- Opening task when double clicking on project -->
|
|
<record id="dblc_proj" model="ir.actions.act_window">
|
|
<field name="res_model">project.task</field>
|
|
<field name="name">Project's tasks</field>
|
|
<field name="view_mode">tree,form,calendar,graph,kanban</field>
|
|
<field name="domain">[('project_id', '=', active_id)]</field>
|
|
<field name="context">{'project_id':active_id}</field>
|
|
</record>
|
|
|
|
<record id="action_view_task_from_milestone" model="ir.actions.act_window">
|
|
<field name="name">Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">kanban,tree,calendar,pivot,graph,activity,form</field>
|
|
<field name="context">{'default_milestone_id': active_id}</field>
|
|
<field name="domain">[('milestone_id', '=', active_id)]</field>
|
|
<field name="search_view_id" ref="view_task_search_form"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No tasks found. Let's create one!
|
|
</p>
|
|
<p>
|
|
Keep track of the progress of your tasks from creation to completion.<br/>
|
|
Collaborate efficiently by chatting in real-time or via email.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- User Form -->
|
|
<record id="act_res_users_2_project_task_opened" model="ir.actions.act_window">
|
|
<field name="name">Assigned Tasks</field>
|
|
<field name="res_model">project.task</field>
|
|
<field name="view_mode">tree,form,calendar,graph</field>
|
|
<field name="context">{'search_default_user_ids': [active_id], 'default_user_ids': [(6, 0, [active_id])]}</field>
|
|
<field name="domain">[('project_id', '!=', False)]</field>
|
|
<field name="binding_model_id" ref="base.model_res_users"/>
|
|
<field name="binding_view_types">form</field>
|
|
</record>
|
|
</odoo>
|