~camptocamp/c2c-rd-addons/7.0

1 by ferdinand
[ADD] initial
1
<?xml version="1.0" encoding="UTF-8"?>
2
<openerp>
3
  <data>
4
    <!--
5
==============================================
6
Modification of Account
7
==============================================
8
-->
9
    <record model="ir.ui.view" id="account_analytic_form">
10
      <field name="name">account.account.analytic.form</field>
11
      <field name="inherit_id" ref="account.view_account_form"/>
12
      <field name="model">account.account</field>
13
      <field name="type">form</field>
14
      <field name="arch" type="xml">
15
        <separator string="Default Taxes" position="before">
16
          <group col="2" colspan="2">
17
            <separator string="Analytic" colspan="2"/>
18
            <field name="account_analytic_usage" select="2"/>
19
            <field
20
              domain="[('type','&lt;&gt;','view')]"
21
              name="analytic_account_id"
22
              select="2"/>
23
          </group>
24
        </separator>
25
      </field>
26
    </record>
27
    <record model="ir.ui.view" id="account_analytic_tree">
28
      <field name="name">account.account.analytic.tree</field>
29
      <field name="inherit_id" ref="account.view_account_tree"/>
30
      <field name="model">account.account</field>
31
      <field name="type">tree</field>
32
      <field name="arch" type="xml">
33
        <field name="type" position="after">
34
          <field name="account_analytic_usage"/>
35
          <field
36
            domain="[('type','&lt;&gt;','view')]"
37
            name="analytic_account_id"/>
38
        </field>
39
      </field>
40
    </record>
41
    <!--
42
==============================================
43
Modification of Entries Encoding by Move
44
==============================================
45
-->
46
    <record model="ir.ui.view" id="chricar_view_move_analytic_form1">
47
      <field name="name">chricar.account.move.account.analytic.form1</field>
48
      <field name="inherit_id" ref="account.view_move_form"/>
49
      <field name="model">account.move</field>
50
      <field name="type">form</field>
51
      <field name="arch" type="xml">
52
        <xpath expr="/form/notebook/page[@string='Journal Items']/field/form/notebook/page[@string='Information']/group/field[@name='account_id']" position="replace">
53
          <field
54
            domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','view'),('company_id','=',parent.company_id)]"
55
            name="account_id"
56
            on_change="onchange_account(account_id,tax_id, amount, partner_id)"/>
57
        </xpath>
58
      </field>
59
    </record>
60
    <record model="ir.ui.view" id="chricar_view_move_analytic_form2">
61
      <field name="name">chricar.account.move.account.analytic.form2</field>
62
      <field name="inherit_id" ref="account.view_move_form"/>
63
      <field name="model">account.move</field>
64
      <field name="type">form</field>
65
      <field name="arch" type="xml">
66
        <!-- not nice, should be after partner_id but partner_id is defined twice-->
67
        <xpath expr="/form/notebook/page[@string='Journal Items']/field/tree/field[@name='account_id']" position="replace">
68
          <field
69
            domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','view'),('company_id','=',parent.company_id)]"
70
            name="account_id"
71
            on_change="onchange_account(account_id,tax_id, amount, partner_id)"/>
72
        </xpath>
73
      </field>
74
    </record>
75
    <!--
76
==============================================
77
Modification of Invoice Line - change trigger
78
==============================================
79
-->
80
    <record model="ir.ui.view" id="view_invoice_line_analytic_form">
81
      <field name="name">account.invoice.line.analytic.form</field>
82
      <field name="inherit_id" ref="account.view_invoice_line_form"/>
83
      <field name="model">account.invoice.line</field>
84
      <field name="type">form</field>
85
      <field name="arch" type="xml">
86
        <field name="account_id" position="replace">
87
          <field
88
            domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]"
89
            groups="base.group_user"
90
            name="account_id"
91
            on_change="onchange_account(parent.fiscal_position,account_id,account_analytic_id)"/>
92
        </field>
93
      </field>
94
    </record>
95
    <!--
96
==============================================
97
Modification of Bank statement - change trigger
98
==============================================
99
-->
100
    <record model="ir.ui.view" id="chricar_view_bank_statement_analytic_form3">
101
      <field name="name">account.bank.statement.analytic.form3</field>
102
      <field name="inherit_id" ref="chricar_bank_vat.chricar_view_bank_statement_vat_form3"/>
103
      <field name="model">account.bank.statement</field>
104
      <field name="type">form</field>
105
      <field name="arch" type="xml">
106
        <xpath expr="/form/notebook/page[@string='Transaction']/field/tree/field[@name='account_id']" position="replace">
107
          <field
108
            domain="[('journal_id','=',parent.journal_id), ('type', '&lt;&gt;', 'view')]"
109
            name="account_id"
110
            on_change="onchange_account(account_id,tax_id, amount, partner_id)"/>
111
        </xpath>
112
      </field>
113
    </record>
114
    <record model="ir.ui.view" id="view_bank_statement_analytic_form4">
115
      <field name="name">account.bank.statement.analytic.form4</field>
116
      <field name="inherit_id" ref="chricar_bank_vat.chricar_view_bank_statement_vat_form4"/>
117
      <field name="model">account.bank.statement</field>
118
      <field name="type">form</field>
119
      <field name="arch" type="xml">
120
        <xpath expr="/form/notebook/page[@string='Transaction']/field/form/field[@name='account_id']" position="replace">
121
          <field
122
            domain="[('journal_id','=',parent.journal_id), ('type', '&lt;&gt;', 'view')]"
123
            name="account_id"
124
            on_change="onchange_account(account_id,tax_id, amount, partner_id)"/>
125
        </xpath>
126
      </field>
127
    </record>
128
  </data>
129
</openerp>