1b08b081bbe7e030bf8a60c58c88c03fcf8f9eed
[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"/>
41                     <field name="price_unit"/>
42                     <field name="discount" groups="base.group_extended"/>
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">
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.address_invoice_id, parent.currency_id, context, parent.company_id)"/>
55                     <field colspan="2" name="name"/>
56                     <label string="Quantity :" align="1.0"/>
57                     <group colspan="1" col="2">
58                         <field name="quantity" nolabel="1"/>
59                         <field name="uos_id" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, context, parent.company_id)" nolabel="1"/>
60                     </group>
61                     <field name="price_unit"/>
62                     <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>
63                     <field name="discount" groups="base.group_extended"/>
64                     <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
65                     <field name="company_id" groups="base.group_multi_company" readonly="1"/>
66                     <separator string="Notes" colspan="4"/>
67                     <field colspan="4" name="note" nolabel="1"/>
68                     <separator colspan="4" string="Taxes"/>
69                     <field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" nolabel="1"/>
70                 </form>
71             </field>
72         </record>
73
74         <record id="view_invoice_tax_tree" model="ir.ui.view">
75             <field name="name">account.invoice.tax.tree</field>
76             <field name="model">account.invoice.tax</field>
77             <field name="type">tree</field>
78             <field name="arch" type="xml">
79                 <tree string="Manual Invoice Taxes">
80                     <field name="sequence"/>
81                     <field name="manual"/>
82                     <field name="name"/>
83                     <field name="account_id" groups="base.group_account_user"/>
84                     <field name="base"/>
85                     <field name="amount"/>
86                 </tree>
87             </field>
88         </record>
89
90         <record id="view_invoice_tax_form" model="ir.ui.view">
91             <field name="name">account.invoice.tax.form</field>
92             <field name="model">account.invoice.tax</field>
93             <field name="type">form</field>
94             <field name="arch" type="xml">
95                 <form string="Manual Invoice Taxes">
96                     <field name="name"/>
97                     <field name="sequence"/>
98                     <field name="account_id"/>
99                     <field name="manual"/>
100                     <field name="amount"/>
101                     <field name="base" readonly="0"/>
102                     <separator colspan="4" string="Tax codes"/>
103                     <field name="base_code_id"/>
104                     <field name="base_amount"/>
105                     <field name="tax_code_id"/>
106                     <field name="tax_amount"/>
107                     <field name="factor_base" invisible="True"/>
108                     <field name="factor_tax" invisible="True"/>
109                 </form>
110             </field>
111         </record>
112
113         <record id="invoice_tree" model="ir.ui.view">
114             <field name="name">account.invoice.tree</field>
115             <field name="model">account.invoice</field>
116             <field name="type">tree</field>
117             <field name="arch" type="xml">
118                 <tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
119                     <field name="date_invoice"/>
120                     <field name="number"/>
121                     <field name="partner_id" groups="base.group_user"/>
122                     <field name="reference" invisible="1"/>
123                     <field name="name" invisible="1"/>
124                     <field name="journal_id" invisible="1"/>
125                     <field name="period_id" invisible="1" groups="account.group_account_user"/>
126                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
127                     <field name="user_id"/>
128                     <field name="date_due"/>
129                     <field name="origin"/>
130                     <field name="currency_id"/>
131                     <field name="residual" sum="Residual Amount"/>
132                     <field name="amount_untaxed" sum="Untaxed Amount"/>
133                     <field name="amount_total" sum="Total Amount"/>
134                     <field name="state"/>
135
136                     <button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
137                 </tree>
138             </field>
139         </record>
140
141         <record id="invoice_supplier_form" model="ir.ui.view">
142             <field name="name">account.invoice.supplier.form</field>
143             <field name="model">account.invoice</field>
144             <field name="type">form</field>
145             <field name="priority">2</field>
146             <field name="arch" type="xml">
147                 <form string="Supplier Invoice">
148                     <group col="8" colspan="4">
149                         <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
150                         <field name="number" readonly="1"/>
151                         <field name="type" invisible="1"/>
152                         <field name="currency_id" width="50"/>
153                         <button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
154                         <newline/>
155                         <field string="Supplier" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" options='{"quick_create": false}' domain="[('supplier', '=', True)]"/>
156                         <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id" context="{'default_partner_id': partner_id}" options='{"quick_create": false}'/>
157                         <field name="fiscal_position" groups="base.group_extended" widget="selection"/>
158                         <newline/>
159                         <field name="date_invoice"/>
160                         <field name="period_id" domain="[('state', '=', 'draft')]" groups="account.group_account_user" widget="selection"/>
161                         <group colspan="2" col="1" groups="account.group_account_user">
162                             <label align="0.0" string="(keep empty to use the current period)"/>
163                         </group>
164                     </group>
165                     <notebook colspan="4">
166                         <page string="Invoice">
167                            <field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]" name="account_id" groups="account.group_account_user"/>
168                             <field name="reference_type" nolabel="1" size="0"/>
169                             <field name="reference" nolabel="1"/>
170                             <field name="date_due"/>
171                             <field colspan="4" context="{'address_invoice_id': address_invoice_id, 'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line" nolabel="1">
172                                 <tree string="Invoice lines">
173                                     <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.address_invoice_id, parent.currency_id, context, parent.company_id)"/>
174                                     <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>
175                                     <field name="invoice_line_tax_id" view_mode="2" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
176                                     <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
177                                     <field name="quantity"/>
178                                     <field name="price_unit"/>
179                                      <!-- Removed if subtotal is set -->
180                                     <field name="price_subtotal"/>
181                                     <field invisible="True" name="name"/>
182                                     <field invisible="True" name="uos_id"/>
183                                 </tree>
184                             </field>
185                             <group col="1" colspan="2">
186                                 <field name="tax_line" nolabel="1">
187                                     <tree editable="bottom" string="Taxes">
188                                         <field name="name"/>
189                                         <field name="account_id" groups="account.group_account_invoice"/>
190                                         <field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
191                                         <field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
192
193                                         <field invisible="True" name="base_amount"/>
194                                         <field invisible="True" name="tax_amount"/>
195                                         <field name="factor_base" invisible="True"/>
196                                         <field name="factor_tax" invisible="True"/>
197                                     </tree>
198                                 </field>
199                             </group>
200                             <group col="4" colspan="2">
201                                 <button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
202                                 <field name="amount_untaxed"/>
203                                 <label string="" colspan="2"/>
204                                 <field name="amount_tax"/>
205                                 <field name="reconciled"/>
206                                 <field name="amount_total"/>
207                                 <field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
208                                 <field name="residual"/>
209                                 <group col="6" colspan="4">
210                                     <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
211                                     <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
212                                     <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
213                                     <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)]}" icon="gtk-convert" 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."/>
214                                     <button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
215                                 </group>
216                             </group>
217                         </page>
218                         <page string="Other Info">
219                             <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
220                             <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"/>
221                             <newline/>
222                             <field name="payment_term" widget="selection"/>
223                             <field name="name"/>
224                             <newline/>
225                             <field name="origin" groups="base.group_extended"/>
226                             <field domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended"/>
227                             <field name="user_id"/>
228                             <field name="move_id" groups="account.group_account_user"/>
229                             <separator colspan="4" string="Additional Information"/>
230                             <field colspan="4" name="comment" nolabel="1"/>
231                         </page>
232                         <page string="Payments" groups="base.group_extended">
233                             <field name="payment_ids" colspan="4" nolabel="1" >
234                                 <tree string="Payments">
235                                     <field name="date" string="Payment Date"/>
236                                     <field name="move_id"/>
237                                     <field name="ref"/>
238                                     <field name="name" groups="base.group_extended"/>
239                                     <field name="journal_id"/>
240                                     <field name="debit"/>
241                                     <field name="credit"/>
242                                     <field name="amount_currency" groups="base.group_extended"/>
243                                     <field name="currency_id" groups="base.group_extended"/>
244                                 </tree>
245                             </field>
246                         </page>
247                     </notebook>
248                 </form>
249             </field>
250         </record>
251
252         <record id="invoice_form" model="ir.ui.view">
253             <field name="name">account.invoice.form</field>
254             <field name="model">account.invoice</field>
255             <field name="type">form</field>
256             <field name="arch" type="xml">
257                 <form string="Invoice">
258                     <group colspan="4" col="8">
259                     <field name="journal_id" groups="base.group_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
260                     <field name="number"/>
261                     <field name="type" invisible="1"/>
262                     <field name="currency_id" width="50"/>
263                     <button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
264                     <newline/>
265                     <field string="Customer" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user" context="{'search_default_customer': 1}" options='{"quick_create": false}' domain="[('customer', '=', True)]"/>
266                     <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id" context="{'default_partner_id': partner_id}" options='{"quick_create": false}'/>
267                     <field name="fiscal_position" groups="base.group_extended" widget="selection" options='{"quick_create": false}'/>
268                     <newline/>
269                     <field name="date_invoice"/>
270                     <field name="period_id" domain="[('state', '=', 'draft')]" groups="account.group_account_user" widget="selection"/>
271                     <field name="payment_term" widget="selection"/>
272                     <newline/>
273                     <field domain="[('company_id', '=', company_id),('type','=', 'receivable')]" name="account_id" groups="account.group_account_user"/>
274                     <field name="name" groups="base.group_extended"/>
275                     </group>
276                     <notebook colspan="4">
277                         <page string="Invoice">
278                             <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"/>
279                             <group col="1" colspan="2">
280                                 <field name="tax_line" nolabel="1">
281                                     <tree editable="bottom" string="Taxes">
282                                         <field name="name"/>
283                                         <field name="account_id" groups="account.group_account_invoice"/>
284                                         <field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
285                                         <field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
286                                         <field invisible="True" name="base_amount"/>
287                                         <field invisible="True" name="tax_amount"/>
288                                         <field name="factor_base" invisible="True"/>
289                                         <field name="factor_tax" invisible="True"/>
290                                     </tree>
291                                 </field>
292                             </group>
293                             <group col="4" colspan="2">
294                                 <group colspan="2" col="1">
295                                     <button name="button_reset_taxes" states="draft,proforma2" string="Compute Taxes" type="object" groups="base.group_user" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
296                                 </group>
297                                 <field name="amount_untaxed"/>
298                                 <label string="" colspan="2"/>
299                                 <field name="amount_tax"/>
300                                 <field name="reconciled"/>
301                                 <field name="amount_total"/>
302                                 <field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
303                                 <field name="residual"/>
304                                 <group col="8" colspan="4" groups="base.group_user">
305                                     <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
306                                     <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
307                                     <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)]}" icon="gtk-convert" 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."/>
308                                     <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
309                                     <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_account_user"/>
310                                     <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
311                                     <button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
312                                 </group>
313                             </group>
314                         </page>
315                         <page string="Other Info">
316                             <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"/>
317                             <newline/>
318                             <field name="date_due"/>
319                             <field name="user_id"/>
320                             <newline/>
321                             <field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"
322                                 groups="base.group_extended"/>
323                             <field name="origin"/>
324                             <field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id"
325                                 groups="base.group_extended"/>
326                             <field name="move_id" groups="account.group_account_user"/>
327                             <separator colspan="4" string="Additional Information"/>
328                             <field colspan="4" name="comment" nolabel="1"/>
329                         </page>
330                         <page string="Payments">
331                             <field name="payment_ids" colspan="4" nolabel="1">
332                                 <tree string="Payments">
333                                     <field name="date"/>
334                                     <field name="move_id"/>
335                                     <field name="ref"/>
336                                     <field name="name"/>
337                                     <field name="journal_id" groups="base.group_user"/>
338                                     <field name="debit"/>
339                                     <field name="credit"/>
340                                     <field name="amount_currency"/>
341                                     <field name="currency_id"/>
342                                 </tree>
343                             </field>
344                         </page>
345                     </notebook>
346                 </form>
347             </field>
348         </record>
349
350         <record id="view_account_invoice_filter" model="ir.ui.view">
351             <field name="name">account.invoice.select</field>
352             <field name="model">account.invoice</field>
353             <field name="type">search</field>
354             <field name="arch" type="xml">
355                 <search string="Search Invoice">
356                    <group>
357                         <filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
358                         <filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices"/>
359                         <filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
360                         <separator orientation="vertical"/>
361                         <filter name="unpaid" icon="terp-dolar_ok!" string="Unpaid" domain="[('state','=','open')]" help="Unpaid Invoices"/>
362                         <separator orientation="vertical"/>
363                         <field name="number"
364                             string="Reference"
365                             filter_domain="['|', ('number','ilike',self),('origin','ilike',self)]"/>
366                         <field name="partner_id"/>
367                         <field name="user_id" widget="selection" string="Salesman">
368                             <filter domain="[('user_id','=',uid)]" help="My invoices" icon="terp-personal" />
369                         </field>
370                     </group>
371                     <newline/>
372                     <group>
373                         <field name="journal_id" widget="selection"/>
374                         <field name="period_id" string="Period"/>
375                     </group>
376                     <newline/>
377                     <group expand="0" string="Group By...">
378                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
379                         <filter string="Responsible" icon="terp-personal" domain="[]"  context="{'group_by':'user_id'}"/>
380                         <separator orientation="vertical"/>
381                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
382                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"  context="{'group_by':'state'}"/>
383                         <separator orientation="vertical"/>
384                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
385                         <filter string="Invoice Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date_invoice'}"/>
386                         <filter string="Due Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date_due'}"/>
387                     </group>
388                </search>
389             </field>
390         </record>
391
392         <record id="action_invoice_tree" model="ir.actions.act_window">
393             <field name="name">Invoices</field>
394             <field name="res_model">account.invoice</field>
395             <field name="view_type">form</field>
396             <field name="view_mode">tree,form,calendar,graph</field>
397             <field name="view_id" ref="invoice_tree"/>
398             <field name="context">{'type':'out_invoice'}</field>
399             <field name="search_view_id" ref="view_account_invoice_filter"/>
400         </record>
401
402         <record id="action_invoice_tree_pending_invoice" model="ir.actions.act_window">
403             <field name="name">Pending Invoice</field>
404             <field name="res_model">account.invoice</field>
405             <field name="view_type">form</field>
406             <field name="view_mode">tree,form,calendar,graph</field>
407             <field name="view_id" ref="invoice_tree"/>
408             <field name="context">{'type':'out_invoice'}</field>
409             <field name="domain">[('state','=','draft')]</field>
410            <!-- <field name="search_view_id" ref="view_account_invoice_filter"/>-->
411         </record>
412
413         <record id="action_invoice_tree_view1" model="ir.actions.act_window.view">
414             <field eval="1" name="sequence"/>
415             <field name="view_mode">tree</field>
416             <field name="act_window_id" ref="action_invoice_tree"/>
417         </record>
418
419         <record id="action_invoice_tree_view2" model="ir.actions.act_window.view">
420             <field eval="2" name="sequence"/>
421             <field name="view_mode">form</field>
422             <field name="view_id" ref="invoice_form"/>
423             <field name="act_window_id" ref="action_invoice_tree"/>
424         </record>
425
426         <record id="action_invoice_tree1" model="ir.actions.act_window">
427             <field name="name">Customer Invoices</field>
428             <field name="res_model">account.invoice</field>
429             <field name="view_type">form</field>
430             <field name="view_mode">tree,form,calendar,graph</field>
431             <field eval="False" name="view_id"/>
432             <field name="domain">[('type','=','out_invoice')]</field>
433             <field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
434             <field name="search_view_id" ref="view_account_invoice_filter"/>
435             <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>
436         </record>
437
438
439         <record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
440             <field eval="1" name="sequence"/>
441             <field name="view_mode">tree</field>
442             <field name="act_window_id" ref="action_invoice_tree1"/>
443         </record>
444
445         <record id="action_invoice_tree1_view2" model="ir.actions.act_window.view">
446             <field eval="2" name="sequence"/>
447             <field name="view_mode">form</field>
448             <field name="view_id" ref="invoice_form"/>
449             <field name="act_window_id" ref="action_invoice_tree1"/>
450         </record>
451
452         <menuitem action="action_invoice_tree1" id="menu_action_invoice_tree1" parent="menu_finance_receivables"/>
453
454         <record id="action_invoice_tree2" model="ir.actions.act_window">
455             <field name="name">Supplier 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 eval="False" name="view_id"/>
460             <field name="domain">[('type','=','in_invoice')]</field>
461             <field name="context">{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}</field>
462             <field name="search_view_id" ref="view_account_invoice_filter"/>
463             <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>
464         </record>
465         <menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="menu_finance_payables"/>
466
467         <record id="action_invoice_tree3" model="ir.actions.act_window">
468             <field name="name">Customer Refunds</field>
469             <field name="res_model">account.invoice</field>
470             <field name="view_type">form</field>
471             <field name="view_mode">tree,form,calendar,graph</field>
472             <field eval="False" name="view_id"/>
473             <field name="domain">[('type','=','out_refund')]</field>
474             <field name="context">{'default_type':'out_refund', 'type':'out_refund', 'journal_type': 'sale_refund'}</field>
475             <field name="search_view_id" ref="view_account_invoice_filter"/>
476             <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>
477         </record>
478
479         <record id="action_invoice_tree3_view1" model="ir.actions.act_window.view">
480             <field eval="1" name="sequence"/>
481             <field name="view_mode">tree</field>
482             <field name="act_window_id" ref="action_invoice_tree3"/>
483         </record>
484
485         <record id="action_invoice_tree3_view2" model="ir.actions.act_window.view">
486             <field eval="2" name="sequence"/>
487             <field name="view_mode">form</field>
488             <field name="view_id" ref="invoice_form"/>
489             <field name="act_window_id" ref="action_invoice_tree3"/>
490         </record>
491         <menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="menu_finance_receivables"/>
492
493         <record id="action_invoice_tree4" model="ir.actions.act_window">
494             <field name="name">Supplier Refunds</field>
495             <field name="res_model">account.invoice</field>
496             <field name="view_type">form</field>
497             <field name="view_mode">tree,form,calendar,graph</field>
498             <field eval="False" name="view_id"/>
499             <field name="domain">[('type','=','in_refund')]</field>
500             <field name="context">{'default_type': 'in_refund', 'type': 'in_refund', 'journal_type': 'purchase_refund'}</field>
501             <field name="search_view_id" ref="view_account_invoice_filter"/>
502             <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>
503         </record>
504         <menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
505
506         <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"/>
507
508         <act_window
509            id="act_account_journal_2_account_invoice_opened"
510            name="Unpaid Invoices"
511            context="{'search_default_journal_id': [active_id], 'search_default_unpaid':1, 'default_journal_id': active_id}"
512            res_model="account.invoice"
513            src_model="account.journal"/>
514
515     </data>
516 </openerp>