bemade-addons/project_task_template/views/project_task_template_views.xml
2025-02-26 10:12:33 -05:00

112 lines
5.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Search View -->
<record id="project_task_template.view_project_task_template_search" model="ir.ui.view">
<field name="name">project.task.template.search</field>
<field name="model">project.task.template</field>
<field name="arch" type="xml">
<search string="Task Templates">
<field name="name"/>
<field name="project_id"/>
<field name="assignee_ids" widget="many2many_tags"/>
<field name="tag_ids" widget="many2many_tags"/>
<field name="company_id" groups="base.group_multi_company"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<group expand="0" string="Group By">
<filter string="Project" name="group_by_project" domain="[]" context="{'group_by': 'project_id'}"/>
<filter string="Company" name="group_by_company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<!-- List View -->
<record id="project_task_template.view_project_task_template_tree" model="ir.ui.view">
<field name="name">project.task.template.tree</field>
<field name="model">project.task.template</field>
<field name="arch" type="xml">
<tree string="Task Templates">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="project_id"/>
<field name="assignee_ids" widget="many2many_tags"/>
<field name="tag_ids" widget="many2many_tags"/>
<field name="allocated_hours" widget="float_time"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<!-- Form View -->
<record id="project_task_template.view_project_task_template_form" model="ir.ui.view">
<field name="name">project.task.template.form</field>
<field name="model">project.task.template</field>
<field name="arch" type="xml">
<form string="Task Template">
<header>
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" type="object" name="action_view_tasks"
icon="fa-tasks">
<field string="Tasks" name="task_count" widget="statinfo"/>
</button>
</div>
<div class="oe_title">
<h1>
<field name="name" placeholder="Task Title"/>
</h1>
</div>
<group>
<group>
<field name="project_id"/>
<field name="parent_id"/>
<field name="allocated_hours" widget="float_time"/>
<field name="sequence"/>
</group>
<group>
<field name="assignee_ids" widget="many2many_tags"/>
<field name="tag_ids" widget="many2many_tags"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<notebook>
<page string="Description" name="description">
<field name="description" placeholder="Add a description..."/>
</page>
<page string="Subtasks" name="subtasks">
<field name="subtask_ids" context="{'default_parent_id': active_id}">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="allocated_hours" widget="float_time"/>
<field name="assignee_ids" widget="many2many_tags"/>
<field name="tag_ids" widget="many2many_tags"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Action -->
<record id="project_task_template.action_project_task_template" model="ir.actions.act_window">
<field name="name">Task Templates</field>
<field name="res_model">project.task.template</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="project_task_template.view_project_task_template_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your first task template!
</p>
<p>
Task templates help you quickly create pre-configured tasks with predefined properties.
</p>
</field>
</record>
</odoo>