[MERGE] lp:~openerp-dev/openobject-addons/trunk-review_module_desc-psi
[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">There can be more than one version of a pricelist. Here you can create and manage new versions of a price list. Some examples of versions: 2010, 2011, Summer Promotion, etc.</field>
49         </record>
50         <menuitem
51             action="product_pricelist_action" id="menu_product_pricelist_action"
52             parent="product.menu_product_pricelist_main" sequence="2"/>
53
54         <record id="product_pricelist_item_tree_view" model="ir.ui.view">
55             <field name="name">product.pricelist.item.tree</field>
56             <field name="model">product.pricelist.item</field>
57             <field name="type">tree</field>
58             <field name="arch" type="xml">
59                 <tree string="Products Listprices Items">
60                     <field name="sequence"/>
61                     <field colspan="4" name="name"/>
62                     <field name="product_id"/>
63                     <field name="product_tmpl_id" groups="product.group_product_variant"/>
64                     <field name="categ_id"/>
65                     <field name="min_quantity"/>
66                     <field name="base"/>
67                 </tree>
68             </field>
69         </record>
70
71         <record id="product_pricelist_item_form_view" model="ir.ui.view">
72             <field name="name">product.pricelist.item.form</field>
73             <field name="model">product.pricelist.item</field>
74             <field name="type">form</field>
75             <field name="arch" type="xml">
76                 <form string="Products Listprices Items" version="7.0">
77                     <label for="name" class="oe_edit_only"/>
78                     <h1><field colspan="4" name="name"/></h1>
79
80                     <group col="4">
81                         <field name="product_id" on_change="product_id_change(product_id)"/>
82                         <field name="product_tmpl_id" groups="product.group_product_variant"/>
83                         <field name="categ_id"/>
84                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
85                         <field name="min_quantity"/>
86                         <field name="sequence"/>
87                     </group>
88                     <group col="4" string="Price Computation">
89                         <field name="base"/>
90                         <field name="base_pricelist_id" attrs="{'required': [('base','=', -1)], 'readonly': [('base','!=', -1)]}"/>
91                     </group>
92                     <group col="6" colspan="5">
93                         <label string="New Price ="/>
94                         <label string="Base Price"/>
95                         <label string="* ( 1 + "/>
96                         <field name="price_discount" nolabel="1"/>
97                         <label string=" ) + "/>
98                         <field name="price_surcharge" nolabel="1"/>
99                         <newline/>
100                         <field name="price_round" string="Rounding Method"/>
101                         <field name="price_min_margin" string="Min. Margin"/>
102                         <field name="price_max_margin" string="Max. Margin"/>
103                     </group>
104
105                 </form>
106             </field>
107         </record>
108
109         <record model="ir.ui.view" id="product_pricelist_view_search">
110             <field name="name">product.pricelist.search</field>
111             <field name="model">product.pricelist</field>
112             <field name="type">search</field>
113             <field name="arch" type="xml">
114                 <search string="Products Price Search">
115                     <field name="name" string="Products Price"/>
116                     <separator orientation="vertical"/>
117                     <field name="currency_id"/>
118                     <field name="type"/>
119                     <field name="active" />
120                 </search>
121             </field>
122         </record>
123
124
125         <record id="product_pricelist_view_tree" model="ir.ui.view">
126             <field name="name">product.pricelist.tree</field>
127             <field name="model">product.pricelist</field>
128             <field name="type">tree</field>
129             <field name="arch" type="xml">
130                 <tree string="Products Price List">
131                     <field name="name"/>
132                     <field name="type"/>
133                     <field name="currency_id"/>
134                     <field name="active" />
135                 </tree>
136             </field>
137         </record>
138         <record id="product_pricelist_view" model="ir.ui.view">
139             <field name="name">product.pricelist.form</field>
140             <field name="model">product.pricelist</field>
141             <field name="type">form</field>
142             <field name="arch" type="xml">
143                 <form string="Products Price List" version="7.0">
144                     <label for="name" class="oe_edit_only"/>
145                     <h1>
146                         <field name="name"/>
147                     </h1>
148                     <group col="4">
149                         <field name="active"/>
150                         <field name="type"/>
151                         <field name="currency_id"/>
152                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
153                     </group>
154                     <field name="version_id">
155                         <form string="Pricelist Version" version="7.0">
156                             <group col="4">
157                                 <field name="name"/>
158                                 <field name="active"/>
159                                 <field name="date_start"/>
160                                 <field name="date_end"/>
161                             </group>
162                             <field name="items_id"/>
163                         </form>
164                         <tree string="Pricelist Version">
165                             <field name="name"/>
166                             <field name="active"/>
167                             <field name="date_start"/>
168                             <field name="date_end"/>
169                         </tree>
170                     </field>
171                 </form>
172             </field>
173         </record>
174         <record id="product_pricelist_action2" model="ir.actions.act_window">
175             <field name="name">Pricelists</field>
176             <field name="type">ir.actions.act_window</field>
177             <field name="res_model">product.pricelist</field>
178             <field name="view_type">form</field>
179             <field name="view_mode">tree,form</field>
180             <field name="search_view_id" ref="product_pricelist_view_search" />
181             <field name="context">{"default_type":"sale", "search_default_type":"sale"}</field>
182             <field name="help">A price list contains rules to be evaluated in order to compute the purchase or sales price for all the partners assigned to a price list. Price lists have several versions (2010, 2011, Promotion of February 2010, etc.) and each version has several rules. Example: the customer price of a product category will be based on the supplier price multiplied by 1.80.</field>
183         </record>
184         <record id="product_pricelist_action_for_purchase" model="ir.actions.act_window">
185             <field name="name">Pricelists</field>
186             <field name="type">ir.actions.act_window</field>
187             <field name="res_model">product.pricelist</field>
188             <field name="view_type">form</field>
189             <field name="view_mode">tree,form</field>
190             <field name="search_view_id" ref="product_pricelist_view_search" />
191             <field name="context">{"default_type":"purchase", "search_default_type":"purchase"}</field>
192             <field name="help">A price list contains rules to be evaluated in order to compute the purchase or sales price for all the partners assigned to a price list. Price lists have several versions (2010, 2011, Promotion of February 2010, etc.) and each version has several rules. Example: the customer price of a product category will be based on the supplier price multiplied by 1.80.</field>
193         </record>
194         <menuitem
195             action="product_pricelist_action2" id="menu_product_pricelist_action2"
196             parent="base.menu_base_config" sequence="20" groups="product.group_sale_pricelist"/>
197
198         <record id="product_price_type_view" model="ir.ui.view">
199             <field name="name">product.price.type.form</field>
200             <field name="model">product.price.type</field>
201             <field name="type">form</field>
202             <field name="arch" type="xml">
203                 <form string="Products Price Type" version="7.0">
204                     <group col="4">
205                         <field name="name"/>
206                         <field name="active"/>
207                         <field name="field"/>
208                         <field name="currency_id"/>
209                     </group>
210                 </form>
211             </field>
212         </record>
213
214         <record id="product_price_type_action" model="ir.actions.act_window">
215             <field name="name">Price Types</field>
216             <field name="type">ir.actions.act_window</field>
217             <field name="res_model">product.price.type</field>
218             <field name="view_type">form</field>
219             <field name="view_mode">tree,form</field>
220         </record>
221
222         <menuitem
223             action="product_price_type_action" id="menu_product_price_type"
224             parent="product.menu_product_pricelist_main" sequence="4" groups="base.group_no_one"/>
225
226     </data>
227 </openerp>