[MERGE] forward port of branch 8.0 up to 591e329
[odoo/odoo.git] / addons / product / pricelist_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <menuitem id="base.menu_sale_config_sales" name="Sales"
6             parent="base.menu_base_config" sequence="0"/>
7         <menuitem id="menu_product_pricelist_main" name="Pricelists" 
8             parent="base.menu_base_config" groups="product.group_sale_pricelist" sequence="3"/>
9
10         <record id="product_pricelist_version_form_view" model="ir.ui.view">
11             <field name="name">product.pricelist.version.form</field>
12             <field name="model">product.pricelist.version</field>
13             <field name="arch" type="xml">
14                 <form string="Pricelist Version">
15                     <group>
16                         <group>
17                             <field name="name"/>
18                             <field name="pricelist_id"/>
19                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
20                         </group>
21                         <group>
22                             <field name="date_start"/>
23                             <field name="date_end"/>
24                             <field name="active"/>
25                         </group>
26                     </group>
27                     <notebook>
28                     <page string="Item List">
29                         <field name="items_id"/>
30                     </page>
31                     </notebook>
32                 </form>
33             </field>
34         </record>
35         <record id="product_pricelist_version_tree_view" model="ir.ui.view">
36             <field name="name">product.pricelist.version.tree</field>
37             <field name="model">product.pricelist.version</field>
38             <field name="arch" type="xml">
39                 <tree string="Pricelist Version">
40                     <field name="name"/>
41                     <field name="pricelist_id"/>
42                     <field name="date_start"/>
43                     <field name="date_end"/>
44                 </tree>
45             </field>
46         </record>
47
48         <record id="product_pricelist_action" model="ir.actions.act_window">
49             <field name="name">Pricelist Versions</field>
50             <field name="type">ir.actions.act_window</field>
51             <field name="res_model">product.pricelist.version</field>
52             <field name="view_type">form</field>
53             <field name="view_id" ref="product_pricelist_version_tree_view"/>
54             <field name="help" type="html">
55               <p class="oe_view_nocontent_create">
56                 Click to add a pricelist version.
57               </p><p>
58                 There can be more than one version of a pricelist, each of
59                 these must be valid during a certain period of time. Some
60                 examples of versions: Main Prices, 2010, 2011, Summer Sales,
61                 etc.
62               </p>
63             </field>
64         </record>
65         <menuitem
66             action="product_pricelist_action" id="menu_product_pricelist_action"
67             parent="product.menu_product_pricelist_main" sequence="2"/>
68
69         <record id="product_pricelist_item_tree_view" model="ir.ui.view">
70             <field name="name">product.pricelist.item.tree</field>
71             <field name="model">product.pricelist.item</field>
72             <field name="arch" type="xml">
73                 <tree string="Products Listprices Items">
74                     <field name="sequence"/>
75                     <field colspan="4" name="name"/>
76                     <field name="product_id"/>
77                     <field name="product_tmpl_id"/>
78                     <field name="categ_id"/>
79                     <field name="min_quantity"/>
80                     <field name="base"/>
81                 </tree>
82             </field>
83         </record>
84
85         <record id="product_pricelist_item_form_view" model="ir.ui.view">
86             <field name="name">product.pricelist.item.form</field>
87             <field name="model">product.pricelist.item</field>
88             <field name="arch" type="xml">
89                 <form string="Products Listprices Items">
90                     <label for="name" class="oe_edit_only"/>
91                     <h1><field colspan="4" name="name"/></h1>
92
93                     <group col="4">
94                         <field name="product_id" on_change="product_id_change(product_id)"/>
95                         <field name="product_tmpl_id"/>
96                         <field name="categ_id"/>
97                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
98                         <field name="min_quantity"/>
99                         <field name="sequence"/>
100                     </group>
101                     <separator string="Price Computation"/>
102                     <div class="oe_grey" groups="product.group_uom">
103                         <p>The computed price is expressed in the default Unit of Measure of the product.</p>
104                     </div>
105                     <group col="4">
106                         <field name="base"/>
107                         <field name="base_pricelist_id" attrs="{'invisible':[('base', '!=', -1)],'required': [('base','=', -1)], 'readonly': [('base','!=', -1)]}"/>
108                     </group>
109                     <group col="6" colspan="5">
110                         <label string="New Price ="/>
111                         <label string="Base Price"/>
112                         <label string="* ( 1 + "/>
113                         <field name="price_discount" nolabel="1"/>
114                         <label string=" ) + "/>
115                         <field name="price_surcharge" nolabel="1"/>
116                         <newline/>
117                         <field name="price_round" string="Rounding Method"/>
118                         <field name="price_min_margin" string="Min. Margin"/>
119                         <field name="price_max_margin" string="Max. Margin"/>
120                     </group>
121
122                 </form>
123             </field>
124         </record>
125
126         <record model="ir.ui.view" id="product_pricelist_view_search">
127             <field name="name">product.pricelist.search</field>
128             <field name="model">product.pricelist</field>
129             <field name="arch" type="xml">
130                 <search string="Products Price Search">
131                     <field name="name" string="Products Price"/>
132                     <field name="type"/>
133                     <field name="active" />
134                     <field name="currency_id" groups="base.group_multi_currency"/>
135                 </search>
136             </field>
137         </record>
138
139
140         <record id="product_pricelist_view_tree" model="ir.ui.view">
141             <field name="name">product.pricelist.tree</field>
142             <field name="model">product.pricelist</field>
143             <field name="arch" type="xml">
144                 <tree string="Products Price List">
145                     <field name="name"/>
146                     <field name="type"/>
147                     <field name="currency_id" groups="base.group_multi_currency"/>
148                     <field name="active" />
149                 </tree>
150             </field>
151         </record>
152         <record id="product_pricelist_view" model="ir.ui.view">
153             <field name="name">product.pricelist.form</field>
154             <field name="model">product.pricelist</field>
155             <field name="arch" type="xml">
156                 <form string="Products Price List">
157                     <label for="name" class="oe_edit_only"/>
158                     <h1>
159                         <field name="name"/>
160                     </h1>
161                     <group col="4">
162                         <field name="active"/>
163                         <field name="type"/>
164                         <field name="currency_id" groups="base.group_multi_currency"/>
165                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
166                     </group>
167                     <field name="version_id" context="{'type':type}">
168                         <form string="Pricelist Version">
169                             <group col="4">
170                                 <field name="name"/>
171                                 <field name="active"/>
172                                 <field name="date_start"/>
173                                 <field name="date_end"/>
174                             </group>
175                             <field name="items_id" context="{'type':type}"/>
176                         </form>
177                         <tree string="Pricelist Version">
178                             <field name="name"/>
179                             <field name="active"/>
180                             <field name="date_start"/>
181                             <field name="date_end"/>
182                         </tree>
183                     </field>
184                 </form>
185             </field>
186         </record>
187         <record id="product_pricelist_action2" model="ir.actions.act_window">
188             <field name="name">Pricelists</field>
189             <field name="type">ir.actions.act_window</field>
190             <field name="res_model">product.pricelist</field>
191             <field name="view_type">form</field>
192             <field name="view_mode">tree,form</field>
193             <field name="search_view_id" ref="product_pricelist_view_search" />
194             <field name="context">{"default_type":"sale", "search_default_type":"sale"}</field>
195             <field name="help" type="html">
196               <p class="oe_view_nocontent_create">
197                 Click to create a pricelist.
198               </p><p>
199                 A price list contains rules to be evaluated in order to compute
200                 the sales price of the products.
201               </p><p>
202                 Price lists may have several versions (2010, 2011, Promotion of
203                 February 2010, etc.) and each version may have several rules.
204                 (e.g. the customer price of a product category will be based on
205                 the supplier price multiplied by 1.80).
206               </p>
207             </field>
208         </record>
209         <record id="product_pricelist_action_for_purchase" model="ir.actions.act_window">
210             <field name="name">Pricelists</field>
211             <field name="type">ir.actions.act_window</field>
212             <field name="res_model">product.pricelist</field>
213             <field name="view_type">form</field>
214             <field name="view_mode">tree,form</field>
215             <field name="search_view_id" ref="product_pricelist_view_search" />
216             <field name="context">{"default_type":"purchase", "search_default_type":"purchase"}</field>
217             <field name="help" type="html">
218               <p class="oe_view_nocontent_create">
219                 Click to create a pricelist.
220               </p><p>
221                 A price list contains rules to be evaluated in order to compute
222                 the purchase price. The default price list has only one rule; use
223                 the cost price defined on the product form, so that you do not have to
224                 worry about supplier pricelists if you have very simple needs.
225               </p><p>
226                 But you can also import complex price lists form your supplier
227                 that may depends on the quantities ordered or the current
228                 promotions.
229               </p>
230             </field>
231         </record>
232         <menuitem
233             action="product_pricelist_action2" id="menu_product_pricelist_action2"
234             parent="product.menu_product_pricelist_main" sequence="1" groups="product.group_sale_pricelist"/>
235
236         <record id="product_price_type_view" model="ir.ui.view">
237             <field name="name">product.price.type.form</field>
238             <field name="model">product.price.type</field>
239             <field name="arch" type="xml">
240                 <form string="Products Price Type">
241                     <group col="4">
242                         <field name="name"/>
243                         <field name="active"/>
244                         <field name="field"/>
245                         <field name="currency_id" groups="base.group_multi_currency"/>
246                     </group>
247                 </form>
248             </field>
249         </record>
250
251         <record id="product_price_type_action" model="ir.actions.act_window">
252             <field name="name">Price Types</field>
253             <field name="type">ir.actions.act_window</field>
254             <field name="res_model">product.price.type</field>
255             <field name="view_type">form</field>
256             <field name="view_mode">tree,form</field>
257         </record>
258
259         <menuitem
260             action="product_price_type_action" id="menu_product_price_type"
261             parent="product.menu_product_pricelist_main" sequence="4" groups="base.group_no_one"/>
262
263     </data>
264 </openerp>