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