~vauxoo/addons-vauxoo/7.0-changes-in-openerp-alan

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
<?xml version='1.0' encoding='utf-8'?>
<openerp>
    <data>

        <record model="ir.ui.view" id="view_voucher_line_tax">
            <field name="name">voucher.line.tax</field>
            <field name="model">account.voucher.line.tax</field>
            <field name="arch" type="xml">
                <form string="Voucher Line Tax" version="7.0">
                    <field name="tax_id"/>
                    <field name="account_id"/>
                    <field name="amount_tax" on_change="onchange_amount_tax(amount_tax, tax)"/>
                    <field name="amount_tax_unround" invisible="1" />
                    <field name="tax" invisible="1" />
                    <field name="original_tax"/>
                    <field name="balance_tax"/>
                    <field name="diff_amount_tax"/>
                    <field name="diff_account_id"/>
                </form>
            </field>
        </record>

        <record model="ir.ui.view" id="view_voucher_line_tax_tree">
            <field name="name">voucher.line.tax.tree</field>
            <field name="model">account.voucher.line.tax</field>
            <field name="arch" type="xml">
                <tree string="Voucher Line Tax" editable="bottom">
                    <field name="tax_id"/>
                    <field name="account_id"/>
                    <field name="amount_tax" on_change="onchange_amount_tax(amount_tax, tax)"/>
                    <field name="amount_tax_unround" invisible="1" />
                    <field name="tax" invisible="1" />
                    <field name="original_tax"/>
                    <field name="balance_tax"/>
                    <field name="diff_amount_tax"/>
                    <field name="diff_account_id"/>
                </tree>
            </field>
        </record>


        <record id="view_account_voucher_lines_dr" model="ir.ui.view">
                <field name="name">view.account.voucher.lines.dr</field>
                <field name="model">account.voucher</field>     
                <field name="inherit_id" ref="account_voucher.view_vendor_receipt_form"/>
                <field name="arch" type="xml">
                     <xpath expr="//field[@name='line_cr_ids']" position="replace">
                            <field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
                                <tree string="Invoices and outstanding transactions"  colors="gray:amount==0">
                                    <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}" on_change="onchange_move_line_id(move_line_id)" domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]" required="1" groups="account.group_account_user"/>
                                    <field name="account_id" groups="base.group_no_one" domain="[('type','=','receivable')]"/>
                                    <field name="date_original" readonly="1"/>
                                    <field name="date_due" readonly="1"/>
                                    <field name="amount_original" readonly="1"/>
                                    <field name="amount_unreconciled" readonly="1" groups="account.group_account_user"/>
                                    <field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)" groups="account.group_account_user"/>
                                    <field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
                                </tree>
                            </field>
                     </xpath>
                </field>
        </record>


        <record id="view_account_voucher_lines_dr_payment" model="ir.ui.view">
                <field name="name">view.account.voucher.lines.dr.payment</field>
                <field name="model">account.voucher</field>     
                <field name="inherit_id" ref="account_voucher.view_vendor_payment_form"/>
                <field name="arch" type="xml">
                     <xpath expr="//field[@name='line_dr_ids']" position="replace">
                        <field name="line_dr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}"> 
                            <tree string="Supplier Invoices and Outstanding transactions" colors="gray:amount==0"> 
                                <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}" on_change="onchange_move_line_id(move_line_id)" domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]" required="1"/> 
                                <field name="account_id" groups="base.group_no_one" domain="[('type','=','payable')]"/> 
                                <field name="date_original" readonly="1"/> 
                                <field name="date_due" readonly="1"/> 
                                <field name="amount_original" readonly="1"/> 
                                <field name="amount_unreconciled" readonly="1" groups="account.group_account_user"/> 
                                <field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)" groups="account.group_account_user"/> 
                                <field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)"/> 
                            </tree> 
                        </field>
                     </xpath>
                </field>
        </record>

        <record id="view_account_voucher_line_tax" model="ir.ui.view">
                <field name="name">view.account.voucher.line.tax</field>
                <field name="model">account.voucher.line</field>
                <field name="inherit_id" ref="account_voucher.view_voucher_line_form"/>
                <field name="arch" type="xml">
                     <field name="amount" position="after">
                        <field name="tax_line_ids" colspan="4" nolabel="1"/>
                     </field>
                </field>
        </record>
        
        <record id="view_account_voucher_line_onchange" model="ir.ui.view">
                <field name="name">view.account.voucher.line.onchange</field>
                <field name="model">account.voucher.line</field>
                <field name="inherit_id" ref="account_voucher.view_voucher_line_form"/>
                <field name="arch" type="xml">
                     <xpath expr="//field[@name='amount']" position="replace">
                        <field name="amount" on_change="onchange_amount(amount, amount_unreconciled, context, voucher_id, move_line_id, amount_original)"/>
                     </xpath>
                     <xpath expr="//field[@name='amount']" position="after">
                        <field name="voucher_id" invisible='1'/>
                     </xpath>
                     <xpath expr="//field[@name='voucher_id']" position="after">
                        <field name="move_line_id" invisible='1'/>
                     </xpath>
                     <xpath expr="//field[@name='move_line_id']" position="after">
                        <field name="amount_original" invisible='1'/>
                     </xpath>
                     <xpath expr="//field[@name='amount_original']" position="after">
                        <field name="amount_unreconciled" invisible='1'/>
                     </xpath>
                </field>
        </record>

    </data>
</openerp>