[MERGE] merge with main addons
[odoo/odoo.git] / addons / account / account_invoice_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <!--
5         Invoices
6         -->
7         <record id="view_invoice_line_calendar" model="ir.ui.view">
8             <field name="name">account.invoice.calendar</field>
9             <field name="model">account.invoice</field>
10             <field name="type">calendar</field>
11             <field name="arch" type="xml">
12                 <calendar string="Invoices" color="journal_id" date_start="date_invoice">
13                     <field name="partner_id"/>
14                     <field name="amount_total"/>
15                 </calendar>
16             </field>
17         </record>
18
19         <record model="ir.ui.view" id="view_invoice_graph">
20             <field name="name">account.invoice.graph</field>
21             <field name="model">account.invoice</field>
22             <field name="type">graph</field>
23             <field name="arch" type="xml">
24                 <graph string="Invoices" type="bar">
25                     <field name="partner_id"/>
26                     <field name="amount_total" operator="+"/>
27                 </graph>
28             </field>
29         </record>
30
31         <record id="view_invoice_line_tree" model="ir.ui.view">
32             <field name="name">account.invoice.line.tree</field>
33             <field name="model">account.invoice.line</field>
34             <field name="type">tree</field>
35             <field name="arch" type="xml">
36                 <tree string="Invoice Line">
37                     <field name="name"/>
38                     <field name="account_id" groups="account.group_account_user"/>
39                     <field name="quantity"/>
40                     <field name="uos_id" groups="product.group_uom"/>
41                     <field name="price_unit"/>
42                     <field name="discount"/>
43                     <field name="price_subtotal"/>
44                 </tree>
45             </field>
46         </record>
47
48         <record id="view_invoice_line_form" model="ir.ui.view">
49             <field name="name">account.invoice.line.form</field>
50             <field name="model">account.invoice.line</field>
51             <field name="type">form</field>
52             <field name="arch" type="xml">
53                 <form string="Invoice Line" version="7.0">
54                     <group col="4">
55                         <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
56                         <field name="name"/>
57                         <label string="Quantity" for="quantity" align="1.0"/>
58                         <div>
59                             <field name="quantity" class="oe_form_inline"/>
60                             <field name="uos_id" class="oe_form_inline"
61                               on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
62                         </div>
63                         <field name="price_unit"/>
64                         <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
65                         <field name="discount"/>
66                         <field name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
67                         <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
68                         <field name="company_id" groups="base.group_multi_company" readonly="1"/>
69                     </group>
70                     <separator string="Notes"/>
71                     <field name="note"/>
72                 </form>
73             </field>
74         </record>
75
76         <record id="view_invoice_tax_tree" model="ir.ui.view">
77             <field name="name">account.invoice.tax.tree</field>
78             <field name="model">account.invoice.tax</field>
79             <field name="type">tree</field>
80             <field name="arch" type="xml">
81                 <tree string="Manual Invoice Taxes">
82                     <field name="sequence"/>
83                     <field name="manual"/>
84                     <field name="name"/>
85                     <field name="account_id" groups="base.group_account_user"/>
86                     <field name="base"/>
87                     <field name="amount"/>
88                 </tree>
89             </field>
90         </record>
91
92         <record id="view_invoice_tax_form" model="ir.ui.view">
93             <field name="name">account.invoice.tax.form</field>
94             <field name="model">account.invoice.tax</field>
95             <field name="type">form</field>
96             <field name="arch" type="xml">
97                 <form string="Manual Invoice Taxes" version="7.0">
98                     <group col="4">
99                         <field name="name"/>
100                         <field name="sequence"/>
101                         <field name="account_id"/>
102                         <field name="manual"/>
103                         <field name="amount"/>
104                         <field name="base" readonly="0"/>
105                         <separator colspan="4" string="Tax Codes"/>
106                         <field name="base_code_id"/>
107                         <field name="base_amount"/>
108                         <field name="tax_code_id"/>
109                         <field name="tax_amount"/>
110                         <field name="factor_base" invisible="True"/>
111                         <field name="factor_tax" invisible="True"/>
112                     </group>
113                 </form>
114             </field>
115         </record>
116
117         <record id="invoice_tree" model="ir.ui.view">
118             <field name="name">account.invoice.tree</field>
119             <field name="model">account.invoice</field>
120             <field name="type">tree</field>
121             <field name="arch" type="xml">
122                 <tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
123                     <field name="date_invoice"/>
124                     <field name="number"/>
125                     <field name="partner_id" groups="base.group_user"/>
126                     <field name="reference" invisible="1"/>
127                     <field name="name" invisible="1"/>
128                     <field name="journal_id" invisible="1"/>
129                     <field name="period_id" invisible="1" groups="account.group_account_user"/>
130                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
131                     <field name="user_id"/>
132                     <field name="date_due"/>
133                     <field name="origin"/>
134                     <field name="currency_id"/>
135                     <field name="residual" sum="Residual Amount"/>
136                     <field name="amount_untaxed" sum="Untaxed Amount"/>
137                     <field name="amount_total" sum="Total Amount"/>
138                     <field name="state"/>
139                 </tree>
140             </field>
141         </record>
142
143         <record id="invoice_supplier_form" model="ir.ui.view">
144             <field name="name">account.invoice.supplier.form</field>
145             <field name="model">account.invoice</field>
146             <field name="type">form</field>
147             <field name="priority">2</field>
148             <field name="arch" type="xml">
149                 <form version="7.0">
150                 <header>
151                     <button name="invoice_open" states="draft,proforma2" string="Validate"/>
152                     <button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid'/>
153                     <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="base.group_no_one"/>
154                     <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
155                     <button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
156                     <field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
157                 </header>
158                 <sheet string="Supplier Invoice">
159                     <group>
160                         <group>
161                             <field string="Supplier" name="partner_id"
162                               on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
163                               context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
164                               domain="[('supplier', '=', True)]"/>
165                             <field name="fiscal_position" widget="selection"/>
166                         </group>
167                         <group>
168                             <field name="number"/>
169                             <field name="date_invoice"/>
170                             <field name="period_id" domain="[('state', '=', 'draft')]"
171                                 groups="account.group_account_user" widget="selection"/>
172                             <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"
173                                 groups="account.group_account_user"/>
174                             <field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]"
175                                 name="account_id" groups="account.group_account_user"/>
176                             <field name="currency_id"/>
177                             <field name="type" invisible="1"/>
178                         </group>
179                         <group>
180                             <label for="reference"/>
181                             <div>
182                                 <field name="reference_type"/>
183                                 <field name="reference" placeholder="Payment Reference"/>
184                             </div>
185                             <field name="date_due"/>
186                         </group>
187                     </group>
188                     <notebook>
189                         <page string="Invoice">
190                             <field context="{'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line">
191                                 <tree string="Invoice lines">
192                                     <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
193                                     <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)"/>
194                                     <field name="invoice_line_tax_id" view_mode="2" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
195                                     <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
196                                     <field name="quantity"/>
197                                     <field name="price_unit"/>
198                                      <!-- Removed if subtotal is set -->
199                                     <field name="price_subtotal"/>
200                                     <field invisible="True" name="name"/>
201                                     <field invisible="True" name="uos_id"/>
202                                 </tree>
203                             </field>
204                             <group>
205                                 <div>
206                                     <field name="tax_line">
207                                         <tree editable="bottom" string="Taxes">
208                                             <field name="name"/>
209                                             <field name="account_id" groups="account.group_account_invoice"/>
210                                             <field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
211                                             <field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
212
213                                             <field invisible="True" name="base_amount"/>
214                                             <field invisible="True" name="tax_amount"/>
215                                             <field name="factor_base" invisible="True"/>
216                                             <field name="factor_tax" invisible="True"/>
217                                         </tree>
218                                     </field>
219                                     <button name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
220                                 </div>
221                                 <group class="oe_form_subtotal_footer">
222                                     <field name="amount_untaxed"/>
223                                     <field name="amount_tax"/>
224                                     <field name="amount_total" class="oe_form_subtotal_footer_separator"/>
225
226                                     <field name="residual" style="margin-top: 10px"/>
227                                     <field name="reconciled" invisible="1"/>
228                                 </group>
229                             </group>
230                             <label for="comment" string="Terms and Conditions"/>
231                             <field name="comment"/>
232                         </page>
233                         <page string="Other Info">
234                             <group col="4">
235                                 <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
236                                 <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"/>
237                                 <newline/>
238                                 <field name="payment_term" widget="selection"/>
239                                 <field name="name"/>
240                                 <newline/>
241                                 <field name="origin" placeholder="PO0025"/>
242                                 <field name="user_id"/>
243                                 <field name="move_id" groups="account.group_account_user"/>
244                             </group>
245                         </page>
246                         <page string="Payments">
247                             <field name="payment_ids">
248                                 <tree string="Payments">
249                                     <field name="date" string="Payment Date"/>
250                                     <field name="move_id"/>
251                                     <field name="ref"/>
252                                     <field name="name"/>
253                                     <field name="journal_id"/>
254                                     <field name="debit"/>
255                                     <field name="credit"/>
256                                     <field name="amount_currency"/>
257                                     <field name="currency_id"/>
258                                 </tree>
259                             </field>
260                         </page>
261                     </notebook>
262                 </sheet>
263                 <footer>
264                     <field name="message_ids" widget="ThreadView"/>
265                 </footer>
266                 </form>
267             </field>
268         </record>
269
270         <record id="invoice_form" model="ir.ui.view">
271             <field name="name">account.invoice.form</field>
272             <field name="model">account.invoice</field>
273             <field name="type">form</field>
274             <field name="arch" type="xml">
275                 <form version="7.0">
276                 <header>
277                     <button name="action_invoice_sent" type="object" string="Send by Email" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
278                     <button name="invoice_print" string="Print Invoice" type="object" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
279                     <button name="invoice_open" states="draft,proforma2" string="Validate"/>
280                     <button name="invoice_proforma2" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
281                     <button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='paid'/>
282                     <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="base.group_no_one"/>
283                     <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object"/>
284                     <button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
285                     <!--button name="%(account_invoices)d" string="Print Invoice" type="action" states="open,paid,proforma,sale,proforma2"/-->
286                     <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
287                 </header>
288                 <sheet string="Invoice">
289                     <h1>
290                         <label string="Draft Invoice " attrs="{'invisible': [('state','not in',('draft',))]}"/>
291                         <label string="Pro Forma Invoice " attrs="{'invisible': [('state','not in',('proforma','proforma2'))]}"/>
292                         <label string="Invoice " attrs="{'invisible': [('state','in',('draft','proforma','proforma2'))]}"/>
293                         <field name="number" readonly="1" class="oe_form_inline"/>
294                     </h1>
295                     <label string="Concerns" for="name" class="oe_form_readonly_hidden"/>
296                     <h2>
297                         <field name="name" placeholder="Project XYZ"/>
298                     </h2>
299                     <field name="type" invisible="1"/>
300                     <group>
301                         <group>
302
303                             <field string="Customer" name="partner_id"
304                                 on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
305                                 groups="base.group_user" context="{'search_default_customer': 1}"
306                                 domain="[('customer', '=', True)]"/>
307                             <field name="fiscal_position" widget="selection" options='{"quick_create": false}'/>
308                             <field name="payment_term" widget="selection"/>
309
310                         </group>
311                         <group>
312
313                             <field name="date_invoice"/>
314                             <field name="period_id" domain="[('state', '=', 'draft')]"
315                                 groups="account.group_account_user" widget="selection"/>
316                             <field name="journal_id" groups="account.group_account_user"
317                                 on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
318
319                             <field domain="[('company_id', '=', company_id),('type','=', 'receivable')]"
320                                 name="account_id" groups="account.group_account_user"/>
321
322                             <label for="currency_id"/>
323                             <div>
324                                 <field name="currency_id" class="oe_form_inline"/>
325                                 <button name="%(action_account_change_currency)d" type="action"
326                                   icon="terp-stock_effects-object-colorize"
327                                   attrs="{'invisible':[('state','!=','draft')]}"
328                                   groups="account.group_account_user"/>
329                             </div>
330                         </group>
331                     </group>
332                     <field name="sent" invisible="1"/>
333
334                     <notebook colspan="4">
335                         <page string="Invoice">
336                             <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"/>
337                             <group>
338                                 <div>
339                                     <field name="tax_line" nolabel="1">
340                                         <tree editable="bottom" string="Taxes">
341                                             <field name="name"/>
342                                             <field name="account_id" groups="account.group_account_invoice"/>
343                                             <field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
344                                             <field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
345                                             <field invisible="True" name="base_amount"/>
346                                             <field invisible="True" name="tax_amount"/>
347                                             <field name="factor_base" invisible="True"/>
348                                             <field name="factor_tax" invisible="True"/>
349                                         </tree>
350                                     </field>
351                                     <button name="button_reset_taxes" states="draft,proforma2" string="Compute Taxes"
352                                         type="object" groups="account.group_account_user" icon="terp-stock_format-scientific"
353                                         help="This action will erase taxes"/>
354                                 </div>
355                                 <group class="oe_form_subtotal_footer">
356                                     <field name="amount_untaxed"/>
357                                     <field name="amount_tax"/>
358                                     <field name="amount_total" class="oe_form_subtotal_footer_separator"/>
359
360                                     <field name="residual" style="margin-top: 10px"/>
361                                     <field name="reconciled" invisible="1"/>
362                                 </group>
363                             </group>
364                         </page>
365                         <page string="Other Info">
366                             <group col="4">
367                                 <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"/>
368                                 <newline/>
369                                 <field name="date_due"/>
370                                 <field name="user_id"/>
371                                 <newline/>
372                                 <field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"/>
373                                 <field name="origin" placeholder="SO0032"/>
374                                 <field name="move_id" groups="account.group_account_user"/>
375                             </group>
376                             <separator string="Additional Information"/>
377                             <field name="comment"/>
378                         </page>
379                         <page string="Payments">
380                             <field name="payment_ids">
381                                 <tree string="Payments">
382                                     <field name="date"/>
383                                     <field name="move_id"/>
384                                     <field name="ref"/>
385                                     <field name="name"/>
386                                     <field name="journal_id" groups="base.group_user"/>
387                                     <field name="debit"/>
388                                     <field name="credit"/>
389                                     <field name="amount_currency"/>
390                                     <field name="currency_id"/>
391                                 </tree>
392                             </field>
393                         </page>
394                     </notebook>
395                 </sheet>
396                 <footer>
397                     <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
398                 </footer>
399                 </form>
400             </field>
401         </record>
402
403         <record id="view_account_invoice_filter" model="ir.ui.view">
404             <field name="name">account.invoice.select</field>
405             <field name="model">account.invoice</field>
406             <field name="type">search</field>
407             <field name="arch" type="xml">
408                 <search string="Search Invoice">
409                     <group>
410                         <field name="number"
411                             string="Invoice"
412                             filter_domain="['|', ('number','ilike',self),('origin','ilike',self)]"/>
413                         <separator orientation="vertical"/>
414                         <filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
415                         <filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
416                         <filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
417                         <separator orientation="vertical"/>
418                         <filter name="unpaid" icon="terp-dolar_ok!" string="Unpaid" domain="[('state','=','open')]" help="Unpaid Invoices"/>
419                         <separator orientation="vertical"/>
420                         <filter domain="[('user_id','=',uid)]" help="My Invoices" icon="terp-personal"/>
421                         <separator orientation="vertical"/>
422                         <field name="partner_id"/>
423                         <field name="user_id" widget="selection" string="Salesperson"/>
424                         <field name="journal_id" widget="selection"/>
425                         <field name="period_id" string="Period"/>
426                     </group>
427                     <newline/>
428                     <group expand="0" string="Group By...">
429                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
430                         <filter string="Responsible" icon="terp-personal" domain="[]"  context="{'group_by':'user_id'}"/>
431                         <separator orientation="vertical"/>
432                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
433                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]"  context="{'group_by':'state'}"/>
434                         <separator orientation="vertical"/>
435                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
436                         <filter string="Invoice Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date_invoice'}"/>
437                         <filter string="Due Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date_due'}"/>
438                     </group>
439                </search>
440             </field>
441         </record>
442
443         <record id="action_invoice_tree" model="ir.actions.act_window">
444             <field name="name">Invoices</field>
445             <field name="res_model">account.invoice</field>
446             <field name="view_type">form</field>
447             <field name="view_mode">tree,form,calendar,graph</field>
448             <field name="view_id" ref="invoice_tree"/>
449             <field name="context">{'type':'out_invoice'}</field>
450             <field name="search_view_id" ref="view_account_invoice_filter"/>
451         </record>
452
453         <record id="action_invoice_tree_pending_invoice" model="ir.actions.act_window">
454             <field name="name">Pending Invoice</field>
455             <field name="res_model">account.invoice</field>
456             <field name="view_type">form</field>
457             <field name="view_mode">tree,form,calendar,graph</field>
458             <field name="view_id" ref="invoice_tree"/>
459             <field name="context">{'type':'out_invoice'}</field>
460             <field name="domain">[('state','=','draft')]</field>
461            <!-- <field name="search_view_id" ref="view_account_invoice_filter"/>-->
462         </record>
463
464         <record id="action_invoice_tree_view1" model="ir.actions.act_window.view">
465             <field eval="1" name="sequence"/>
466             <field name="view_mode">tree</field>
467             <field name="act_window_id" ref="action_invoice_tree"/>
468         </record>
469
470         <record id="action_invoice_tree_view2" model="ir.actions.act_window.view">
471             <field eval="2" name="sequence"/>
472             <field name="view_mode">form</field>
473             <field name="view_id" ref="invoice_form"/>
474             <field name="act_window_id" ref="action_invoice_tree"/>
475         </record>
476
477         <record id="action_invoice_tree1" model="ir.actions.act_window">
478             <field name="name">Customer Invoices</field>
479             <field name="res_model">account.invoice</field>
480             <field name="view_type">form</field>
481             <field name="view_mode">tree,form,calendar,graph</field>
482             <field eval="False" name="view_id"/>
483             <field name="domain">[('type','=','out_invoice')]</field>
484             <field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
485             <field name="search_view_id" ref="view_account_invoice_filter"/>
486             <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>
487         </record>
488
489
490         <record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
491             <field eval="1" name="sequence"/>
492             <field name="view_mode">tree</field>
493             <field name="act_window_id" ref="action_invoice_tree1"/>
494         </record>
495
496         <record id="action_invoice_tree1_view2" model="ir.actions.act_window.view">
497             <field eval="2" name="sequence"/>
498             <field name="view_mode">form</field>
499             <field name="view_id" ref="invoice_form"/>
500             <field name="act_window_id" ref="action_invoice_tree1"/>
501         </record>
502
503         <menuitem action="action_invoice_tree1" id="menu_action_invoice_tree1" parent="menu_finance_receivables"/>
504
505         <record id="action_invoice_tree2" model="ir.actions.act_window">
506             <field name="name">Supplier Invoices</field>
507             <field name="res_model">account.invoice</field>
508             <field name="view_type">form</field>
509             <field name="view_mode">tree,form,calendar,graph</field>
510             <field eval="False" name="view_id"/>
511             <field name="domain">[('type','=','in_invoice')]</field>
512             <field name="context">{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}</field>
513             <field name="search_view_id" ref="view_account_invoice_filter"/>
514             <field name="help">With Supplier Invoices you can enter and manage invoices issued by your suppliers. OpenERP can also generate draft invoices automatically from purchase orders or receipts. This way, you can control the invoice from your supplier according to what you purchased or received.</field>
515         </record>
516         <menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="menu_finance_payables"/>
517
518         <record id="action_invoice_tree3" model="ir.actions.act_window">
519             <field name="name">Customer Refunds</field>
520             <field name="res_model">account.invoice</field>
521             <field name="view_type">form</field>
522             <field name="view_mode">tree,form,calendar,graph</field>
523             <field eval="False" name="view_id"/>
524             <field name="domain">[('type','=','out_refund')]</field>
525             <field name="context">{'default_type':'out_refund', 'type':'out_refund', 'journal_type': 'sale_refund'}</field>
526             <field name="search_view_id" ref="view_account_invoice_filter"/>
527             <field name="help">With Customer Refunds you can manage the credit notes for your customers. A refund is a document that credits an invoice completely or partially. You can easily generate refunds and reconcile them directly from the invoice form.</field>
528         </record>
529
530         <record id="action_invoice_tree3_view1" model="ir.actions.act_window.view">
531             <field eval="1" name="sequence"/>
532             <field name="view_mode">tree</field>
533             <field name="act_window_id" ref="action_invoice_tree3"/>
534         </record>
535
536         <record id="action_invoice_tree3_view2" model="ir.actions.act_window.view">
537             <field eval="2" name="sequence"/>
538             <field name="view_mode">form</field>
539             <field name="view_id" ref="invoice_form"/>
540             <field name="act_window_id" ref="action_invoice_tree3"/>
541         </record>
542         <menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="menu_finance_receivables"/>
543
544         <record id="action_invoice_tree4" model="ir.actions.act_window">
545             <field name="name">Supplier Refunds</field>
546             <field name="res_model">account.invoice</field>
547             <field name="view_type">form</field>
548             <field name="view_mode">tree,form,calendar,graph</field>
549             <field eval="False" name="view_id"/>
550             <field name="domain">[('type','=','in_refund')]</field>
551             <field name="context">{'default_type': 'in_refund', 'type': 'in_refund', 'journal_type': 'purchase_refund'}</field>
552             <field name="search_view_id" ref="view_account_invoice_filter"/>
553             <field name="help">With Supplier Refunds you can manage the credit notes you receive from your suppliers. A refund is a document that credits an invoice completely or partially. You can easily generate refunds and reconcile them directly from the invoice form.</field>
554         </record>
555         <menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
556
557         <act_window context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
558
559         <act_window
560            id="act_account_journal_2_account_invoice_opened"
561            name="Unpaid Invoices"
562            context="{'search_default_journal_id': [active_id], 'search_default_unpaid':1, 'default_journal_id': active_id}"
563            res_model="account.invoice"
564            src_model="account.journal"/>
565
566     </data>
567 </openerp>