~taktik/openobject-addons/hui-extra-6.1

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
169
170
171
172
<?xml version="1.0" ?>
<openerp>
  <data>

    <!-- Batch Payment Info form -->
    
    <record id="view_statement_line_global_form" model="ir.ui.view">
      <field name="name">statement.line.global.form</field>
      <field name="model">account.bank.statement.line.global</field>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <form string="Batch Payment Info">
          <field name="payment_reference"/>
          <field name="amount"/>
          <field name="code"/>
          <field name="parent_id"/>
          <field name="type"/>
          <field name="name"/>
          <notebook colspan="4">
            <page string="Transactions">
              <field colspan="4" name="bank_statement_line_ids" nolabel="1"/>
            </page>
            <page string="Child Batch Payments">
              <field colspan="4" name="child_ids" nolabel="1">
                <tree string="Child Batch Payments">
                  <field name="name"/>
                  <field name="amount"/>
                  <field name="code"/>
                </tree>
              </field>
            </page>
          </notebook>
        </form>
      </field>
    </record>
    
    <!-- add Valuta Date and Globalisation id to bank statement line -->
    
    <record id="view_bank_statement_form_add_fields" model="ir.ui.view">
      <field name="name">view.bank.statement.form.add.fields</field>
      <field name="model">account.bank.statement</field>
      <field name="inherit_id" ref="account.view_bank_statement_form"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <data>
          <xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='date']" position="after">
            <field name="val_date"/>
          </xpath>
          <xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
            <field name="globalisation_id" string="Glob. Id" invisible="1"/>
            <field name="state" invisible="1"/>
          </xpath>
          <xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='date']" position="after">
            <field name="val_date"/>
          </xpath>
          <xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='amount']" position="after">
            <field name="globalisation_id"/>
            <field name="state" invisible="1"/>
          </xpath>
        </data>
      </field>
    </record>

    <!-- Bank Statement Line View -->

    <record id="view_bank_statement_line_list" model="ir.ui.view">
      <field name="name">bank.statement.line.list</field>
      <field name="model">account.bank.statement.line</field>
      <field name="type">tree</field>
      <field name="arch" type="xml">
        <tree editable="bottom" string="Statement Lines">
          <field name="sequence" readonly="1" invisible="1"/>
          <field name="journal_id" readonly="1"/>
          <field name="date" readonly="1" groups="base.group_extended"/>
          <field name="val_date" readonly="1"/>
          <field name="name"/>
          <field name="statement_id" readonly="1"/>
          <field name="ref" readonly="1"/>
          <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
          <field name="type" on_change="onchange_type(partner_id, type)"/>
          <field name="account_id" domain="[('type', '!=', 'view'),('journal_id', '=', journal_id)]"/>
          <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
          <field name="amount" readonly="1" sum="Total Amount"/>
          <field name="globalisation_id" string="Glob. Id"/>
          <field name="globalisation_amount" string="Glob. Am."/>
          <field name="state"/>
        </tree>
      </field>
    </record>

    <record id="view_bank_statement_line_form" model="ir.ui.view">
      <field name="name">bank.statement.line.form</field>
      <field name="model">account.bank.statement.line</field>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <form string="Statement Line">
          <field name="statement_id"/>
          <field name="journal_id"/>
          <field name="date"/>
          <field name="val_date"/>
          <field name="name"/>
          <field name="ref" readonly="0"/>
          <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
          <field name="type" on_change="onchange_type(partner_id, type)"/>
          <field  name="account_id" domain="[('type', '!=', 'view'),('journal_id', '=', journal_id)]"/>
          <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
          <field name="amount"/>
          <field name="globalisation_id"/>
          <field name="sequence" readonly="0"/>
          <field name="state"/>
          <separator colspan="4" string="Notes"/>
          <field colspan="4" name="note" nolabel="1"/>
        </form>
      </field>
    </record>

    <record id="view_bank_statement_line_filter" model="ir.ui.view">
      <field name="name">bank.statement.line.filter</field>
      <field name="model">account.bank.statement.line</field>
      <field name="type">search</field>
      <field name="arch" type="xml">
        <search string="Search Bank Transactions">
          <group col='6' colspan='4'>
            <filter name="debit" string="Debit" domain="[('amount','&gt;',0)]" icon="terp-folder-green" help="Debit Transactions."/>
            <filter name="credit" string="Credit" domain="[('amount','&lt;',0)]" icon="terp-folder-orange" help="Credit Transactions."/>
            <separator orientation="vertical"/>
            <filter name="draft" string="Draft" domain="[('state','=','draft')]" icon="terp-document-new" help="Draft Statement Lines."/>
            <filter name="confirm" string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test" help="Confirmed Statement Lines."/>
            <separator orientation="vertical"/>
            <field name="journal_id"/>
            <field name="statement_id"/>
            <field name="val_date"/>
            <field name="amount"/>
            <field name="globalisation_id" string="Glob. Id"/>
            <field name="globalisation_amount" string="Glob. Amount"/>
            <field name="name"/>
          </group>
          <newline/>
          <group string="Extended Filters..." expand="0">
            <field name="account_id"/>
            <field name="partner_id"/>
            <field name="ref"/>
            <field name="note"/>
          </group>
          <newline/>
          <group string="Group By..." expand="1">
            <filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-green"/>
            <filter string="Statement" context="{'group_by':'statement_id'}" icon="terp-folder-orange"/>
            <filter string="Fin.Account" context="{'group_by':'account_id'}" icon="terp-folder-yellow"/>
          </group>
        </search>
      </field>
    </record>

    <record id="action_bank_statement_line" model="ir.actions.act_window">
      <field name="name">Bank Statement Lines</field>
      <field name="res_model">account.bank.statement.line</field>
      <field name="view_type">form</field>
      <field name="view_mode">tree,form</field>
      <field name="context">{'block_statement_line_delete' : 1}</field>
      <field name="search_view_id" ref="view_bank_statement_line_filter"/>
      <field name="view_id" ref="view_bank_statement_line_list"/>
    </record>

    <menuitem action="action_bank_statement_line" id="bank_statement_line" parent="account.menu_finance_bank_and_cash" sequence="20"/>

    <act_window id="absl_open_moves" name="Journal Entries" src_model="account.bank.statement.line"
      res_model="account.move"
      context="{'act_window_from_bank_statement_line': 1}"/>
    
  </data>
</openerp>