[REM] Removed auth='admin' from modules
[odoo/odoo.git] / addons / stock / product_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <record id="product_search_form_view_stock" model="ir.ui.view">
6             <field name="name">product.search.stock.form</field>
7             <field name="model">product.product</field>
8             <field name="inherit_id" ref="product.product_search_form_view"/>
9             <field name="arch" type="xml">
10                 <field name="pricelist_id" position="before">
11                     <field name="location_id" widget="selection" context="{'location': self}"/>
12                     <field name="warehouse_id" widget="selection" context="{'warehouse': self}"/>
13                 </field>
14             </field>
15         </record>
16
17         <record id="view_category_property_form" model="ir.ui.view">
18             <field name="name">product.category.stock.property.form.inherit</field>
19             <field name="model">product.category</field>
20             <field name="inherit_id" ref="account.view_category_property_form"/>
21             <field name="arch" type="xml">
22                 <data>
23                     <group name="account_property" position="after">
24                         <group name="account_stock_property" string="Account Stock Properties" colspan="2">
25                             <field name="property_stock_account_input_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
26                             <field name="property_stock_account_output_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
27                             <field name="property_stock_valuation_account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
28                             <field name="property_stock_journal"/>
29                         </group>
30                     </group>
31                 </data>
32             </field>
33         </record>
34
35         <record id="view_template_property_form" model="ir.ui.view">
36             <field name="name">product.template.stock.property.form.inherit</field>
37             <field name="model">product.template</field>
38             <field name="inherit_id" ref="product.product_template_form_view"/>
39             <field name="arch" type="xml">
40                 <xpath expr="//group[@name='sale_condition']" position="inside">
41                     <label for="sale_delay"/>
42                     <div>
43                         <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days
44                     </div>
45                 </xpath>
46                 <xpath expr="//group[@name='status']" position="after">
47                     <group name="store" string="Storage Location">
48                         <field name="loc_rack"/>
49                         <field name="loc_row"/>
50                         <field name="loc_case"/>
51                     </group>
52                 </xpath>
53                 <xpath expr="//group[@name='weight']" position="after">
54                     <group string="Accounting Entries">
55                         <field name="property_stock_account_input" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
56                         <field name="property_stock_account_output" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
57                     </group>
58                     <group string="Counter-Part Locations Properties" groups="stock.group_locations">
59                         <field name="property_stock_procurement" domain="[('usage','=','procurement')]"/>
60                         <field name="property_stock_production" domain="[('usage','=','production')]"/>
61                         <field name="property_stock_inventory" domain="[('usage','=','inventory')]"/>
62                     </group>
63                 </xpath>
64                 <field name="product_manager" position="attributes" version="7.0">
65                     <attribute name="context">{'default_groups_ref': ['base.group_user', 'base.group_sale_manager', 'stock.group_stock_manager']}</attribute>
66                 </field>
67             </field>
68         </record>
69
70         <record id="view_normal_procurement_locations_form" model="ir.ui.view">
71             <field name="name">product.normal.procurement.locations.inherit</field>
72             <field name="model">product.product</field>
73             <field name="inherit_id" ref="product.product_normal_form_view"/>
74             <field name="arch" type="xml">
75                 <xpath expr="//div[@name='buttons']" position="inside">
76                    <button string="Inventory" name="%(action_product_location_tree)d" type="action"  attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations"/>
77                    <button string="Moves" name= "%(act_product_stock_move_open)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_stock_user"/>
78                 </xpath>
79                 <group name="procurement_uom" position="before">
80                     <group name="delay" string="Delays">
81                         <label for="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
82                         <div attrs="{'invisible':[('type','=','service')]}">
83                             <field name="produce_delay" class="oe_inline"/> days
84                         </div>
85                         <field name="active"/>
86                     </group>
87                 </group>
88                 <xpath expr="//group[@string='Sale Conditions']" position="inside">
89                     <label for="sale_delay"/>
90                         <div>
91                             <field name="sale_delay" class="oe_inline"/> days
92                         </div>
93                 </xpath>
94                 <group name="status" position="before" version="7.0">
95                     <group string="Stock and Expected Variations" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
96                         <label for="qty_available"/>
97                             <div>
98                                 <field name="qty_available" class="oe_inline"/>
99                                 <button name="%(action_view_change_product_quantity)d" string="⇒ Update"
100                                     type="action"
101                                     class="oe_link"/>
102                             </div>
103                         <label for="incoming_qty"/>
104                         <div>
105                             <field name="incoming_qty" class="oe_inline"/>
106                         </div>
107                         <field name="outgoing_qty" class="oe_inline"/>
108                         <field name="virtual_available" class="oe_inline"/>
109                     </group>
110                     <group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
111                         <field name="track_production" groups="stock.group_production_lot"/>
112                         <field name="track_incoming" groups="stock.group_tracking_lot"/>
113                         <field name="track_outgoing" groups="stock.group_tracking_lot"/>
114                     </group>
115                 </group>
116                 <group name="status" position="after" version="7.0">
117                     <group name="store" string="Storage Location" attrs="{'invisible':[('type','=','service')]}">
118                         <field name="loc_rack"/>
119                         <field name="loc_row"/>
120                         <field name="loc_case"/>
121                     </group>
122                 </group>
123                 <group name="Weights" position="after">
124                      <group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties">
125                          <field name="property_stock_procurement" attrs="{'readonly':['|', ('type','=','service'), ('is_only_child', '=', False) ]}" domain="[('usage','=','procurement')]"/>
126                          <field name="property_stock_production" attrs="{'readonly':['|', ('type','=','service'), ('is_only_child', '=', False) ]}" domain="[('usage','=','production')]"/>
127                          <field name="property_stock_inventory"  attrs="{'readonly':['|', ('type','=','service'), ('is_only_child', '=', False) ]}" domain="[('usage','=','inventory')]"/>
128                      </group>
129                 </group>
130                 <field name="product_manager" position="attributes" version="7.0">
131                     <attribute name="context">{'default_groups_ref': ['base.group_user', 'base.group_sale_manager', 'stock.group_stock_manager']}</attribute>
132                 </field>
133             </field>
134         </record>
135
136         <record id="view_product_standard_price_form" model="ir.ui.view">
137             <field name="name">product.product.standard.price.form.inherit</field>
138             <field name="model">product.product</field>
139             <field name="inherit_id" ref="product.product_normal_form_view"/>
140             <field name="arch" type="xml">
141                 <field name="standard_price" position="replace" version="7.0">
142                     <label for="standard_price" align="1.0" groups="base.group_user"/>
143                     <div groups="base.group_user">
144                         <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
145                         <button name="%(action_view_change_standard_price)d" string="- update"
146                             type="action" attrs="{'invisible':[('cost_method','&lt;&gt;','average')]}"
147                             class="oe_link" groups="product.group_costing_method"/>
148                     </div>
149                 </field>
150             </field>
151         </record>
152
153         <record id="view_normal_property_acc_form" model="ir.ui.view">
154             <field name="name">product.normal.stock.acc.property.form.inherit</field>
155             <field name="model">product.product</field>
156             <field name="inherit_id" ref="product.product_normal_form_view"/>
157             <field name="priority">26</field>
158             <field name="arch" type="xml">
159                 <xpath expr="//group[@name='properties']" position="before">
160                     <group groups="stock.group_inventory_valuation">
161                         <separator string="Inventory Valuation" colspan="4"/>
162                         <group colspan="2" col="2">
163                             <field name="valuation" attrs="{'readonly':[('type', '=', 'service')]}"/>
164                         </group>
165                         <group colspan="2" col="2">
166                             <field name="property_stock_account_input"
167                                 attrs="{'invisible':[('valuation', '!=', 'real_time')],
168                                         'readonly': [('is_only_child', '=', False)]}"
169                                 domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
170                             <field name="property_stock_account_output"
171                                 attrs="{'invisible':[('valuation', '!=', 'real_time')],
172                                         'readonly': [('is_only_child', '=', False)]}"
173                                 domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
174                         </group>
175                     </group>
176                     <newline/>
177                 </xpath>
178             </field>
179         </record>
180
181
182         <record id="action_receive_move" model="ir.actions.act_window">
183             <field name="name">Receptions</field>
184             <field name="res_model">stock.move</field>
185             <field name="type">ir.actions.act_window</field>
186             <field name="view_type">form</field>
187             <field name="view_mode">tree,form</field>
188             <field name="domain">[('picking_id.type','=','in')]</field>
189             <field name="view_id" ref="view_move_tree_reception_picking"/>
190             <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
191             <field name="help" type="html">
192               <p class="oe_view_nocontent_create">
193                 Click to register a reception for this product. 
194               </p><p>
195                 Here you will find the history of all receptions related to
196                 this product, as well as all future receptions you are waiting
197                 from your suppliers.
198               </p>
199             </field>
200         </record>
201
202         <record id="action_deliver_move" model="ir.actions.act_window">
203             <field name="name">Deliveries</field>
204             <field name="res_model">stock.move</field>
205             <field name="type">ir.actions.act_window</field>
206             <field name="view_type">form</field>
207             <field name="view_mode">tree,form</field>
208             <field name="domain">[('picking_id.type','=','out')]</field>
209             <field name="view_id" ref="view_move_tree_reception_picking"/>
210             <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
211             <field name="help" type="html">
212               <p class="oe_view_nocontent_create">
213                 Click to add a delivery order for this product.
214               </p><p>
215                 Here you will find the history of all past deliveries related to
216                 this product, as well as all the products you must deliver to
217                 customers.
218               </p>
219             </field>
220         </record>
221
222         <record model="ir.ui.view" id="product_kanban_stock_view">
223             <field name="name">Product Kanban Stock</field>
224             <field name="model">product.product</field>
225             <field name="inherit_id" ref="product.product_kanban_view"/>
226             <field name="arch" type="xml">
227                 <field name="list_price" position="after">
228                     <field name="reception_count"/>
229                     <field name="delivery_count"/>
230                 </field>
231                 <xpath expr="//div[@name='tags']" position="inside">
232                     <a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value&gt;1">
233                         <t t-esc="record.reception_count.value"/> Receptions
234                     </a>
235                     <a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value==1">
236                         <t t-esc="record.reception_count.value"/> Reception
237                     </a>
238                     <a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value&gt;1">
239                         <t t-esc="record.delivery_count.value"/> Deliveries
240                     </a>
241                     <a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value==1">
242                         <t t-esc="record.delivery_count.value"/> Delivery
243                     </a>
244                 </xpath>
245                 <ul position="inside">
246                     <li t-if="record.type.raw_value != 'service'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
247                     <li t-if="record.type.raw_value != 'service'">Forecasted: <field name="virtual_available"/> <field name="uom_id"/></li>
248                 </ul>
249             </field>
250         </record>
251
252     </data>
253 </openerp>