1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="view_stock_product_tree" model="ir.ui.view">
6 <field name="name">product.stock.tree.inherit</field>
7 <field name="model">product.product</field>
8 <field name="inherit_id" ref="product.product_product_tree_view"/>
9 <field name="arch" type="xml">
10 <tree position="attributes">
11 <attribute name="colors">{'red':virtual_available<0, 'blue':virtual_available>=0 and state in ('draft', 'end', 'obsolete'), 'black':virtual_available>=0 and state not in ('draft', 'end', 'obsolete')}</attribute>
13 <field name="price" position="after">
14 <field name="qty_available"/>
15 <field name="virtual_available"/>
20 <record id="view_stock_product_template_tree" model="ir.ui.view">
21 <field name="name">product.template.stock.tree.inherit</field>
22 <field name="model">product.template</field>
23 <field name="inherit_id" ref="product.product_template_tree_view"/>
24 <field name="arch" type="xml">
25 <tree position="attributes">
26 <attribute name="colors">{'red':virtual_available<0, 'blue':virtual_available>=0 and state in ('draft', 'end', 'obsolete'), 'black':virtual_available>=0 and state not in ('draft', 'end', 'obsolete')}</attribute>
28 <field name="uom_id" position="after">
29 <field name="qty_available"/>
30 <field name="virtual_available"/>
36 <record id="action_receive_move" model="ir.actions.act_window">
37 <field name="name">Receipts</field>
38 <field name="res_model">stock.move</field>
39 <field name="type">ir.actions.act_window</field>
40 <field name="view_type">form</field>
41 <field name="view_mode">tree,form</field>
42 <field name="domain" eval="[('picking_id.picking_type_id.code','=','incoming'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
43 <field name="view_id" ref="view_move_tree_receipt_picking"/>
44 <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
45 <field name="help" type="html">
46 <p class="oe_view_nocontent_create">
47 Click to register a receipt for this product.
49 Here you will find the history of all receipts related to
50 this product, as well as all future receipts you are waiting
56 <record id="action_deliver_move" model="ir.actions.act_window">
57 <field name="name">Deliveries</field>
58 <field name="res_model">stock.move</field>
59 <field name="type">ir.actions.act_window</field>
60 <field name="view_type">form</field>
61 <field name="view_mode">tree,form</field>
62 <field name="view_id" ref="view_move_tree_receipt_picking"/>
63 <field name="domain" eval="[('picking_type_id.code','=','outgoing'), ('location_id.usage','=','internal'), ('location_dest_id.usage', '!=', 'internal')]"/>
64 <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
65 <field name="help" type="html">
66 <p class="oe_view_nocontent_create">
67 Click to add a delivery order for this product.
69 Here you will find the history of all past deliveries related to
70 this product, as well as all the products you must deliver to
76 <!-- Product Template -->
78 <record id="product_template_search_form_view_stock" model="ir.ui.view">
79 <field name="name">product.template.search.stock.form</field>
80 <field name="model">product.template</field>
81 <field name="inherit_id" ref="product.product_template_search_view"/>
82 <field name="arch" type="xml">
83 <field name="product_variant_ids" position="before">
85 <filter name="real_stock_available" string="Available Products" domain="[('qty_available','>',0)]"/>
86 <filter name="virtual_stock_available" string="Forecast Available Products" domain="[('virtual_available','>',0)]"/>
87 <filter name="real_stock_exhausted" string="Exhausted Stock" domain="[('qty_available','<=',0)]"/>
88 <filter name="virtual_stock_exhausted" string="Forecast Exhausted Stock" domain="[('virtual_available','<=',0)]"/>
89 <filter name="real_stock_negative" string="Negative Stock" domain="[('qty_available','<',0)]"/>
90 <filter name="virtual_stock_negative" string="Forecast Negative Stock" domain="[('virtual_available','<',0)]"/>
92 <filter name="consumable" position="before">
93 <filter string="Products" icon="terp-accessories-archiver" domain="[('type','=','product')]" help="Stockable products"/>
98 <record id="view_template_property_form" model="ir.ui.view">
99 <field name="name">product.template.stock.property.form.inherit</field>
100 <field name="model">product.template</field>
101 <field name="inherit_id" ref="product.product_template_form_view"/>
102 <field name="arch" type="xml">
103 <group name="sale_condition" position="inside">
104 <label for="sale_delay"/>
106 <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days
109 <group name="status" position="before">
110 <group string="Stock and Expected Variations" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
111 <label for="qty_available"/>
113 <field name="qty_available" class="oe_inline"/>
114 <button name="%(action_view_change_product_quantity)d" string="⇒ Update"
118 <label for="incoming_qty"/>
120 <field name="incoming_qty" class="oe_inline"/>
121 <button string="⇒ Request Procurement" name="%(stock.act_make_procurement)d" type="action" class="oe_link"/>
123 <field name="virtual_available"/>
126 <group name="status" position="after">
127 <group name="store" string="Storage Location" attrs="{'invisible':[('type','=','service')]}">
128 <field name="loc_rack"/>
129 <field name="loc_row"/>
130 <field name="loc_case"/>
133 <group name="status" position="before">
134 <group name="lot" groups="stock.group_production_lot" string="Lots" attrs="{'invisible':[('type','=','service')]}">
135 <field name="track_all" groups="stock.group_production_lot"/>
136 <field name="track_incoming" groups="stock.group_production_lot" attrs="{'invisible': [('track_all', '=', True)]}"/>
137 <field name="track_outgoing" groups="stock.group_production_lot" attrs="{'invisible': [('track_all', '=', True)]}"/>
140 <group name="weight" position="before">
141 <group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties" attrs="{'invisible':[('type','=','service')]}">
142 <field name="property_stock_procurement" domain="[('usage','=','procurement')]"/>
143 <field name="property_stock_production" domain="[('usage','=','production')]"/>
144 <field name="property_stock_inventory" domain="[('usage','=','inventory')]"/>
147 <field name="product_manager" position="attributes">
148 <attribute name="context">{'default_groups_ref': ['base.group_user', 'base.group_sale_manager', 'stock.group_stock_manager']}</attribute>
150 <group name="procurement_uom" position="after" >
151 <group string="Supply Chain Information" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
152 <field name="route_ids" widget="many2many_checkboxes"/>
160 <record model="ir.ui.view" id="product_template_kanban_stock_view">
161 <field name="name">Product Template Kanban Stock</field>
162 <field name="model">product.template</field>
163 <field name="inherit_id" ref="product.product_template_kanban_view"/>
164 <field name="arch" type="xml">
165 <field name="lst_price" position="after">
168 <ul position="inside">
169 <li t-if="record.type.raw_value != 'service'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
170 <li t-if="record.type.raw_value != 'service'">Forecasted: <field name="virtual_available"/> <field name="uom_id"/></li>
175 <!-- Product Variant -->
177 <record id="product_search_form_view_stock" model="ir.ui.view">
178 <field name="name">product.search.stock.form</field>
179 <field name="model">product.product</field>
180 <field name="inherit_id" ref="product.product_search_form_view"/>
181 <field name="arch" type="xml">
182 <field name="pricelist_id" position="before">
183 <field name="location_id" widget="selection" context="{'location': self}"/>
184 <field name="warehouse_id" widget="selection" context="{'warehouse': self}"/>
189 <record model="ir.ui.view" id="product_kanban_stock_view">
190 <field name="name">Product Kanban Stock</field>
191 <field name="model">product.product</field>
192 <field name="inherit_id" ref="product.product_kanban_view"/>
193 <field name="arch" type="xml">
194 <field name="lst_price" position="after">
195 <field name="reception_count"/>
196 <field name="delivery_count"/>
198 <xpath expr="//div[@name='tags']" position="inside">
199 <a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value>1">
200 <t t-esc="record.reception_count.value"/> Receipts
202 <a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value==1">
203 <t t-esc="record.reception_count.value"/> Receipt
205 <a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value>1">
206 <t t-esc="record.delivery_count.value"/> Deliveries
208 <a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value==1">
209 <t t-esc="record.delivery_count.value"/> Delivery
215 <record model="ir.ui.view" id="product_form_view_procurement_button">
216 <field name="name">product.product.procurement</field>
217 <field name="model">product.product</field>
218 <field name="inherit_id" ref="product.product_normal_form_view"/>
219 <field name="arch" type="xml">
220 <xpath expr="//div[@name='buttons']" position="inside">
221 <button class="oe_stat_button"
222 name="%(product_open_quants)d"
224 type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations">
225 <div><field name="qty_available_text"/></div>
227 <button class="oe_inline oe_stat_button" string="Moves" name= "%(act_product_stock_move_open)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_stock_user" icon="fa-arrows-v"/>
228 <button class="oe_inline oe_stat_button" name="%(product_open_orderpoint)d" type="action"
229 attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-refresh" string="Reordering Rules"/>
230 <button class="oe_inline oe_stat_button" name="action_view_routes" string="Routes" type="object" icon="fa-cogs" attrs="{'invisible':[('type', '=', 'service')]}" />
235 <record model="ir.ui.view" id="product_template_form_view_procurement_button">
236 <field name="name">product.template_procurement</field>
237 <field name="model">product.template</field>
238 <field name="inherit_id" ref="product.product_template_only_form_view"/>
239 <field name="arch" type="xml">
240 <xpath expr="//div[@name='buttons']" position="inside">
241 <button class="oe_stat_button"
242 name="action_open_quants"
244 type="object" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations">
245 <div><field name="qty_available_text"/></div>
247 <button class="oe_inline oe_stat_button" string="Moves" name= "action_view_stock_moves" type="object" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_stock_user" icon="fa-arrows-v"/>
248 <button class="oe_inline oe_stat_button" name="action_view_orderpoints" type="object"
249 attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-refresh" string="Reordering Rules"/>
250 <button class="oe_inline oe_stat_button" name="action_view_routes" string="Routes" type="object" icon="fa-cogs" attrs="{'invisible':[('type', '=', 'service')]}" />