Adds a button to create a task from a task template to the list view and kanban view for the project.task when viewed from the FSM application.
154 lines
No EOL
8.1 KiB
XML
154 lines
No EOL
8.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="bemade_fsm_project_task_form_inherit" model="ir.ui.view">
|
|
<field name="name">bemade_fsm.project_task.form</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="industry_fsm.view_task_form2_inherit"/>
|
|
<field name="priority" eval="8"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='name']/.." position="before">
|
|
<h1 class="d-flex flex-row justify-content-between">
|
|
<field name="work_order_number"
|
|
attrs="{'invisible': [('work_order_number', '=', False)]}"/>
|
|
</h1>
|
|
</xpath>
|
|
<xpath expr="//page[@name='extra_info']" position="after">
|
|
<page string="Field Service" name="field_service" translate="True">
|
|
<group name="equipment_and_contacts">
|
|
<field name="equipment_ids"
|
|
domain="[('partner_location_id', '=', partner_id)]"
|
|
context="{'tree_view_ref': 'bemade_fsm.equipment_view_tree'}"/>
|
|
<field name="site_contacts"
|
|
context="{'tree_view_ref': 'bemade_fsm.fsm_contacts_view_tree'}"/>
|
|
<field name="work_order_contacts"
|
|
context="{'tree_view_ref': 'bemade_fsm.fsm_contacts_view_tree'}"/>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
<button name="action_fsm_validate" class='btn-primary'
|
|
position="attributes">
|
|
<attribute name="string">Mark as Delivered</attribute>
|
|
<attribute name="groups">industry_fsm.group_fsm_manager</attribute>
|
|
</button>
|
|
<button name="action_fsm_validate" class='btn-secondary'
|
|
position="attributes">
|
|
<attribute name="string">Mark as Delivered</attribute>
|
|
<attribute name="groups">industry_fsm.group_fsm_manager</attribute>
|
|
</button>
|
|
</field>
|
|
</record>
|
|
<record id="view_task_form2_inherit" model="ir.ui.view">
|
|
<field name="inherit_id" ref="project.view_task_form2"/>
|
|
<field name="model">project.task</field>
|
|
<field name="name">bemade_fsm.project_task.form2</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='child_ids']/tree//field[@name='name']" position="after">
|
|
<field name="description" string="Description/Comments"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<!-- Add parent_id = false to domain for My Tasks, All Tasks: To Schedule, All Tasks and To Invoice-->
|
|
<record id="industry_fsm.project_task_action_fsm" model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="industry_fsm.project_task_action_fsm_map"
|
|
model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="industry_fsm.project_task_action_to_schedule_fsm"
|
|
model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="industry_fsm.project_task_action_all_fsm"
|
|
model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="industry_fsm_sale.project_task_action_to_invoice_fsm"
|
|
model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="industry_fsm.project_task_action_fsm_planning_groupby_user"
|
|
model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="industry_fsm.project_task_action_fsm_planning_groupby_project"
|
|
model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="industry_fsm_report.project_task_action_fsm_planning_groupby_worksheet"
|
|
model="ir.actions.act_window">
|
|
<field name="context">{'search_default_is_parent_task': True}</field>
|
|
</record>
|
|
<record id="project_task_view_calendar_fsm_no_worksheet" model="ir.ui.view">
|
|
<field name="name">bemade_fsm.project_task_view_calendar_no_worksheet</field>
|
|
<field name="inherit_id"
|
|
ref="industry_fsm_report.project_task_view_calendar_fsm_worksheet"/>
|
|
<field name="model">project.task</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='worksheet_template_id']"
|
|
position="replace"></xpath>
|
|
<xpath expr="//calendar" position="attributes">
|
|
<attribute name="color">user_ids</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record id="project_task_view_list_fsm_inherit" model="ir.ui.view">
|
|
<field name="name">project.task.view.list.fsm.inherit</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="industry_fsm.project_task_view_list_fsm"/>
|
|
<field name="arch" type="xml">
|
|
<tree position="attributes">
|
|
<attribute name="js_class">project_list</attribute>
|
|
</tree>
|
|
<field name="partner_id" position="after">
|
|
<field name="work_order_number" optional="show"/>
|
|
</field>
|
|
<field name="company_id" position="attributes">
|
|
<attribute name="optional">hide</attribute>
|
|
</field>
|
|
<field name="worksheet_template_id" position="attributes">
|
|
<attribute name="optional">hide</attribute>
|
|
</field>
|
|
<field name="project_id" position="attributes">
|
|
<attribute name="optional">hide</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
<record id="project_task_view_kanban_fsm_inherit" model="ir.ui.view">
|
|
<field name="name">project.task.view.kanban.fsm.inherit</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="industry_fsm.project_task_view_kanban_fsm"/>
|
|
<field name="arch" type="xml">
|
|
<kanban position="attributes">
|
|
<attribute name="js_class">project_kanban</attribute>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
<record id="project_task_view_search_fsm_inherit" model="ir.ui.view">
|
|
<field name="name">project.task.view.search.fsm.inherit</field>
|
|
<field name="model">project.task</field>
|
|
<field name="inherit_id" ref="industry_fsm.project_task_view_search_fsm"/>
|
|
<field name="arch" type="xml">
|
|
<filter name="schedule" position="attributes">
|
|
<attribute name="domain">
|
|
[
|
|
'&',
|
|
('fsm_done', '=', False),
|
|
'|',
|
|
('user_ids', '=', False),
|
|
'&',
|
|
('planned_date_begin', '=', False),
|
|
('planned_date_end', '=', False),
|
|
]
|
|
</attribute>
|
|
</filter>
|
|
<filter name="my_tasks" position="after">
|
|
<filter name="is_parent_task"
|
|
string="Parent Task"
|
|
domain="[('parent_id', '=', False)]"/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |