~julie-w/unifield-wm/UTP-925

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

        <!-- View used by reconciliation -->

        <record model="ir.ui.view" id="view_move_line_tree">
            <field name="name">account.move.line.tree</field>
            <field name="model">account.move.line</field>
            <field name="type">tree</field>
            <field name="priority" eval="200"/>
            <field name="arch" type="xml">
                <tree string="Account Entry Line" noteditable="1" colors="red:state in ('draft');black:state in ('valid')">
                    <field name="journal_id" string="Journal Code"/>
                    <field name="move_id" string="Entry Sequence"/>
                    <field name="instance"/>
                    <field name="ref"/>
                    <field name="date" string="Posting Date"/>
                    <field name="period_id" domain="[('state','=','draft')]"/>
                    <field name="name"/>
                    <field name="account_id"/>
                    <field name="move_state" invisible="1"/>
                    <field name="partner_id" invisible="1"/>
                    <field name="partner_txt"/>
                    <field name="partner_type" invisible="1"/>
                    <field name="debit_currency" sum="Total Book. Debit" string="Book. Debit"/>
                    <field name="credit_currency" sum="Total Book. Credit" string="Book. Credit"/>
                    <field name="currency_id" string="Book. Currency"/>
                    <field name="debit" sum="Total Functional Debit" string="Func. Debit"/>
                    <field name="credit" sum="Total Functional Credit" string="Func. Credit"/>
                    <field name="functional_currency_id" string="Func. Currency"/>
                    <field name="state"/>
                    <field name="reconcile_total_partial_id" />
                </tree>
            </field>
        </record>

        <act_window
            context="{'search_default_next_partner':1,'view_mode':True}"
            id="account.action_account_manual_reconcile" name="Journal Items"
            res_model="account.move.line"
            view_id="view_move_line_tree"/>

        <record id="view_move_line_form" model="ir.ui.view">
            <field name="name">account.move.line.form</field>
            <field name="model">account.move.line</field>
            <field name="type">form</field>
            <field eval="1" name="priority"/>
            <field name="arch" type="xml">
                <form string="Journal Item">
                    <group col="4" colspan="4">
                        <separator colspan="4" string="General Information"/>
                        <newline />
                        <field name="name" select="1"/>
                        <field name="ref"/>
                        <newline/>
                        <field name="journal_id"/>
                        <field name="period_id"/>
                        <field name="instance" invisible="1"/>
                        <newline />
                        <field name="date" string="Posting Date"/>
                    </group>
                    
                    <group col="6" colspan="4">
                        <separator colspan="6" string="Amount"/>
                        <newline/>
                        <field name="account_id" select="1" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" on_change="onchange_account_id(account_id)" colspan="2"/>
                        <field name="partner_type" select="1" on_change="onchange_partner_type(partner_type, credit, debit)" 
                            attrs="{'required': [('partner_type_mandatory', '=', True)]}" colspan="2"
                            domain="[('filter_for_third_party', '=', account_id)]"
                            context="{'curr': currency_id}"
                            />
                        <field name="partner_type_mandatory" invisible="1" colspan="2"/>
                        <newline />
                        <field name="credit" string="Functional In" readonly="0" colspan="2"/>
                        <field name="debit" string="Functional Out" readonly="0" colspan="2"/>
                        <field name="functional_currency_id" string="Func. Currency" readonly="0" colspan="2"/>
                    </group>
                    
                    <group col="2" colspan="2" attrs="{'readonly':[('state','=','valid')]}" >
                        <separator colspan="2" string="Currency"/>
                        <field name="currency_id" string="Booking Currency"/>
                        <field name="credit_currency"/>
                        <field name="debit_currency"/>
                    </group>
                    
                    <group col="2" colspan="2">
                        <separator colspan="2" string="States"/>
                        <field name="state"/>
                        <field name="reconcile_id" readonly="1"/>
                        <field name="reconcile_partial_id"  readonly="1"/>
                    </group>
                </form>
            </field>
        </record>

        <record model="ir.ui.view" id="view_move_line_tree_editable">
            <field name="name">account.move.line.tree.editable</field>
            <field name="model">account.move.line</field>
            <field name="type">tree</field>
            <field name="priority" eval="250"/>
            <field name="arch" type="xml">
                <tree string="Account Entry Line" editable="bottom" noteditable="1">
                    <field name="journal_id" string="Journal Code"/>
                    <field name="move_id" readonly="1" string="Entry Sequence"/>
                    <field name="instance"/>
                    <field name="ref"/>
                    <field name="date" string="Posting Date"/>
                    <field name="period_id" domain="[('state','=','draft')]"/>
                    <field name="account_id" domain="[('journal_id','=',parent.journal_id)]" on_change="onchange_account_id(account_id)"/>
                    <field name="move_state" invisible="1"/>
                    <field name="partner_id" invisible="1"/>
                    <field name="partner_txt"/>
                    <field name="partner_type" invisible="1" on_change="onchange_partner_type(partner_type, credit, debit)" 
                        attrs="{'required': [('partner_type_mandatory', '=', True)]}"
                        domain="[('filter_for_third_party', '=', account_id)]"
                        context="{'curr': currency_id}"                        
                        />
                    <field name="partner_type_mandatory" invisible="1"/>
                    <field name="name"/>
                    <field name="debit_currency" sum="Total Booking Debit"/>
                    <field name="credit_currency" sum="Total Booking Credit"/>
                    <field name="currency_id" string="Booking Currency"/>
                    <field name="debit" sum="Total Functional Debit" string="Functional Debit" readonly="1"/>
                    <field name="credit" sum="Total Functional Credit" string="Functional Credit" readonly="1"/>
                    <field name="functional_currency_id" readonly="1"/>
                    <field name="reconcile_total_partial_id" readonly="1"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

    <record id="action_journal_entries_editable_tree_view" model="ir.actions.act_window.view">
        <field eval="10" name="sequence"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="view_move_line_tree_editable"/>
        <field name="act_window_id" ref="account.action_account_moves_all_a"/>
    </record>

    </data>
</openerp>