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

« back to all changes in this revision

Viewing changes to account_msf/invoice_view.xml

  • Committer: Olivier DOSSMANN
  • Date: 2014-03-17 10:45:24 UTC
  • mto: This revision was merged to the branch mainline in revision 2042.
  • Revision ID: od@tempo-consulting.fr-20140317104524-q4usq4xqjne8ikl7
REF-56 [IMP] Merge account_msf module into msf_partner, account_override, finance and register_accounting modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8"?>
2
 
<openerp>
3
 
    <data>
4
 
 
5
 
        <!--
6
 
            Debit Note views
7
 
        -->
8
 
 
9
 
        <!-- Debit note list -->
10
 
        <record id="view_debit_note_tree" model="ir.ui.view">
11
 
            <field name="name">Debit Note</field>
12
 
            <field name="model">account.invoice</field>
13
 
            <field name="type">tree</field>
14
 
            <field name="priority">19</field>
15
 
            <field name="arch" type="xml">
16
 
                <tree string="Note" colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')">
17
 
                    <field name="document_date"/>
18
 
                    <field name="date_invoice"/>
19
 
                    <field name="number"/>
20
 
                    <field name="partner_id"/>
21
 
                    <field name="name"/>
22
 
                    <field name="date_due"/>
23
 
                    <field name="origin"/>
24
 
                    <field name="currency_id"/>
25
 
                    <field name="residual"/>
26
 
                    <field name="amount_total"/>
27
 
                    <field name="state"/>
28
 
                </tree>
29
 
            </field>
30
 
        </record>
31
 
 
32
 
        <!-- Debit Note form -->
33
 
        <record id="view_debit_note_form" model="ir.ui.view">
34
 
            <field name="name">debit.note.form</field>
35
 
            <field name="model">account.invoice</field>
36
 
            <field name="type">form</field>
37
 
            <field name="priority">60</field>
38
 
            <field name="arch" type="xml">
39
 
                <form string="Debit Note" hide_duplicate_button="1">
40
 
                    <group colspan="4" col="8">
41
 
                        <field name="journal_id" domain="[('is_current_instance','=',True)]" on_change="onchange_journal_id(journal_id)"/>
42
 
                        <field name="number"/>
43
 
                        <field name="type" invisible="1"/>
44
 
                        <field name="currency_id" width="50"/>
45
 
                        <button name="%(account.action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" />
46
 
                        <newline/>
47
 
                        <field string="Customer" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'search_default_customer': 1}"/>
48
 
                        <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
49
 
                        <newline/>
50
 
                        <field name="document_date"/>
51
 
                        <field name="date_invoice"/>
52
 
                    </group>
53
 
                    <group colspan="4" col="8">
54
 
                        <button name="button_debit_note_import_invoice" string="Import invoice" states="draft" type="object" icon="gtk-save-as" colspan="2" 
55
 
                            help="Import invoice that come from the default account given in Company configuration ('Import invoice default account for Debit Note')"/>
56
 
                        <group colspan="2"/>
57
 
                    </group>
58
 
                    <notebook colspan="4">
59
 
                        <page string="Invoice">
60
 
                            <field domain="[('company_id', '=', company_id), ('restricted_area', '=', 'out_invoice')]" name="account_id" />
61
 
                            <field name="name"/>
62
 
                            <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list">
63
 
                                <tree editable="top" string="Invoice Line" noteditable="1" hide_new_button="1">
64
 
                                    <field name="name"/>
65
 
                                    <field name="account_id" domain="[('restricted_area', '=', 'invoice_lines')]"/>
66
 
                                    <field name="quantity"/>
67
 
                                    <field name="uos_id" string="UoM"/>
68
 
                                    <field name="price_unit"/>
69
 
                                    <field name="price_subtotal"/>
70
 
                                    <field name="inactive_product" invisible="1" />
71
 
                                    <field name="inactive_error" invisible="1" />
72
 
                                </tree>
73
 
                            </field>
74
 
                            <group col="8" colspan="4">
75
 
                                <label string="" colspan="3"/>
76
 
                                <field name="reconciled"/>
77
 
                                <field name="amount_total"/>
78
 
                                <label string="" colspan="3"/>
79
 
                                <field name="state"/>
80
 
                                <field name="residual"/>
81
 
                            </group>
82
 
                            <group col="8" colspan="4">
83
 
                                <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
84
 
                                <button name="%(account.action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
85
 
                                <button name='%(account.action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
86
 
                                <button name="invoice_open" type="object" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
87
 
                                <button name="%(account.account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
88
 
                            </group>
89
 
                        </page>
90
 
                        <page string="Other Info">
91
 
                            <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
92
 
                            <newline/>
93
 
                            <field name="date_due"/>
94
 
                            <field name="user_id"/>
95
 
                            <newline/>
96
 
                            <field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id" />
97
 
                            <field name="origin"/>
98
 
                            <field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id" />
99
 
                            <field name="move_id" />
100
 
                            <separator colspan="4" string="Additional Information"/>
101
 
                            <field colspan="4" name="comment" nolabel="1"/>
102
 
                        </page>
103
 
                        <page string="Payments">
104
 
                            <field name="payment_ids" colspan="4" nolabel="1">
105
 
                                <tree string="Payments">
106
 
                                    <field name="date"/>
107
 
                                    <field name="ref"/>
108
 
                                    <field name="name"/>
109
 
                                    <field name="journal_id" />
110
 
                                    <field name="debit"/>
111
 
                                    <field name="credit"/>
112
 
                                    <field name="amount_currency"/>
113
 
                                    <field name="currency_id"/>
114
 
                                </tree>
115
 
                            </field>
116
 
                        </page>
117
 
                    </notebook>
118
 
                </form>
119
 
            </field>
120
 
        </record>
121
 
 
122
 
        <!--
123
 
            In-kind Donation views
124
 
        -->
125
 
 
126
 
        <!-- In-kind Donation list -->
127
 
        <record id="view_inkind_donation_tree" model="ir.ui.view">
128
 
            <field name="name">inkind.donation.form</field>
129
 
            <field name="model">account.invoice</field>
130
 
            <field name="type">tree</field>
131
 
            <field name="priority">19</field>
132
 
            <field name="arch" type="xml">
133
 
                <tree string="In-kind Donation" colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" hide_new_button="1">
134
 
                    <field name="document_date" />
135
 
                    <field name="date_invoice"/>
136
 
                    <field name="number"/>
137
 
                    <field name="partner_id"/>
138
 
                    <field name="name"/>
139
 
                    <field name="origin"/>
140
 
                    <field name="currency_id"/>
141
 
                    <field name="amount_total"/>
142
 
                    <field name="state"/>
143
 
                </tree>
144
 
            </field>
145
 
        </record>
146
 
 
147
 
        <!-- In-kind Donation form -->
148
 
        <record id="view_inkind_donation_form" model="ir.ui.view">
149
 
            <field name="name">inkind.donation.form</field>
150
 
            <field name="model">account.invoice</field>
151
 
            <field name="type">form</field>
152
 
            <field name="priority">63</field>
153
 
            <field name="arch" type="xml">
154
 
                <form string="In-kind Donation" hide_duplicate_button="1">
155
 
                    <group colspan="4" col="8">
156
 
                        <field name="journal_id" domain="[('is_current_instance','=',True)]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
157
 
                        <field name="number"/>
158
 
                        <field name="type" invisible="1"/>
159
 
                        <field name="is_inkind_donation" invisible="1"/>
160
 
                        <field name="currency_id" width="50"/>
161
 
                        <button name="%(account.action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" />
162
 
                        <newline/>
163
 
                        <field string="Donor" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id, is_inkind_donation)" context="{'search_default_customer': 1}"/>
164
 
                        <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id" string="Address"/>
165
 
                        <newline/>
166
 
                        <field name="document_date"/>
167
 
                        <field name="date_invoice" />
168
 
                        <newline/>
169
 
                        <button name="button_analytic_distribution" string="Analytical Distribution" type="object" icon="terp-check" context="context" colspan="2" attrs="{'invisible': [('analytic_distribution_id', '=', False)]}"/>
170
 
                        <button name="button_analytic_distribution" string="Analytical Distribution" type="object" icon="terp-emblem-important" context="context" colspan="2" attrs="{'invisible': [('analytic_distribution_id', '!=', False)]}"/>
171
 
                        <field name="analytic_distribution_id" invisible="1"/>
172
 
                        <group colspan="2"/>
173
 
                        <field name="company_id" invisible="1"/>
174
 
                    </group>
175
 
                    <notebook colspan="4">
176
 
                        <page string="Invoice">
177
 
                            <field invisible="1" domain="[('company_id', '=', company_id), ('restricted_area', '=', 'donation_header')]" name="account_id"/>
178
 
                            <field name="fake_account_id" domain="[('company_id', '=', company_id), ('restricted_area', '=', 'donation_header')]"/>
179
 
                            <field name="reference_type" nolabel="1" size="0"/>
180
 
                            <field name="reference" nolabel="1"/>
181
 
                            <field name="name"/>
182
 
                            <field name="origin"/>
183
 
                            <newline/>
184
 
                            <label string="" colspan="2"/>
185
 
                            <field name="check_total" required="2"/>
186
 
                            <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list">
187
 
                                <tree editable="top" string="Donation Lines" noteditable="1" hide_new_button="1">
188
 
                                    <field name="line_number"/>
189
 
                                    <field name="is_corrected" invisible="1"/>
190
 
                                    <button name="button_open_analytic_lines" string="Have been corrected" type="object" icon="terp-mail-" attrs="{'invisible': [('is_corrected', '=', False)]}"/>
191
 
                                    <field name="product_id"/>
192
 
                                    <field name="account_id" domain="[('restricted_area', '=', 'donation_lines')]"/>
193
 
                                    <button name="button_analytic_distribution" string="Analytical Distribution" type="object" icon="terp-stock_symbol-selection" 
194
 
                                        context="{'d_journal_id': parent.journal_id , 'd_partner_id': parent.partner_id, 'd_address_invoice_id':parent.address_invoice_id,'d_date_invoice': parent.date_invoice, 'd_register_posting_date': parent.register_posting_date, 'd_account_id': parent.account_id, 'd_partner_bank_id': parent.partner_bank_id, 'd_payment_term': parent.payment_term, 'd_name': parent.name, 'd_origine': parent.origin, 'd_address_contact_id': parent.address_contact_id, 'd_user_id': parent.user_id, 'd_comment': parent.comment}"
195
 
                                        />
196
 
                                    <field name="analytic_distribution_state_recap" attrs="{'invisible': [('is_allocatable', '=', False)]}"/>
197
 
                                    <field name="analytic_distribution_state" invisible="1"/>
198
 
                                    <field name="have_analytic_distribution_from_header" invisible="1"/>
199
 
                                    <field name="quantity"/>
200
 
                                    <field name="price_unit"/>
201
 
                                    <field name="price_subtotal"/>
202
 
                                    <field name="name"/>
203
 
                                    <field name="inactive_product" invisible="1" />
204
 
                                    <field name="inactive_error" invisible="1" />
205
 
                                </tree>
206
 
                            </field>
207
 
                            <group col="8" colspan="4">
208
 
                                <label string="" colspan="2"/>
209
 
                                <field name="have_donation_certificate" invisible="1"/>
210
 
                                <button name="button_donation_certificate" type="object" string="No Donation certificate" icon="terp-mail-replied" readonly="1" attrs="{'invisible': [('have_donation_certificate', '!=', False)]}"/>
211
 
                                <button name="button_donation_certificate" type="object" string="Donation certificate" icon="terp-mail-replied" attrs="{'invisible': [('have_donation_certificate', '=', False)]}"/>
212
 
                                <field name="state"/>
213
 
                                <field name="amount_total"/>
214
 
                            </group>
215
 
                            <group col="2" colspan="4" states="draft">
216
 
                                <label string=""/>
217
 
                                <button name="invoice_open" type="object" states="draft" string="Validate" icon="gtk-go-forward"/>
218
 
                            </group>
219
 
                            <group col="2" colspan="4" states="open,paid">
220
 
                                <button name="invoice_cancel" states="open" string="Cancel" icon="gtk-cancel" confirm="Do you confirm Donation received cancellation?"/>
221
 
                                <button name="%(account.account_invoices)d" string="Print Donation" type="action" icon="gtk-print" states="open,paid"/>
222
 
                            </group>
223
 
                        </page>
224
 
                    </notebook>
225
 
                </form>
226
 
            </field>
227
 
        </record>
228
 
 
229
 
        <!-- 
230
 
            Intermission Voucher views
231
 
        -->
232
 
 
233
 
        <!-- Intermission Voucher list -->
234
 
        <record id="view_intermission_tree" model="ir.ui.view">
235
 
            <field name="name">intermission.tree</field>
236
 
            <field name="model">account.invoice</field>
237
 
            <field name="type">tree</field>
238
 
            <field name="priority">19</field>
239
 
            <field name="arch" type="xml">
240
 
                <tree string="Intermission Voucher" colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')">
241
 
                    <field name="document_date" string="I/MI voucher date"/>
242
 
                    <field name="date_invoice"/>
243
 
                    <field name="number"/>
244
 
                    <field name="partner_id"/>
245
 
                    <field name="name"/>
246
 
                    <field name="origin"/>
247
 
                    <field name="currency_id"/>
248
 
                    <field name="amount_total"/>
249
 
                    <field name="state"/>
250
 
                </tree>
251
 
            </field>
252
 
        </record>
253
 
 
254
 
        <!-- Intermission Voucher Form -->
255
 
        <record id="view_intermission_form" model="ir.ui.view">
256
 
            <field name="name">inkind.donation.form</field>
257
 
            <field name="model">account.invoice</field>
258
 
            <field name="type">form</field>
259
 
            <field name="priority">64</field>
260
 
            <field name="arch" type="xml">
261
 
                <form string="Intermission Voucher" hide_duplicate_button="1">
262
 
                    <group colspan="4" col="8">
263
 
                        <field name="fake_journal_id" domain="[('is_current_instance','=',True)]" widget="selection" />
264
 
                        <field name="number"/>
265
 
                        <field name="type" invisible="1"/>
266
 
                        <field name="is_intermission" invisible="1"/>
267
 
                        <field name="fake_currency_id"/>
268
 
                        <newline/>
269
 
                        <field string="Partner" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id, False, is_intermission)" domain="[('partner_type', '=', 'intermission')]"/>
270
 
                        <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id" string="Partner address"/>
271
 
                        <newline/>
272
 
                        <field name="document_date" string="I/MI voucher date"/>
273
 
                        <field name="date_invoice"/>
274
 
                        <newline/>
275
 
                        <button name="button_analytic_distribution" string="Analytical Distribution" type="object" icon="terp-check" context="context" colspan="2" attrs="{'invisible': [('analytic_distribution_id', '=', False)]}"/>
276
 
                        <button name="button_analytic_distribution" string="Analytical Distribution" type="object" icon="terp-emblem-important" context="context" colspan="2" attrs="{'invisible': [('analytic_distribution_id', '!=', False)]}"/>
277
 
                        <field name="analytic_distribution_id" invisible="1"/>
278
 
                        <group colspan="2"/>
279
 
                    </group>
280
 
                    <notebook colspan="4">
281
 
                        <page string="Invoice">
282
 
                            <field invisible="1" domain="[('company_id', '=', company_id), ('restricted_area', '=', 'intermission_header')]" name="account_id" />
283
 
                            <field name="fake_account_id" domain="[('restricted_area', '=', 'intermission_header')]"/>
284
 
                            <field name="name" string="Reference"/>
285
 
                            <newline/>
286
 
                            <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" context="{'is_intermission': True}">
287
 
                                <tree string="Intermission Voucher Lines">
288
 
                                    <field name="is_corrected" invisible="1"/>
289
 
                                    <button name="button_open_analytic_lines" string="Have been corrected" type="object" icon="terp-mail-" attrs="{'invisible': [('is_corrected', '=', False)]}"/>
290
 
                                    <field name="name"/>
291
 
                                    <field name="account_id" domain="[('restricted_area', '=', 'intermission_lines')]"/>
292
 
                                    <button name="button_analytic_distribution" string="Analytical Distribution" type="object" icon="terp-stock_symbol-selection" 
293
 
                                        context="{'d_journal_id': parent.journal_id , 'd_partner_id': parent.partner_id, 'd_address_invoice_id':parent.address_invoice_id,'d_date_invoice': parent.date_invoice, 'd_register_posting_date': parent.register_posting_date, 'd_account_id': parent.account_id, 'd_partner_bank_id': parent.partner_bank_id, 'd_payment_term': parent.payment_term, 'd_name': parent.name, 'd_origine': parent.origin, 'd_address_contact_id': parent.address_contact_id, 'd_user_id': parent.user_id, 'd_comment': parent.comment, 'is_intermission': True}"
294
 
                                        />
295
 
                                    <field name="analytic_distribution_state_recap" attrs="{'invisible': [('is_allocatable', '=', False)]}"/>
296
 
                                    <field name="analytic_distribution_state" invisible="1"/>
297
 
                                    <field name="have_analytic_distribution_from_header" invisible="1"/>
298
 
                                    <field name="quantity"/>
299
 
                                    <field name="uos_id" string="UOM" invisible="1" />
300
 
                                    <field name="price_unit"/>
301
 
                                    <field name="price_subtotal"/>
302
 
                                    <field name="inactive_product" invisible="1" />
303
 
                                    <field name="inactive_error" invisible="1" />
304
 
                                </tree>
305
 
                                <form string="Intermission Voucher Lines">
306
 
                                    <notebook>
307
 
                                        <page string="Line">
308
 
                                            <field name="name"/>
309
 
                                            <field name="account_id" domain="[('restricted_area', '=', 'intermission_lines')]"/>
310
 
                                            <field name="quantity"/>
311
 
                                            <field name="uos_id" string="UOM" invisible="1"/>
312
 
                                            <field name="price_unit"/>
313
 
                                            <field name="price_subtotal"/>
314
 
                                        </page>
315
 
                                        <page string="Notes">
316
 
                                            <field name="note" nolabel="1" colspan="4"/>
317
 
                                        </page>
318
 
                                    </notebook>
319
 
                                </form>
320
 
                            </field>
321
 
                            <group col="8" colspan="4">
322
 
                                <label string="" colspan="3"/>
323
 
                                <field name="state"/>
324
 
                                <field name="amount_total"/>
325
 
                            </group>
326
 
                            <group col="2" colspan="4" states="draft">
327
 
                                <label string=""/>
328
 
                                <button name="invoice_open" type="object" states="draft" string="Validate" icon="gtk-go-forward"/>
329
 
                            </group>
330
 
                            <group col="2" colspan="4" states="open,paid">
331
 
                                <label string=""/>
332
 
                                <button name="%(account.account_invoices)d" string="Print Intermission Voucher" type="action" icon="gtk-print" states="open,paid"/>
333
 
                            </group>
334
 
                        </page>
335
 
                        <page string="Other Info">
336
 
                            <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
337
 
                            <newline/>
338
 
                            <field name="date_due"/>
339
 
                            <field name="user_id"/>
340
 
                            <newline/>
341
 
                            <field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id" />
342
 
                            <field name="origin"/>
343
 
                            <field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id" />
344
 
                            <field name="move_id" />
345
 
                            <separator colspan="4" string="Additional Information"/>
346
 
                            <field colspan="4" name="comment" nolabel="1"/>
347
 
                        </page>
348
 
                    </notebook>
349
 
                </form>
350
 
            </field>
351
 
        </record>
352
 
 
353
 
        <!--
354
 
            Delete some elements on customer invoices:
355
 
            - fiscal_position field
356
 
            - proforma button (invoice_proforma2)
357
 
            - payment_term field
358
 
            - tax frame
359
 
            - compute tax button (button_reset_taxes)
360
 
            - amount untaxed field
361
 
            - amount tax field
362
 
            Update some other ones:
363
 
            - account_id field to add a domain on accounts regarding "ACCOUNT_RESTRICTED_AREA" variable
364
 
        -->
365
 
        <record id="inherit_invoice_form" model="ir.ui.view">
366
 
            <field name="name">inherit.invoice.form</field>
367
 
            <field name="model">account.invoice</field>
368
 
            <field name="type">form</field>
369
 
            <field name="inherit_id" ref="account.invoice_form"/>
370
 
            <field name="priority">61</field>
371
 
            <field name="arch" type="xml">
372
 
                <data>
373
 
                    <xpath expr="/form" position="attributes">
374
 
                        <attribute name="string">Stock Transfer Voucher</attribute>
375
 
                    </xpath>
376
 
                    <xpath expr="/form/notebook/page[@string='Invoice']/field[@name='account_id']" position="attributes">
377
 
                        <attribute name="domain">[('company_id', '=', company_id), ('restricted_area', '=', 'out_invoice')]</attribute>
378
 
                    </xpath>
379
 
                    <field name="fiscal_position" position="replace"/>
380
 
                    <field name="payment_term" position="replace"/>
381
 
                    <field name="tax_line" position="replace"/>
382
 
                    <button name="button_reset_taxes" position="replace"/>
383
 
                    <button name="invoice_proforma2" position="replace"/>
384
 
                    <xpath expr="/form/notebook/page[@string='Invoice']/group[2]" position="replace">
385
 
                        <group col="8" colspan="4">
386
 
                            <label string="" colspan="3"/>
387
 
                            <field name="reconciled"/>
388
 
                            <field name="amount_total"/>
389
 
                            <label string="" colspan="3"/>
390
 
                            <field name="state"/>
391
 
                            <field name="residual"/>
392
 
                            <field name="is_debit_note" invisible="1"/>
393
 
                        </group>
394
 
                        <group col="8" colspan="4">
395
 
                            <button name="invoice_cancel" states="proforma2,open" string="Cancel" icon="gtk-cancel"/>
396
 
                            <button name="%(account.action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
397
 
                            <button name='%(account.action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
398
 
                            <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward" type="object"/>
399
 
                            <button name="%(account.account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
400
 
                        </group>
401
 
                    </xpath>
402
 
                    <xpath expr="//page[@string='Payments']" position="replace">
403
 
                    </xpath>
404
 
                </data>
405
 
            </field>
406
 
        </record>
407
 
 
408
 
        <!--
409
 
            Debit note actions
410
 
        -->
411
 
 
412
 
        <!-- Display debit note list (only invoice that have 'is_debit_note' to True)-->
413
 
        <record id="action_debit_note" model="ir.actions.act_window">
414
 
            <field name="name">Debit Note</field>
415
 
            <field name="res_model">account.invoice</field>
416
 
            <field name="view_type">form</field>
417
 
            <field name="view_mode">tree,form,calendar,graph</field>
418
 
            <field eval="False" name="view_id"/>
419
 
            <field name="domain">[('type','=','out_invoice'), ('is_debit_note', '!=', False), ('is_inkind_donation', '=', False)]</field>
420
 
            <field name="context">{'type':'out_invoice', 'journal_type': 'sale', 'is_debit_note': True}</field>
421
 
            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
422
 
        </record>
423
 
 
424
 
        <!-- Link between previous action and Debit Note tree view -->
425
 
        <record model="ir.actions.act_window.view" id="act_debit_note_tree">
426
 
            <field name="sequence" eval="5"/>
427
 
            <field name="view_mode">tree</field>
428
 
            <field name="view_id" ref="view_debit_note_tree"/>
429
 
            <field name="act_window_id" ref="action_debit_note"/>
430
 
        </record>
431
 
 
432
 
        <!-- Link between action and Debit Note form view -->
433
 
        <record model="ir.actions.act_window.view" id="act_debit_note_form">
434
 
            <field name="sequence" eval="10"/>
435
 
            <field name="view_mode">form</field>
436
 
            <field name="view_id" ref="view_debit_note_form"/>
437
 
            <field name="act_window_id" ref="action_debit_note"/>
438
 
        </record>
439
 
 
440
 
        <!-- Donation search view filter -->
441
 
        <record id="view_account_invoice_filter_donation" model="ir.ui.view">
442
 
            <field name="name">view.account.invoice.filter.donation</field>
443
 
            <field name="model">account.invoice</field>
444
 
            <field name="type">search</field>
445
 
            <field name="priority">20</field>
446
 
            <field name="arch" type="xml">
447
 
                <search string="Search Donation">
448
 
                   <group col="10" colspan="4">
449
 
                        <filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
450
 
                        <filter name="open" icon="terp-camera_test" string="Open" domain="[('state','=','open')]" help="Open Invoices"/>
451
 
                        <filter name="cancelled" icon="terp-dialog-close" string="Cancelled" domain="[('state','=','cancel')]" help="Cancelled Invoices"/>
452
 
                        <separator orientation="vertical"/>
453
 
                        <field name="number"/>
454
 
                        <field name="partner_id"/>
455
 
                        <field name="origin"/>
456
 
                        <field name="amount_total"/>
457
 
                    </group>
458
 
                    <newline/>
459
 
                    <group col="10" colspan="4">
460
 
                        <field name="journal_id" widget="selection" select='1'/>
461
 
                        <field name="period_id" select='1' string="Period"/>
462
 
                    </group>
463
 
                    <newline/>
464
 
                    <group expand="0" string="Group By...">
465
 
                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
466
 
                        <separator orientation="vertical"/>
467
 
                        <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
468
 
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"  context="{'group_by':'state'}"/>
469
 
                        <separator orientation="vertical"/>
470
 
                        <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
471
 
                        <filter string="Posting Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date_invoice'}"/>
472
 
                        <filter string="Due Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date_due'}"/>
473
 
                    </group>
474
 
               </search>
475
 
            </field>
476
 
        </record>
477
 
 
478
 
        <!-- Display in-kind donation list (only invoice that have 'is_inkind_donation' to True)-->
479
 
        <record id="action_inkind_donation" model="ir.actions.act_window">
480
 
            <field name="name">Donation</field>
481
 
            <field name="res_model">account.invoice</field>
482
 
            <field name="view_type">form</field>
483
 
            <field name="view_mode">tree,form,calendar,graph</field>
484
 
            <field eval="False" name="view_id"/>
485
 
            <field name="domain">[('type','=','in_invoice'), ('is_debit_note', '=', False), ('is_inkind_donation', '=', True)]</field>
486
 
            <field name="context">{'type':'in_invoice', 'journal_type': 'inkind'}</field>
487
 
            <field name="search_view_id" ref="view_account_invoice_filter_donation"/>
488
 
        </record>
489
 
 
490
 
        <!-- Link between previous action and In-kind Donation tree view -->
491
 
        <record model="ir.actions.act_window.view" id="act_inkind_donation_tree">
492
 
            <field name="sequence" eval="6"/>
493
 
            <field name="view_mode">tree</field>
494
 
            <field name="view_id" ref="view_inkind_donation_tree"/>
495
 
            <field name="act_window_id" ref="action_inkind_donation"/>
496
 
        </record>
497
 
 
498
 
        <!-- Link between action and In-kind Donation form view -->
499
 
        <record model="ir.actions.act_window.view" id="act_inkind_donation_form">
500
 
            <field name="sequence" eval="11"/>
501
 
            <field name="view_mode">form</field>
502
 
            <field name="view_id" ref="view_inkind_donation_form"/>
503
 
            <field name="act_window_id" ref="action_inkind_donation"/>
504
 
        </record>
505
 
 
506
 
        <!-- Display Intermission voucher OUT -->
507
 
        <record id="action_intermission_out" model="ir.actions.act_window">
508
 
            <field name="name">Intermission Voucher OUT</field>
509
 
            <field name="res_model">account.invoice</field>
510
 
            <field name="view_type">form</field>
511
 
            <field name="view_mode">tree,form,calendar,graph</field>
512
 
            <field eval="False" name="view_id"/>
513
 
            <field name="domain">[('type','=','out_invoice'), ('is_debit_note', '=', False), ('is_inkind_donation', '=', False), ('is_intermission', '=', True)]</field>
514
 
            <field name="context">{'type':'out_invoice', 'journal_type': 'intermission', 'is_intermission': True, 'intermission_type': 'out'}</field>
515
 
            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
516
 
        </record>
517
 
 
518
 
        <!-- Link between previous action and Intermission tree view -->
519
 
        <record model="ir.actions.act_window.view" id="act_intermission_tree_out">
520
 
            <field name="sequence" eval="5"/>
521
 
            <field name="view_mode">tree</field>
522
 
            <field name="view_id" ref="view_intermission_tree"/>
523
 
            <field name="act_window_id" ref="action_intermission_out"/>
524
 
        </record>
525
 
 
526
 
        <!-- Link between action and Intermission form view -->
527
 
        <record model="ir.actions.act_window.view" id="act_intermission_form_out">
528
 
            <field name="sequence" eval="10"/>
529
 
            <field name="view_mode">form</field>
530
 
            <field name="view_id" ref="view_intermission_form"/>
531
 
            <field name="act_window_id" ref="action_intermission_out"/>
532
 
        </record>
533
 
 
534
 
        <!-- Display Intermission voucher IN -->
535
 
        <record id="action_intermission_in" model="ir.actions.act_window">
536
 
            <field name="name">Intermission Voucher IN</field>
537
 
            <field name="res_model">account.invoice</field>
538
 
            <field name="view_type">form</field>
539
 
            <field name="view_mode">tree,form,calendar,graph</field>
540
 
            <field name="view_id" ref="view_intermission_form"/>
541
 
            <field name="domain">[('type','=','in_invoice'), ('is_debit_note', '=', False), ('is_inkind_donation', '=', False), ('is_intermission', '=', True)]</field>
542
 
            <field name="context">{'type':'in_invoice', 'journal_type': 'intermission', 'is_intermission': True, 'intermission_type': 'in'}</field>
543
 
            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
544
 
        </record>
545
 
 
546
 
        <!-- Link between previous action and Intermission tree view -->
547
 
        <record model="ir.actions.act_window.view" id="act_intermission_tree_in">
548
 
            <field name="sequence" eval="5"/>
549
 
            <field name="view_mode">tree</field>
550
 
            <field name="view_id" ref="view_intermission_tree"/>
551
 
            <field name="act_window_id" ref="action_intermission_in"/>
552
 
        </record>
553
 
 
554
 
        <!-- Link between action and Intermission form view -->
555
 
        <record model="ir.actions.act_window.view" id="act_intermission_form_in">
556
 
            <field name="sequence" eval="10"/>
557
 
            <field name="view_mode">form</field>
558
 
            <field name="view_id" ref="view_intermission_form"/>
559
 
            <field name="act_window_id" ref="action_intermission_in"/>
560
 
        </record>
561
 
 
562
 
        <!-- Fix customer invoice display with a bypass on 'is_debit_note' set to True -->
563
 
        <record id="account.action_invoice_tree1" model="ir.actions.act_window">
564
 
            <field name="name">Customer Invoices</field>
565
 
            <field name="res_model">account.invoice</field>
566
 
            <field name="view_type">form</field>
567
 
            <field name="view_mode">tree,form,calendar,graph</field>
568
 
            <field eval="False" name="view_id"/>
569
 
            <field name="domain">[('type','=','out_invoice'), ('is_debit_note', '=', False), ('is_inkind_donation', '=', False), ('is_intermission', '=', False)]</field>
570
 
            <field name="context">{'type':'out_invoice', 'journal_type': 'sale'}</field>
571
 
            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
572
 
            <field name="help">With Customer Invoices you can create and manage sales invoices issued to your customers. OpenERP can also generate draft invoices automatically from sales orders or deliveries. You should only confirm them before sending them to your customers.</field>
573
 
        </record>
574
 
 
575
 
        <!-- Fix supplier invoice display with a bypass on 'is_inkind_donation' set to True -->
576
 
        <record id="account.action_invoice_tree2" model="ir.actions.act_window">
577
 
            <field name="name">Supplier Invoices</field>
578
 
            <field name="res_model">account.invoice</field>
579
 
            <field name="view_type">form</field>
580
 
            <field name="view_mode">tree,form,calendar,graph</field>
581
 
            <field eval="False" name="view_id"/>
582
 
            <field name="domain">[('type','=','in_invoice'), ('is_direct_invoice', '=', False), ('is_inkind_donation', '=', False), ('is_debit_note', "=", False), ('is_intermission', '=', False)]</field>
583
 
            <field name="context">{'type':'in_invoice', 'journal_type': 'purchase'}</field>
584
 
            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
585
 
            <field name="help">With Supplier Invoices you can enter and manage invoices issued by your suppliers. 
586
 
                OpenERP can also generate draft invoices automatically from purchase orders or receipts. This way, you can control the invoice 
587
 
                from your supplier according to what you purchased or received.</field>
588
 
        </record>
589
 
 
590
 
        <!--
591
 
            Debit Note Menu
592
 
        -->
593
 
 
594
 
        <!-- Debit Note Menu in "Customer Invoices" -->
595
 
        <menuitem action="action_debit_note" id="menu_action_debit_note" parent="account.menu_finance_receivables" sequence="10"/>
596
 
 
597
 
        <!-- In-kind Donation Menu in "Supplier Invoices" -->
598
 
        <menuitem action="action_inkind_donation" id="menu_action_inkind_donation" parent="account.menu_finance_payables" sequence="11"/>
599
 
 
600
 
        <!-- Intermission Voucher OUT in "Customer Invoices" -->
601
 
        <menuitem action="action_intermission_out" id="menu_action_intermission_out" parent="account.menu_finance_receivables" sequence="10"/>
602
 
        
603
 
        <!-- Intermission Voucher IN in "Supplier Invoices" -->
604
 
        <menuitem action="action_intermission_in" id="menu_action_intermission_in" parent="account.menu_finance_payables" sequence="12"/>
605
 
 
606
 
        <!--
607
 
            Account invoice report redefinition
608
 
        -->
609
 
 
610
 
        <report
611
 
            auto="False"
612
 
            id="account.account_invoices"
613
 
            model="account.invoice"
614
 
            name="account.invoice2"
615
 
            rml="account_msf/report/account_print_invoice.rml"
616
 
            string="Print report"
617
 
            target_filename="${eval(_get_invoice_report_name)}"
618
 
            attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/',''))"
619
 
            attachment_use="1"
620
 
            multi="True"/>
621
 
 
622
 
    </data>
623
 
</openerp>