forked from OCA/account-reconcile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstatement_view.xml
156 lines (136 loc) · 7.2 KB
/
statement_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
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
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="statement_importer_view_form" model="ir.ui.view">
<field name="name">account.statement.profile.view</field>
<field name="model">account.statement.profile</field>
<field name="arch" type="xml">
<form string="Import statement">
<separator string="" colspan="4"/>
<field name="name" select="1" />
<field name="partner_id" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="journal_id" select="1"/>
<field name="commission_account_id" />
<field name="commission_analytic_id" />
<field name="receivable_account_id" />
<field name="force_partner_on_bank"/>
<field name="balance_check"/>
<field name="bank_statement_prefix"/>
<field name="message_ids" widget="mail_thread" placeholder="Share a note..." colspan="4"/>
</form>
</field>
</record>
<record id="statement_importer_view_tree" model="ir.ui.view">
<field name="name">account.statement.profile.view</field>
<field name="model">account.statement.profile</field>
<field name="arch" type="xml">
<tree string="Import statement">
<field name="name" />
<field name="partner_id" />
<field name="company_id" groups="base.group_multi_company"/>
<field name="journal_id" />
<field name="commission_account_id" />
<field name="commission_analytic_id" />
<field name="receivable_account_id" />
<field name="force_partner_on_bank"/>
<field name="balance_check"/>
</tree>
</field>
</record>
<record id="action_treasury_statement_profile_tree" model="ir.actions.act_window">
<field name="name">Bank Statements Profile</field>
<field name="res_model">account.statement.profile</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem string="Bank Statements Profile" action="action_treasury_statement_profile_tree" id="menu_treasury_statement_profile_tree" parent="account.menu_configuration_misc" sequence="30"/>
<record id="view_treasury_statement_search" model="ir.ui.view">
<field name="name">account.bank.statement.search</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_search"/>
<field name="arch" type="xml">
<xpath expr="/search/field[@name='name']" position="before">
<field name="id"/>
<field name="profile_id"/>
<field name="credit_partner_id"/>
<separator orientation="vertical"/>
</xpath>
<xpath expr="/search/field[@name='period_id']" position="replace">
</xpath>
<xpath expr="/search/group/filter[@string='Period']" position="replace">
<filter string="Financial Partner" context="{'group_by': 'credit_partner_id'}" icon="terp-partner"/>
</xpath>
</field>
</record>
<record id="view_treasury_statement_tree" model="ir.ui.view">
<field name="name">account.bank.statement.tree</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='name']" position="before">
<field name="id"/>
</xpath>
<xpath expr="/tree/field[@name='name']" position="after">
<field name="profile_id"/>
</xpath>
<xpath expr="/tree/field[@name='period_id']" position="replace">
<field name="credit_partner_id"/>
</xpath>
</field>
</record>
<record id="view_treasury_statement_form" model="ir.ui.view">
<field name="name">account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml" >
<!-- Add before the group : profile and related infos -->
<label for="name" position="before">
<group>
<field name="profile_id" select="1" required="1" on_change="onchange_imp_config_id(profile_id)" widget="selection"/>
<field name="balance_check" invisible="1"/>
</group>
</label>
<field name="journal_id" position="attributes">
<attribute name="invisible">True</attribute>
</field>
<!-- Make balance visible or not depending on profile -->
<field name="balance_start" position="attributes">
<attribute name="attrs">{'invisible':[('balance_check','=',False)]}</attribute>
</field>
<field name="balance_end_real" position="attributes">
<attribute name="attrs">{'invisible':[('balance_check','=',False)]}</attribute>
</field>
<field name="balance_end_real" position="after">
<field name="balance_end" widget="monetary" options='{"currency_field" : "currency"}' attrs="{'invisible':[('balance_check','=',False)]}"/>
</field>
<xpath expr="//field[@name='line_ids']/tree/field[@name='sequence']" position="after">
<field name="id" readonly="1" />
</xpath>
<xpath expr="//field[@name='line_ids']/form//field[@name='date']" position="before">
<field name="id" readonly="1" />
</xpath>
<!-- Adapt onchange signature -->
<xpath expr="//field[@name='line_ids']/tree/field[@name='partner_id']" position="replace">
<field name="partner_id" on_change="onchange_partner_id(partner_id,parent.profile_id)" domain="['|',('parent_id','=',False),('is_company','=',True)]"/>
</xpath>
<xpath expr="//field[@name='line_ids']/form//field[@name='partner_id']" position="replace">
<field name="partner_id" on_change="onchange_partner_id(partner_id,parent.profile_id)" domain="['|',('parent_id','=',False),('is_company','=',True)]"/>
</xpath>
<xpath expr="//field[@name='line_ids']/form//field[@name='type']" position="replace">
<field name="type" on_change="onchange_type(partner_id, type, parent.profile_id)"/>
</xpath>
<!-- also set type hidden as it has no impact on reconciliation -->
<xpath expr="//field[@name='line_ids']/tree/field[@name='type']" position="replace">
<field name="type" on_change="onchange_type(partner_id, type, parent.profile_id)" invisible="1"/>
</xpath>
</field>
</record>
<act_window id="act_bank_statement_from_profile"
name="Open Statements"
res_model="account.bank.statement"
src_model="account.statement.profile"
domain="[('profile_id','=',active_id),]"
view_type="form"/>
</data>
</openerp>