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