c61b3cfa1fbff7e92f12f00207b1327096204383
[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" class="oe_highlight"
11                         attrs="{'invisible': ['|',('template_id','=',False),('state','=','draft')]}"/>
12                 </xpath>
13                 <xpath expr="//header/button[@name='action_button_confirm']" position="before">
14                     <button name="open_quotation" string="Preview Quotation" type="object" attrs="{'invisible': ['|',('template_id','=',False),('state','!=','draft')]}"/>
15                 </xpath>
16                 <xpath expr="//header/button[@name='action_quotation_send'][1]" position="replace">
17                     <button name="action_quotation_send" string="Send by Email" type="object"
18                         groups="base.group_user"
19                         attrs="{'invisible': ['|',('quote_viewed','=',True),('state','!=', 'draft')]}"/>
20                     <button name="action_quotation_send" string="Send by Email" type="object" groups="base.group_user"
21                         class="oe_highlight"
22                         attrs="{'invisible': ['|',('quote_viewed','=',False),('state','!=', 'draft')]}"/>
23                 </xpath>
24                 <xpath expr="//header/button[@name='print_quotation'][1]" position="replace">
25                     <button name="print_quotation" string="Print" type="object" states="draft" groups="base.group_user"/>
26                 </xpath>
27                 <xpath expr="//page[@string='Order Lines']" position="after">
28                     <page string="Suggested Products">
29                         <label string="Optional Products &amp; Services" for="options"/>
30                         <field name="quote_viewed" invisible="1"/>
31                         <field name="options">
32                             <tree string="Sales Quotation Template Lines" editable="bottom">
33                                     <field name="product_id" on_change="on_change_product_id(product_id)"/>
34                                     <field name="name"/>
35                                     <field name="quantity"/>
36                                     <field name="uom_id" groups="product.group_uom"/>
37                                     <field name="price_unit"/>
38                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
39                                     <field name="website_description" invisible="1"/>
40                             </tree>
41                         </field>
42                     </page>
43                 </xpath>
44                 <xpath expr="//field[@name='client_order_ref']" position="after">
45                     <field name="template_id" on_change="onchange_template_id(template_id, partner_id, fiscal_position)"/>
46                     <field name="website_description" invisible="1"/>
47                 </xpath>
48             </field>
49         </record>
50
51         <record model="ir.ui.view" id="view_sale_quote_template_form">
52             <field name="name">sale.quote.template.form</field>
53             <field name="model">sale.quote.template</field>
54             <field name="type">form</field>
55             <field name="arch" type="xml">
56                 <form string="Sale Quotation Template">
57                     <sheet>
58                         <button string="Edit Template" type="object" name="open_template" class="oe_link oe_right"/>
59                         <div class="oe_title">
60                             <label for="name" class="oe_edit_only"/>
61                             <h1>
62                                 <field name="name"/>
63                             </h1>
64                         </div>
65                         <group>
66                             <group>
67                                <label for="number_of_days"/>
68                                <div id="number_of_days">
69                                    <field name="number_of_days" class="oe_inline"/> days
70                                </div>
71                             </group>
72                         </group>
73                         <notebook>
74                             <page string="Lines">
75                             <field name="quote_line">
76                                 <form string="Sales Quotation Template Lines">
77                                     <group>
78                                         <group>
79                                             <field name="product_id" on_change="on_change_product_id(product_id)"/>
80                                             <label for="product_uom_qty"/>
81                                             <div>
82                                                 <field
83                                                     name="product_uom_qty" class="oe_inline"/>
84                                             </div>
85                                             <field name="price_unit"/>
86                                             <label for="discount" groups="sale.group_discount_per_so_line"/>
87                                             <div groups="sale.group_discount_per_so_line">
88                                                 <field name="discount" class="oe_inline"/> %%
89                                             </div>
90                                         </group>
91                                     </group>
92                                     <notebook colspan="4">
93                                         <page string="Description">
94                                             <field name="name" />
95                                         </page>
96                                         <page string="Website Description">
97                                             <field name="website_description" />
98                                         </page>
99                                     </notebook>
100                                 </form>
101                                 <tree string="Sales Quotation Template Lines" editable="bottom">
102                                     <field name="sequence" widget="handle"/>
103                                     <field name="product_id" on_change="on_change_product_id(product_id)"/>
104                                     <field name="name"/>
105                                     <field name="product_uom_qty"/>
106                                     <field name="product_uom_id" groups="product.group_uom"/>
107                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
108                                     <field name="price_unit"/>
109                                     <field name="website_description" invisible="1"/>
110                                 </tree>
111                             </field>
112                         </page>
113                         <page string="Suggested Products">
114                             <field name="options">
115                               <tree string="Sales Quotation Template Lines" editable="bottom">
116                                 <field name="product_id" on_change="on_change_product_id(product_id)"/>
117                                 <field name="name"/>
118                                 <field name="quantity"/>
119                                 <field name="uom_id" groups="product.group_uom"/>
120                                 <field name="price_unit"/>
121                                 <field name="discount" groups="sale.group_discount_per_so_line"/>
122                                 <field name="website_description" invisible="1"/>
123                               </tree>
124                             </field>
125                         </page>
126                         </notebook>
127                         <field name="website_description" invisible="1"/>
128                         <field name="note" placeholder="Terms and conditions..."  nolabel="1"/>
129                     </sheet>
130                 </form>
131             </field>
132         </record>
133         <record model="ir.ui.view" id="view_sale_quote_template_tree">
134             <field name="name">sale.quote.template.tree</field>
135             <field name="model">sale.quote.template</field>
136             <field name="type">tree</field>
137             <field name="arch" type="xml">
138                 <tree string="Sale Quotation Template">
139                     <field name="name"/>
140                 </tree>
141             </field>
142         </record>
143         <record id="action_sale_quotation_template" model="ir.actions.act_window">
144             <field name="name">Quotation Templates</field>
145             <field name="type">ir.actions.act_window</field>
146             <field name="res_model">sale.quote.template</field>
147             <field name="view_type">form</field>
148             <field name="view_mode">tree,form</field>
149             <field name="help" type="html">
150                 <p class="oe_view_nocontent_create">
151                     Click here to create your template.
152                 </p><p>
153                     Use templates to create polished, professional quotes in minutes.
154                     Send these quotes by email and let your customers sign online.
155                     Use cross-selling and discounts to push and boost your sales.
156                 </p>
157             </field>
158         </record>
159
160         <record id="sale.action_quotations" model="ir.actions.act_window">
161             <field name="help" type="html">
162                 <p class="oe_view_nocontent_create">
163                     Click to create a quotation, the first step of a new sale.
164                 </p><p>
165                     Odoo will help you handling efficiently the complete sale flow:
166                     from the quotation to the sales order, the
167                     delivery, the invoicing and the payment collection.
168                 </p><p>
169                     Promote products with a designed quotation template you send by email.
170                 </p><p>
171                     The social feature helps you organizing discussions on each sales
172                     order, and allows your customers to keep track of the sales orders' evolution.
173                 </p>
174             </field>
175         </record>
176
177         <menuitem action="action_sale_quotation_template" id="menu_sale_quote_template" parent="base.menu_sales_config" sequence="1" name="Quotation Templates" groups="base.group_sale_salesman,base.group_sale_manager"/>
178     </data>
179 </openerp>