1 <?xml version="1.0" encoding="utf-8"?>
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="type">search</field>
9 <field name="inherit_id" ref="product.product_search_form_view"/>
10 <field name="arch" type="xml">
11 <field name="pricelist_id" position="before">
12 <field name="location_id" context="{'location': self}"/>
13 <field name="warehouse_id" context="{'warehouse': self}"/>
18 <record id="view_category_property_form" model="ir.ui.view">
19 <field name="name">product.category.stock.property.form.inherit</field>
20 <field name="model">product.category</field>
21 <field name="type">form</field>
22 <field name="inherit_id" ref="product.product_category_form_view"/>
23 <field name="arch" type="xml">
25 <xpath expr="/form/sheet//group[@name='account_stock_property']" position="inside">
26 <field name="property_stock_account_input_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
27 <field name="property_stock_account_output_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
28 <field name="property_stock_valuation_account_id" domain="[('type','<>','view'), ('type','<>','consolidation')]"/>
29 <field name="property_stock_journal"/>
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="type">form</field>
39 <field name="inherit_id" ref="product.product_template_form_view"/>
40 <field name="arch" type="xml">
41 <page position="after" string="Information">
42 <page string="Properties">
43 <group string="Counter-Part Locations Properties" groups="stock.group_locations">
44 <field name="property_stock_procurement" domain="[('usage','=','procurement')]"/>
45 <field name="property_stock_production" domain="[('usage','=','production')]"/>
46 <field name="property_stock_inventory" domain="[('usage','=','inventory')]"/>
48 <group string="Accounting Entries">
49 <field name="property_stock_account_input" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
50 <field name="property_stock_account_output" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
57 <record id="view_product_standard_price_form" model="ir.ui.view">
58 <field name="name">product.product.standard.price.form.inherit</field>
59 <field name="model">product.product</field>
60 <field name="type">form</field>
61 <field name="inherit_id" ref="product.product_normal_form_view"/>
62 <field name="arch" type="xml">
63 <field name="standard_price" position="replace" version="7.0">
64 <label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user"/>
65 <div groups="base.group_user">
66 <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/> -
67 <button name="%(action_view_change_standard_price)d" string="Update"
68 type="action" attrs="{'invisible':[('cost_method','<>','average')]}"
75 <record id="view_normal_property_acc_form" model="ir.ui.view">
76 <field name="name">product.normal.stock.acc.property.form.inherit</field>
77 <field name="model">product.product</field>
78 <field name="type">form</field>
79 <field name="inherit_id" ref="product.product_normal_form_view"/>
80 <field name="priority">26</field>
81 <field name="arch" type="xml">
82 <xpath expr="//group[@name='properties']" position="before">
83 <group groups="stock.group_inventory_valuation">
84 <separator string="Inventory Valuation" colspan="4"/>
85 <group colspan="2" col="2">
86 <field name="valuation" attrs="{'readonly':[('type', '=', 'service')]}"/>
88 <group colspan="2" col="2">
89 <field name="property_stock_account_input" attrs="{'readonly':[('valuation', '!=', 'real_time')]}"
90 domain="[('type','<>','view'),('type','<>','consolidation')]"/>
91 <field name="property_stock_account_output" attrs="{'readonly':[('valuation', '!=', 'real_time')]}"
92 domain="[('type','<>','view'),('type','<>','consolidation')]"/>
100 <record id="view_normal_stock_property_form" model="ir.ui.view">
101 <field name="name">product.normal.stock.form.inherit</field>
102 <field name="model">product.product</field>
103 <field name="type">form</field>
104 <field name="inherit_id" ref="product.product_normal_form_view"/>
105 <field name="arch" type="xml">
106 <group name="status" position="before" version="7.0">
107 <group string="Stock and Expected Variations">
108 <field name="qty_available"/>
109 <field name="incoming_qty" groups="base.group_user"/>
110 <label for="virtual_available" groups="base.group_user"/>
111 <div groups="base.group_user">
112 <field name="virtual_available" class="oe_inline"/>
114 <button name="%(action_view_change_product_quantity)d" string="Update" attrs="{'invisible': [('type', '=', 'service')]}"
115 type="action" icon="gtk-execute" groups="stock.group_stock_manager,stock.group_stock_user" class="oe_inline"/>
117 <field name="outgoing_qty" groups="base.group_user"/>
119 <group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
120 <field name="track_production" groups="stock.group_production_lot"/>
121 <field name="track_incoming" groups="stock.group_tracking_lot"/>
122 <field name="track_outgoing" groups="stock.group_tracking_lot"/>
128 <record id="action_receive_move" model="ir.actions.act_window">
129 <field name="name">Receptions</field>
130 <field name="res_model">stock.move</field>
131 <field name="type">ir.actions.act_window</field>
132 <field name="view_type">form</field>
133 <field name="view_mode">tree,form</field>
134 <field name="domain">[('product_id','=',active_id),('picking_id.type','=','in')]</field>
135 <field name="view_id" ref="view_move_tree_reception_picking"/>
136 <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
137 <field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>
138 <field name="help" type="html">
139 <p class="oe_view_nocontent_create">
140 Click to register a reception for this product.
142 Here you will find the history of all receptions related to
143 this product, as well as all future receptions you are waiting
149 <record id="action_deliver_move" model="ir.actions.act_window">
150 <field name="name">Deliveries</field>
151 <field name="res_model">stock.move</field>
152 <field name="type">ir.actions.act_window</field>
153 <field name="view_type">form</field>
154 <field name="view_mode">tree,form</field>
155 <field name="domain">[('product_id','=',active_id),('picking_id.type','=','out')]</field>
156 <field name="view_id" ref="view_move_tree_reception_picking"/>
157 <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
158 <field name="search_view_id" ref="view_move_search_reception_outcoming_picking"/>
159 <field name="help" type="html">
160 <p class="oe_view_nocontent_create">
161 Click to add a delivery order for this product.
163 Here you will find the history of all past deliveries related to
164 this product, as well as all the products you must deliver to
170 <record model="ir.ui.view" id="product.product_kanban_view">
171 <field name="name">Product Kanban</field>
172 <field name="model">product.product</field>
173 <field name="type">kanban</field>
174 <field name="arch" type="xml">
176 <field name="color"/>
178 <field name="image_medium"/>
179 <field name="list_price"/>
180 <field name="reception_count"/>
181 <field name="delivery_count"/>
183 <t t-name="kanban-box">
184 <div class="oe_product_vignette">
185 <div class="oe_product_img">
186 <a type="edit"><img t-att-src="kanban_image('product.product', 'image_medium', record.id.value)" class="oe_product_photo"/></a>
188 <div class="oe_product_desc">
189 <h4><a type="edit"><field name="name"></field></a></h4>
191 <li>Code: <field name="code"/></li>
192 <li t-if="record.type.raw_value != 'service'">Stock on hand: <field name="qty_available"/> <field name="uom_id"/></li>
193 <li t-if="record.type.raw_value != 'service'">Stock available: <field name="virtual_available"/> <field name="uom_id"/></li>
194 <li>Price: <field name="lst_price"></field></li>
195 <!-- TODO the 'groups' attribute doesn't work in kanban views -->
196 <li groups="base.group_user">Cost: <field name="standard_price"></field></li>
198 <div groups="base.group_user">
199 <a name="%(action_receive_move)d" type="action">
200 <t t-if="record.reception_count.value">Receptions(<t t-esc="record.reception_count.value"/>)</t>
202 <a name="%(action_deliver_move)d" type="action">
203 <t t-if="record.delivery_count.value">Deliveries(<t t-esc="record.delivery_count.value"/>)</t>
209 $('.oe_product_photo').load(function() { if($(this).width() > $(this).height()) { $(this).addClass('oe_product_photo_wide') } });
218 <record id="view_normal_property_form" model="ir.ui.view">
219 <field name="name">product.normal.stock.property.form.inherit</field>
220 <field name="model">product.product</field>
221 <field name="type">form</field>
222 <field name="inherit_id" ref="product.product_normal_form_view"/>
223 <field name="arch" type="xml">
224 <group name="store" position="after">
225 <group name="store" groups="stock.group_locations">
226 <separator string="Counter-Part Locations Properties" colspan="2"/>
227 <field name="property_stock_procurement" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','procurement')]"/>
228 <field name="property_stock_production" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','production')]"/>
229 <field name="property_stock_inventory" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','inventory')]"/>