~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to analytic_distribution/analytic_account_view.xml

  • Committer: Quentin THEURET
  • Date: 2014-03-05 16:51:14 UTC
  • mto: (2004.1.33 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 2016.
  • Revision ID: qt@tempo-consulting.fr-20140305165114-m3n5p978sisi4n3f
REF-27 [FIX] Fix import of tools.translate

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
        Display analytic lines from a journal item.
7
7
        NB: context displays FP column and cost center + destination to the user (UTP-372).
8
8
    -->
9
 
       <act_window
10
 
            domain="[('move_id', 'in', active_ids)]"
11
 
            id="act_from_account_ml_to_analytic_ml"
12
 
            name="Analytic lines"
13
 
            src_model="account.move.line"
14
 
            res_model="account.analytic.line"
15
 
            context="{'display_fp': True,}"
16
 
            />
 
9
        <record id="action_analytic_lines_from_account_ml_search" model="ir.actions.server">
 
10
            <field name="name">Analytic Lines (FP)</field>
 
11
            <field name="model_id" ref="model_account_move_line"/>
 
12
            <field name="state">code</field>
 
13
            <field name="code">action = obj.get_analytic_move_lines(context=context)</field>
 
14
        </record>
 
15
 
 
16
        <record id="ir_open_analytic_lines_from_account_ml_search" model="ir.values">
 
17
            <field name="key2">client_action_multi</field>
 
18
            <field name="model">account.move.line</field>
 
19
            <field name="name">Analytic Lines (FP)</field>
 
20
            <field eval="'ir.actions.server,%d'%action_analytic_lines_from_account_ml_search" name="value"/>
 
21
            <field eval="True" name="object"/>
 
22
        </record>
 
23
 
 
24
        <record id="action_analytic_free1_lines_from_account_ml_search" model="ir.actions.server">
 
25
            <field name="name">Analytic Lines (Free 1)</field>
 
26
            <field name="model_id" ref="model_account_move_line"/>
 
27
            <field name="state">code</field>
 
28
            <field name="code">action = obj.get_analytic_move_free1_lines(context=context)</field>
 
29
        </record>
 
30
 
 
31
        <record id="ir_open_analytic_free1_lines_from_account_ml_search" model="ir.values">
 
32
            <field name="key2">client_action_multi</field>
 
33
            <field name="model">account.move.line</field>
 
34
            <field name="name">Analytic Lines (Free 1)</field>
 
35
            <field eval="'ir.actions.server,%d'%action_analytic_free1_lines_from_account_ml_search" name="value"/>
 
36
            <field eval="True" name="object"/>
 
37
        </record>
 
38
 
 
39
        <record id="action_analytic_free2_lines_from_account_ml_search" model="ir.actions.server">
 
40
            <field name="name">Analytic Lines (Free 2)</field>
 
41
            <field name="model_id" ref="model_account_move_line"/>
 
42
            <field name="state">code</field>
 
43
            <field name="code">action = obj.get_analytic_move_free2_lines(context=context)</field>
 
44
        </record>
 
45
 
 
46
        <record id="ir_open_analytic_free2_lines_from_account_ml_search" model="ir.values">
 
47
            <field name="key2">client_action_multi</field>
 
48
            <field name="model">account.move.line</field>
 
49
            <field name="name">Analytic Lines (Free 2)</field>
 
50
            <field eval="'ir.actions.server,%d'%action_analytic_free2_lines_from_account_ml_search" name="value"/>
 
51
            <field eval="True" name="object"/>
 
52
        </record>
17
53
 
18
54
        <record id="view_analytic_account_form" model="ir.ui.view">
19
55
            <field name="name">analytic.account.form</field>
23
59
            <field name="arch" type="xml">
24
60
                <data>
25
61
                    <field name="parent_id" position="replace">
26
 
                        <field name="parent_id" on_change="on_change_parent(parent_id)" required="1" attrs="{'readonly': [('category', '=', 'FUNDING')]}"/>
 
62
                        <field name="parent_id" on_change="on_change_parent(parent_id)" required="1" attrs="{'readonly': [('category', '=', 'FUNDING')], 'required': [('category', 'not in', ['FREE1', 'FREE2'])]}"/>
27
63
                    </field>
28
64
                    <field name="code" position="replace">
29
65
                        <field name="code" select="1" required="1"/>
39
75
                            <field name="date" select="2"/>
40
76
                        </page>
41
77
                        <page string="Cost centers" attrs="{'invisible': [('category', '!=', 'FUNDING')]}">
 
78
                            <button name="button_cc_clear" type="object" string="Remove all" icon="gtk-clear" colspan="1"/>
 
79
                            <separator/>
42
80
                            <field name="cost_center_ids" nolabel="1" domain="[('type', '!=', 'view'), ('category', '=', 'OC')]">
43
81
                                <tree string="Cost Centers" >
44
82
                                    <field name="code"/>
47
85
                            </field>
48
86
                        </page>
49
87
                        <page string="Destinations" attrs="{'invisible': [('category', '!=', 'FUNDING')]}">
 
88
                            <button name="button_dest_clear" type="object" string="Remove all" icon="gtk-clear" colspan="1"/>
 
89
                            <separator/>
50
90
                            <field name="tuple_destination_account_ids" nolabel="1" context="{'dest_in_use':tuple_destination_account_ids}"/>
51
91
                        </page>
52
92
                        <page string="Destinations by accounts" attrs="{'invisible': [('category', '!=', 'FUNDING')]}">
53
93
                            <field name="tuple_destination_summary" nolabel="1" readonly="1"/>
54
94
                        </page>
55
95
                        <page string="Expense accounts" attrs="{'invisible': [('category', '!=', 'DEST')]}">
56
 
                            <field name="destination_ids" nolabel="1" domain="[('type', '!=', 'view'), ('user_type_code', '=', 'expense')]">
 
96
                            <field name="destination_ids" nolabel="1" domain="[('type', '!=', 'view'), ('is_analytic_addicted', '=', True)]">
57
97
                                <tree string="Expenses accounts list">
58
98
                                    <field name="code"/>
59
99
                                    <field name="name"/>
88
128
                    <filter name="active" icon="terp-check" string="Active" domain="[('filter_active', '=', True)]" />
89
129
                    <filter name="inactive" icon="gtk-dialog-error" string="Inactive" domain="[('filter_active', '=', False)]"/>
90
130
                </filter>
 
131
                <filter string="Overdue Account" position="replace"></filter>
91
132
                <field name="partner_id" position="replace">
92
133
                </field>
93
134
                <field name="user_id" position="replace">
106
147
            </field>
107
148
        </record>
108
149
 
 
150
 
 
151
    <!-- Tree view for Balance by analytic accounts -->
 
152
        <record id="balance_analytic_tree" model="ir.ui.view">
 
153
            <field name="name">balance.analytic.tree</field>
 
154
            <field name="model">account.analytic.account</field>
 
155
            <field name="type">tree</field>
 
156
            <field name="field_parent">child_complete_ids</field>
 
157
            <field name="priority" eval="25"/>
 
158
            <field name="arch" type="xml">
 
159
                <tree string="Analytic account" toolbar="1" expand_button="1">
 
160
                    <field name="name"/>
 
161
                    <field name="code"/>
 
162
                    <field name="type"/>
 
163
                    <field name="balance"/>
 
164
                    <field name="parent_id" invisible="1"/>
 
165
                </tree>
 
166
            </field>
 
167
        </record>
 
168
 
 
169
    <!-- Tree view for Default analytic account tree view -->
109
170
        <record id="view_account_analytic_account_tree_inherit" model="ir.ui.view">
110
171
            <field name="name">account.analytic.account.tree.inherit</field>
111
172
            <field name="model">account.analytic.account</field>
112
173
            <field name="type">tree</field>
113
174
            <field name="field_parent">child_complete_ids</field>
114
175
            <field name="inherit_id" ref="account.view_account_analytic_account_tree"/>
 
176
            <field name="priority" eval="4"/>
115
177
            <field name="arch" type="xml">
116
178
                <tree string="Analytic account" position="replace">
117
 
                    <tree colors="red:(date&lt;current_date);black:(date&gt;=current_date);black:(date==False)" string="Analytic account" toolbar="1" expand_button="1">
 
179
                    <tree colors="red:(date&lt;current_date);black:(date&gt;=current_date);black:(date==False)" string="Analytic account" toolbar="1" expand_button="1" nolink="1">
118
180
                        <field name="name"/>
119
181
                        <field name="code"/>
120
182
                        <field name="description"/>
123
185
                        <field name="date_start"/>
124
186
                        <field name="date"/>
125
187
                        <field name="parent_id" invisible="1"/>
126
 
                        <button name="button_wiz_hard_posting" states="open" string="Hard Posting" type="object" icon="terp-camera_test" context="context"/>
127
188
                    </tree>
128
189
                </tree>
129
190
            </field>
130
191
        </record>
131
192
 
 
193
 
 
194
    <!-- Tree view for Analytical chart of accounts -->
 
195
        <record id="view_account_analytic_account_tree_coa" model="ir.ui.view">
 
196
            <field name="name">account.analytic.account.tree.coa</field>
 
197
            <field name="model">account.analytic.account</field>
 
198
            <field name="type">tree</field>
 
199
            <field name="field_parent">child_complete_ids</field>
 
200
            <field name="priority" eval="10"/>
 
201
            <field name="arch" type="xml">
 
202
                <tree string="Analytic account" colors="red:(date&lt;current_date);black:(date&gt;=current_date);black:(date==False)" toolbar="1" expand_button="1" nolink="1">
 
203
                    <field name="name"/>
 
204
                    <field name="code"/>
 
205
                    <field name="description"/>
 
206
                    <field name="parent_id" invisible="1"/>
 
207
                </tree>
 
208
            </field>
 
209
        </record>
 
210
 
 
211
        <record id="account.action_account_analytic_account_tree2" model="ir.actions.act_window">
 
212
            <field name="name">Balance by analytic account</field>
 
213
            <field name="res_model">account.analytic.account</field>
 
214
            <field name="view_type">tree</field>
 
215
            <field name="view_id" ref="view_account_analytic_account_tree_coa"/>
 
216
            <field name="domain">[('parent_id','=',False)]</field>
 
217
            <field name="help">The normal chart of accounts has a structure defined by the legal requirement of the country. The analytic chart of account structure should reflect your own business needs in term of costs/revenues reporting. They are usually structured by contracts, projects, products or departements. Most of the OpenERP operations (invoices, timesheets, expenses, etc) generate analytic entries on the related account.</field>
 
218
        </record>
 
219
 
132
220
        <record id="view_account_analytic_account_list_inherit" model="ir.ui.view">
133
221
            <field name="name">account.analytic.account.list.inherit</field>
134
222
            <field name="model">account.analytic.account</field>