[FIX] mail: model can be None or uninstalled
[odoo/odoo.git] / addons / sale / wizard / sale_make_invoice_advance.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <record id="view_sale_advance_payment_inv" model="ir.ui.view">
5             <field name="name">Invoice Order</field>
6             <field name="model">sale.advance.payment.inv</field>
7             <field name="arch" type="xml">
8                 <form string="Invoice Sales Order">
9                     <p class="oe_grey">
10                         Select how you want to invoice this order. This
11                         will create a draft invoice that can be modified
12                         before validation.
13                     </p>
14                     <group>
15                         <field name="advance_payment_method" class="oe_inline"
16                             on_change="onchange_method(advance_payment_method, product_id)"/>
17                         <field name="qtty" invisible="1"/>
18                         <field name="product_id"
19                             on_change="onchange_method(advance_payment_method, product_id)"
20                             context="{'search_default_services': 1}"
21                             attrs="{'invisible': [('advance_payment_method','!=','fixed')]}"/>
22                         <label for="amount" attrs="{'invisible': [('advance_payment_method', 'not in', ('fixed','percentage'))]}"/>
23                         <div attrs="{'invisible': [('advance_payment_method', 'not in', ('fixed','percentage'))]}">
24                             <field name="amount"
25                                 attrs="{'required': [('advance_payment_method', 'in', ('fixed','percentage'))]}" class="oe_inline"/>
26                             <label string="%%"
27                                 attrs="{'invisible': [('advance_payment_method', '!=', 'percentage')]}" class="oe_inline"/>
28                         </div>
29                     </group>
30                     <div>
31                         <b><label string="After clicking 'Show Lines to Invoice', select lines to invoice and create the invoice from the 'More' dropdown menu." attrs="{'invisible': [('advance_payment_method', '!=', 'lines')]}"/></b>
32                     </div>
33                     <footer>
34                         <button name="create_invoices" string="Create and View Invoice" type="object"
35                             context="{'open_invoices': True}" class="oe_highlight"
36                             attrs="{'invisible': [('advance_payment_method', '=', 'lines')]}"/>
37                         <button name="create_invoices" string="Create Invoice" type="object"
38                             class="oe_highlight"
39                             attrs="{'invisible': [('advance_payment_method', '=', 'lines')]}"/>
40                         <button name="create_invoices" string="Show Lines to Invoice" type="object"
41                             class="oe_highlight"
42                             attrs="{'invisible': [('advance_payment_method', '!=', 'lines')]}"/>
43                         or
44                         <button string="Cancel" class="oe_link" special="cancel"/>
45                     </footer>
46                 </form>
47             </field>
48         </record>
49
50         <record id="action_view_sale_advance_payment_inv" model="ir.actions.act_window">
51             <field name="name">Invoice Order</field>
52             <field name="type">ir.actions.act_window</field>
53             <field name="res_model">sale.advance.payment.inv</field>
54             <field name="view_type">form</field>
55             <field name="view_mode">form</field>
56             <field name="target">new</field>
57         </record>
58     </data>
59 </openerp>