forked from OCA/project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
project_classification_view.xml
121 lines (112 loc) · 5.41 KB
/
project_classification_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_project_classification_form">
<field name="name">project.classification.form</field>
<field name="model">project.classification</field>
<field name="arch" type="xml">
<form string="Project classification">
<group colspan="4">
<field name="name" />
<field name="project_id" />
<field name="to_invoice"/>
<field name="currency_id"/>
<field name="user_id"/>
<field name="pricelist_id" />
</group>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_project_classification_list">
<field name="name">project.classification.list</field>
<field name="model">project.classification</field>
<field name="arch" type="xml">
<tree string="Project classification">
<field name="name" />
<field name="project_id" />
<field name="to_invoice"/>
<field name="currency_id"/>
<field name="user_id"/>
<field name="pricelist_id" />
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_project_classification_form">
<field name="name">Project Classification</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">project.classification</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_project_classification_list"/>
</record>
<menuitem id="menu_project_classification" action="action_project_classification_form" parent="base.menu_definitions"/>
<record id="edit_project" model="ir.ui.view">
<field name="name">project.project.form</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project" />
<field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page[@string='Other Info']//field[@name='parent_id']" position="replace">
<field name="classification_id" widget="selection" on_change="onchange_classification_id(classification_id)"/>
</xpath>
<xpath expr="/form//page[@string='Other Info']//field[@name='currency_id']" position="after">
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection"/>
<!-- <field name="to_invoice" /> -->
<field name="parent_id" string="Parent Project" domain="[('id','!=',active_id)]" context="{'current_model': 'project.project'}" />
<field name="to_invoice"/>
</xpath>
</field>
</record>
<record id="view_project" model="ir.ui.view">
<field name="name">project.project.tree</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project" />
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='parent_id']" position="after">
<field name="classification_id"/>
</xpath>
</field>
</record>
<record id="view_project_project_filter" model="ir.ui.view">
<field name="name">project.project.select</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project_project_filter" />
<field name="arch" type="xml">
<xpath expr="/search/field[@name='partner_id']" position="before">
<field name="classification_id" widget="selection" />
</xpath>
<xpath expr="/search/group/filter[@string='Manager']" position="after">
<filter string="Classification" icon="terp-folder-orange" domain="[]" context="{'group_by':'classification_id'}"/>
</xpath>
</field>
</record>
<record id="view_account_analytic_account_tree" model="ir.ui.view">
<field name="name">project.project.tree</field>
<field name="model">project.project</field>
<field name="field_parent">child_project_complete_ids</field>
<field name="priority">20</field>
<field name="arch" type="xml">
<tree colors="red:date and (date<current_date) and (state in ('open'));blue:state in ('draft','pending');grey: state in ('close','cancelled')" string="Projects" toolbar="1">
<field name="sequence" invisible="1"/>
<field name="date" invisible="1"/>
<field name="name" string="Project Name"/>
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Partner"/>
<field name="parent_id" string="Parent Project" invisible="1"/>
<field name="planned_hours" widget="float_time"/>
<field name="total_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="progress_rate" widget="progressbar"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="action_project_account_tree2" model="ir.actions.act_window">
<field name="name">Projects Tree</field>
<field name="res_model">project.project</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
<field name="domain">[('parent_id','=',False)]</field>
</record>
<menuitem action="action_project_account_tree2" id="menu_open_view_project_all" parent="project.menu_project_management" sequence="1"/>
</data>
</openerp>