229 lines
10 KiB
XML
229 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<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"
|
|
invisible="work_order_number == False"
|
|
/>
|
|
</h1>
|
|
</xpath>
|
|
<xpath expr="//page[@name='extra_info']" position="after">
|
|
<page string="Equipment and Contacts" name="equipment_contacts"
|
|
translate="True">
|
|
<group name="equipment_and_contacts">
|
|
<field
|
|
name="equipment_ids"
|
|
domain="[('partner_id', '=', partner_id)]"
|
|
context="{'tree_view_ref': 'fsm_equipment.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 name="user_ids" position="after">
|
|
<field name="propagate_assignment" />
|
|
</field>
|
|
</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="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="name" position="before">
|
|
<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 name="progress" position="attributes">
|
|
<attribute name="optional">hide</attribute>
|
|
</field>
|
|
<field name="activity_ids" position="attributes">
|
|
<attribute name="optional">hide</attribute>
|
|
</field>
|
|
</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>
|
|
<field name="domain">[('is_fsm', '=', True),
|
|
('project_id', '!=', False),
|
|
('display_in_project', '=', True),
|
|
('parent_id', '=', False)]
|
|
</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>
|
|
<field name="domain">[('is_fsm', '=', True),
|
|
('project_id', '!=', False),
|
|
('display_in_project', '=', True),
|
|
('parent_id', '=', False)]
|
|
</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>
|
|
<field name="domain">[('is_fsm', '=', True),
|
|
('project_id', '!=', False),
|
|
('display_in_project', '=', True),
|
|
('parent_id', '=', False)]
|
|
</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>
|
|
<field name="domain">[('is_fsm', '=', True),
|
|
('project_id', '!=', False),
|
|
('display_in_project', '=', True),
|
|
('parent_id', '=', False),
|
|
('invoice_status', '=', 'to invoice')]
|
|
</field>
|
|
</record>
|
|
<!-- Add parent_id = false to domain for planning actions as well -->
|
|
<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>
|
|
<field name="domain">[('is_fsm', '=', True),
|
|
('project_id', '!=', False),
|
|
('display_in_project', '=', True),
|
|
('parent_id', '=', False)]
|
|
</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>
|
|
<field name="domain">[('is_fsm', '=', True),
|
|
('project_id', '!=', False),
|
|
('display_in_project', '=', True),
|
|
('parent_id', '=', False)]
|
|
</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>
|
|
<field name="domain">[('is_fsm', '=', True),
|
|
('project_id', '!=', False),
|
|
('display_in_project', '=', True),
|
|
('parent_id', '=', False)]
|
|
</field>
|
|
</record>
|
|
<!-- <record id="project_task_view_calendar_fsm" model="ir.ui.view">-->
|
|
<!-- <field name="name">bemade_fsm.project_task_view_calendar_fsm</field>-->
|
|
<!-- <field name="inherit_id" ref="industry_fsm.project_task_view_calendar_fsm"/>-->
|
|
<!-- <field name="model">project.task</field>-->
|
|
<!-- <field name="arch" type="xml">-->
|
|
<!-- <field name="user_ids" position="attributes">-->
|
|
<!-- <attribute name="filters">1</attribute>-->
|
|
<!-- <attribute name="color">user_ids</attribute>-->
|
|
<!-- </field>-->
|
|
<!-- </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="priority" eval="100" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='worksheet_template_id']" position="replace" />
|
|
<xpath expr="//calendar" position="attributes">
|
|
<attribute name="color">user_ids</attribute>
|
|
</xpath>
|
|
</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_start', '=', False),
|
|
('date_deadline', '=', False),
|
|
]
|
|
</attribute>
|
|
</filter>
|
|
<filter name="my_tasks" position="after">
|
|
<filter
|
|
name="is_parent_task"
|
|
string="Parent Task"
|
|
domain="[('parent_id', '=', False)]"
|
|
/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
</odoo>
|