Debian Codegraph @

addons/sale_project/views/project_sharing_views.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3
4 <record id="project_sharing_inherit_project_task_view_form" model="ir.ui.view">
5 <field name="name">project.task.view.inherit</field>
6 <field name="model">project.task</field>
7 <field name="priority">300</field>
8 <field name="inherit_id" ref="project.project_sharing_project_task_view_form"/>
9 <field name="arch" type="xml">
10 <div name="button_box" position="inside">
11 <field name="display_sale_order_button" invisible="1"/>
12 <field name="allow_billable" invisible="1"/>
13 <button class="oe_stat_button"
14 type="object" name="action_project_sharing_view_so" icon="fa-dollar"
15 invisible="not display_sale_order_button">
16 <div class="o_stat_info">
17 <span class="o_stat_text">Sales Order</span>
18 </div>
19 </button>
20 </div>
21 <xpath expr="//field[@name='partner_id']" position="attributes">
22 <attribute name="invisible">not allow_billable</attribute>
23 </xpath>
24 <xpath expr="//field[@name='partner_id']" position="after">
25 <field name="sale_line_id" string="Sales Order Item" options='{"no_open": True}' readonly="1" invisible="not partner_id" context="{'create': False, 'edit': False, 'delete': False}"/>
26 </xpath>
27 <xpath expr="//field[@name='child_ids']/list/field[@name='partner_id']" position="after">
28 <field name="allow_billable" column_invisible="1"/>
29 </xpath>
30 <xpath expr="//field[@name='depend_on_ids']/list/field[@name='partner_id']" position="after">
31 <field name="allow_billable" column_invisible="1"/>
32 </xpath>
33 <xpath expr="//field[@name='child_ids']/list/field[@name='partner_id']" position="attributes">
34 <attribute name="column_invisible">not parent.allow_billable</attribute>
35 <attribute name="invisible">not allow_billable</attribute>
36 </xpath>
37 <xpath expr="//field[@name='depend_on_ids']/list/field[@name='partner_id']" position="attributes">
38 <attribute name="column_invisible">not parent.allow_billable</attribute>
39 <attribute name="invisible">not allow_billable</attribute>
40 </xpath>
41 </field>
42 </record>
43
44 <record id="project_sharing_inherit_project_task_view_tree" model="ir.ui.view">
45 <field name="name">project.task.view.list.inherit</field>
46 <field name="model">project.task</field>
47 <field name="priority">300</field>
48 <field name="inherit_id" ref="project.project_sharing_project_task_view_tree"/>
49 <field name="arch" type="xml">
50 <field name="allow_milestones" position="after">
51 <field name="allow_billable" column_invisible="1"/>
52 </field>
53 <xpath expr="//field[@name='partner_id']" position="attributes">
54 <attribute name="column_invisible">not allow_billable</attribute>
55 </xpath>
56 </field>
57 </record>
58
59 <record id="project.project_sharing_project_task_action" model="ir.actions.act_window">
60 <field name="context">{
61 'default_project_id': active_id,
62 'active_id_chatter': active_id,
63 'delete': false,
64 'sale_show_partner_name': true,
65 }</field>
66 </record>
67
68 </odoo>