[MERGE] forward port of branch 8.0 up to ed1c173
[odoo/odoo.git] / addons / website_quote / views / website_quotation_backend.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4         <record model="ir.ui.view" id="sale_order_form_quote">
5             <field name="name">sale.order.form.payment</field>
6             <field name="model">sale.order</field>
7             <field name="inherit_id" ref="sale.view_order_form"/>
8             <field name="arch" type="xml">
9                 <xpath expr="//header/button[@name='action_button_confirm']" position="before">
10                     <button name="open_quotation" string="Preview Quotation" type="object"
11                         attrs="{'invisible': [('template_id','=',False)]}"/>
12                 </xpath>
13                 <xpath expr="//page[@string='Order Lines']" position="after">
14                     <page string="Suggested Products">
15                         <label string="Optional Products &amp; Services" for="options"/>
16                         <field name="options">
17                             <tree string="Sales Quote Template Lines" editable="bottom">
18                                     <field name="product_id" on_change="on_change_product_id(product_id)"/>
19                                     <field name="name"/>
20                                     <field name="quantity"/>
21                                     <field name="uom_id" groups="product.group_uom"/>
22                                     <field name="price_unit"/>
23                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
24                                     <field name="website_description" invisible="1"/>
25                             </tree>
26                         </field>
27                     </page>
28                 </xpath>
29                 <xpath expr="//field[@name='client_order_ref']" position="after">
30                     <field name="template_id" on_change="onchange_template_id(template_id, partner_id, fiscal_position)"/>
31                     <field name="website_description" invisible="1"/>
32                 </xpath>
33             </field>
34         </record>
35
36         <record model="ir.ui.view" id="view_sale_quote_template_form">
37             <field name="name">sale.quote.template.form</field>
38             <field name="model">sale.quote.template</field>
39             <field name="type">form</field>
40             <field name="arch" type="xml">
41                 <form string="Sale Quotation Template">
42                     <sheet>
43                         <button string="Edit Template" type="object" name="open_template" class="oe_link oe_right"/>
44                         <div class="oe_title">
45                             <label for="name" class="oe_edit_only"/>
46                             <h1>
47                                 <field name="name"/>
48                             </h1>
49                         </div>
50                         <group>
51                             <group>
52                                <label for="number_of_days"/>
53                                <div id="number_of_days">
54                                    <field name="number_of_days" class="oe_inline"/> days
55                                </div>
56                             </group>
57                         </group>
58                         <notebook>
59                             <page string="Lines">
60                             <field name="quote_line">
61                                 <form string="Sales Quote Template Lines">
62                                     <group>
63                                         <group>
64                                             <field name="product_id" on_change="on_change_product_id(product_id)"/>
65                                             <label for="product_uom_qty"/>
66                                             <div>
67                                                 <field
68                                                     name="product_uom_qty" class="oe_inline"/>
69                                             </div>
70                                             <field name="price_unit"/>
71                                             <label for="discount" groups="sale.group_discount_per_so_line"/>
72                                             <div groups="sale.group_discount_per_so_line">
73                                                 <field name="discount" class="oe_inline"/> %%
74                                             </div>
75                                         </group>
76                                     </group>
77                                     <notebook colspan="4">
78                                         <page string="Description">
79                                             <field name="name" />
80                                         </page>
81                                         <page string="Website Description">
82                                             <field name="website_description" />
83                                         </page>
84                                     </notebook>
85                                 </form>
86                                 <tree string="Sales Quote Template Lines" editable="bottom">
87                                     <field name="product_id" on_change="on_change_product_id(product_id)"/>
88                                     <field name="name"/>
89                                     <field name="product_uom_qty"/>
90                                     <field name="product_uom_id" groups="product.group_uom"/>
91                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
92                                     <field name="price_unit"/>
93                                     <field name="website_description" invisible="1"/>
94                                 </tree>
95                             </field>
96                         </page>
97                         <page string="Suggested Products">
98                             <field name="options">
99                               <tree string="Sales Quote Template Lines" editable="bottom">
100                                 <field name="product_id" on_change="on_change_product_id(product_id)"/>
101                                 <field name="name"/>
102                                 <field name="quantity"/>
103                                 <field name="uom_id" groups="product.group_uom"/>
104                                 <field name="price_unit"/>
105                                 <field name="discount" groups="sale.group_discount_per_so_line"/>
106                                 <field name="website_description" invisible="1"/>
107                               </tree>
108                             </field>
109                         </page>
110                         </notebook>
111                         <field name="website_description" invisible="1"/>
112                         <field name="note" placeholder="Terms and conditions..."  nolabel="1"/>
113                     </sheet>
114                 </form>
115             </field>
116         </record>
117         <record model="ir.ui.view" id="view_sale_quote_template_tree">
118             <field name="name">sale.quote.template.tree</field>
119             <field name="model">sale.quote.template</field>
120             <field name="type">tree</field>
121             <field name="arch" type="xml">
122                 <tree string="Sale Quote Template">
123                     <field name="name"/>
124                 </tree>
125             </field>
126         </record>
127         <record id="action_sale_quotation_template" model="ir.actions.act_window">
128             <field name="name">Quotation Templates</field>
129             <field name="type">ir.actions.act_window</field>
130             <field name="res_model">sale.quote.template</field>
131             <field name="view_type">form</field>
132             <field name="view_mode">tree,form</field>
133         </record>
134
135         <menuitem action="action_sale_quotation_template" id="menu_sale_quote_template" parent="base.menu_base_config" sequence="6" groups="base.group_sale_salesman,base.group_sale_manager"/>
136     </data>
137 </openerp>