/
expedient_views.xml
168 lines (161 loc) · 9.13 KB
/
expedient_views.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- SEARCH VIEW -->
<record id="view_public_budget_expedient_filter" model="ir.ui.view">
<field name="name">public_budget.expedient.select</field>
<field name="model">public_budget.expedient</field>
<field name="arch" type="xml">
<search string="Expedient">
<field name="number"/>
<field name="cover"/>
<field name="description"/>
<field name="reference"/>
<field name="issue_date"/>
<field name="last_move_date"/>
<field name="founder_id"/>
<field name="category_id"/>
<field name="type"/>
<field name="current_location_id"/>
<filter name="in_transit" string="In Transit" domain="[('in_transit','=','True')]"/>
<filter name="overdue" string="Overdue?" domain="[('overdue','=','True')]"/>
<field name="user_id"/>
<field name="supplier_ids"/>
<field name="subsidy_recipient_doc"/>
<group expand="0" string="Group By">
<field name="last_move_date" string="Last Move" context="{'group_by':'last_move_date'}"/>
</group>
</search>
</field>
</record>
<!-- FORMVIEW -->
<record id="view_public_budget_expedient_form" model="ir.ui.view">
<field name="name">public_budget.expedient.form</field>
<field name="model">public_budget.expedient</field>
<field name="arch" type="xml">
<form string="Expedient" create="false" edit="false">
<header>
<button name="action_cancel_open" type="object" states="cancel" string="To Draft"/>
<!-- por pedido de ellos solo desde secretaria se pueden anular -->
<button name="action_annulled" states="open" type="object" groups="public_budget.group_secretary_usuario" string="To Annulled"/>
<button name="action_close" states="open" type="object" groups="public_budget.group_secretary_usuario" string="Close"/>
<button name="action_cancel" states="annulled,closed,open" type="object" string="Cancel" groups="base.group_no_one"/>
<field name="state" widget="statusbar" statusbar_colors='{}'/>
</header>
<sheet string="Expedient">
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="%(action_public_budget_transaction_transactions)d" string="Transactions" type="action" groups="public_budget.group_portal_transaction,public_budget.group_secretary_director,account.group_account_user" context="{'search_default_expedient_id': active_id}" icon="fa-bars"/>
</div>
<field name="user_location_ids" invisible="1"/>
<field name="id" invisible="1"/>
<h1>
<label for="number"/>
<field name="number" class="oe_inline" readonly="1"/>
</h1>
<div class="oe_button_box" name="buttons">
</div>
<group>
<group>
<field name="issue_date"/>
<field name="year"/>
<field name="description" attrs="{'readonly': [('id', '!=', False)]}"/>
<field name="supplier_ids" widget="many2many_tags" context="{'res_partner_search_mode': 'supplier'}"/>
<field name="cover"/>
<field name="user_id"/>
<field name="reference"/>
</group>
<group>
<field name="founder_id"/>
<field name="category_id"/>
<field name="type"/>
<field name="parent_id"/>
<field name="first_location_id" options="{'no_create': True}" domain="[('id', 'in', user_location_ids),('expedient_management', '=', True)]"/>
<field name="current_location_id"/>
<field name="final_location" states="closed,annulled"/>
<field name="pages"/>
<field name="parliamentary_expedient"/>
<field name="subsidy_expedient" invisible="1"/>
<field name="subsidy_recipient_doc" attrs="{'invisible': [('subsidy_expedient', '!=', True)]}" />
<field name="subsidy_amount" attrs="{'invisible': [('subsidy_expedient', '!=', True)]}" />
<field name="subsidy_approved" attrs="{'invisible': [('subsidy_expedient', '!=', True)]}" />
<field name="employee_subsidy_requestor" attrs="{'invisible': [('subsidy_expedient', '!=', True)]}" />
<field name="overdue" attrs="{'invisible': ['|',('subsidy_expedient', '!=', True),('subsidy_approved', '!=', True)]}"/>
</group>
</group>
<notebook>
<page string="Moves">
<field name="remit_ids"/>
</page>
<page string="Childs">
<field name="child_ids"/>
</page>
<page string="Notes">
<field name="note"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_public_budget_expedient_portal_form" model="ir.ui.view">
<field name="name">public_budget.expedient.portal.form</field>
<field name="model">public_budget.expedient</field>
<field name="inherit_id" ref="view_public_budget_expedient_form"/>
<field name="groups_id" eval="[(4, ref('base.group_portal'))]"/>
<field name="arch" type="xml">
<field name="activity_ids" position="replace"/>
</field>
</record>
<record id="view_public_budget_expedient_form2" model="ir.ui.view">
<field name="name">public_budget.expedient.form.inherit</field>
<field name="model">public_budget.expedient</field>
<field name="inherit_id" ref="view_public_budget_expedient_form"/>
<field name="groups_id" eval="[(4, ref('group_portal_expedient')),(4, ref('group_secretary_usuario')),(4, ref('account.group_account_user')),(4, ref('group_habilitacion_usuario'))]"/>
<field name="arch" type="xml">
<form position="attributes">
<attribute name="create">true</attribute>
<attribute name="edit">true</attribute>
</form>
</field>
</record>
<!-- TREEVIEW -->
<record id="view_public_budget_expedient_tree" model="ir.ui.view">
<field name="name">public_budget.expedient.tree</field>
<field name="model">public_budget.expedient</field>
<field name="arch" type="xml">
<tree string="Expedient" decoration-muted="state=='cancelled'" decoration-info="state == 'open'" decoration-bf="state in ['annulled', 'closed']" decoration-danger="state in ()" create="false" edit="false">
<field name="number"/>
<field name="issue_date" optional="hide"/>
<field name="cover"/>
<field name="reference" optional="hide" />
<field name="last_move_date"/>
<field name="founder_id" optional="hide"/>
<field name="category_id"/>
<field name="type" optional="hide"/>
<field name="current_location_id"/>
<field name="in_transit"/>
<field name="pages"/>
<field name="user_id" optional="hide"/>
<field name="subsidy_approved" optional="hide"/>
<field name="overdue" optional="hide"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_public_budget_expedient_tree2" model="ir.ui.view">
<field name="name">public_budget.expedient.tree.inherit</field>
<field name="model">public_budget.expedient</field>
<field name="inherit_id" ref="view_public_budget_expedient_tree"/>
<field name="groups_id" eval="[(4, ref('group_portal_expedient')),(4, ref('group_secretary_usuario')),(4, ref('account.group_account_user')),(4, ref('group_habilitacion_usuario'))]"/>
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="create">true</attribute>
<attribute name="edit">true</attribute>
</tree>
</field>
</record>
</odoo>