[IMP]Improve wizard button
[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">Advance Invoice</field>
6             <field name="model">sale.advance.payment.inv</field>
7             <field name="type">form</field>
8             <field name="arch" type="xml">
9                 <form string="Advance Invoice" version="7.0">
10                     <header>
11                         <button name="create_invoices" string="Create Invoice" type="object" icon="gtk-go-forward" context="{'open_invoices': False}" class="oe_highlight_editable" />
12                         <button name="create_invoices" string="Create and view Invoice" type="object" icon="terp-camera_test" context="{'open_invoices': True}" class="oe_highlight_editable" />
13                     </header>
14                     <group col="4">
15                         <field name="advance_payment_method" on_change="onchange_advance_payment_method(advance_payment_method,product_id)"/>
16                         <newline />
17                         <field name="qtty" invisible="1"/>
18                         <field name="product_id" on_change="onchange_advance_payment_method(advance_payment_method,product_id)" context="{'search_default_services':1}" attrs="{'invisible': [('advance_payment_method','=','percentage')]}" colspan="2"/>
19                         <field name="amount" colspan="2"/>
20                     </group>
21                 </form>
22             </field>
23         </record>
24
25         <record id="action_view_sale_advance_payment_inv" model="ir.actions.act_window">
26             <field name="name">Advance Invoice</field>
27             <field name="type">ir.actions.act_window</field>
28             <field name="res_model">sale.advance.payment.inv</field>
29             <field name="view_type">form</field>
30             <field name="view_mode">form</field>
31             <field name="target">new</field>
32         </record>
33     </data>
34 </openerp>