summaryrefslogtreecommitdiff
path: root/addons/stock/views
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/stock/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/stock/views')
-rw-r--r--addons/stock/views/product_strategy_views.xml100
-rw-r--r--addons/stock/views/product_views.xml421
-rw-r--r--addons/stock/views/report_stock_traceability.xml137
-rw-r--r--addons/stock/views/res_config_settings_views.xml394
-rw-r--r--addons/stock/views/res_partner_views.xml41
-rw-r--r--addons/stock/views/stock_inventory_views.xml258
-rw-r--r--addons/stock/views/stock_location_views.xml246
-rw-r--r--addons/stock/views/stock_menu_views.xml44
-rw-r--r--addons/stock/views/stock_move_line_views.xml143
-rw-r--r--addons/stock/views/stock_move_views.xml453
-rw-r--r--addons/stock/views/stock_orderpoint_views.xml245
-rw-r--r--addons/stock/views/stock_package_level_views.xml82
-rw-r--r--addons/stock/views/stock_picking_views.xml781
-rw-r--r--addons/stock/views/stock_production_lot_views.xml99
-rw-r--r--addons/stock/views/stock_quant_views.xml330
-rw-r--r--addons/stock/views/stock_rule_views.xml140
-rw-r--r--addons/stock/views/stock_scrap_views.xml195
-rw-r--r--addons/stock/views/stock_template.xml151
-rw-r--r--addons/stock/views/stock_warehouse_views.xml110
19 files changed, 4370 insertions, 0 deletions
diff --git a/addons/stock/views/product_strategy_views.xml b/addons/stock/views/product_strategy_views.xml
new file mode 100644
index 00000000..02fa6d0a
--- /dev/null
+++ b/addons/stock/views/product_strategy_views.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="stock_putaway_list" model="ir.ui.view">
+ <field name="name">stock.putaway.rule.tree</field>
+ <field name="model">stock.putaway.rule</field>
+ <field name="arch" type="xml">
+ <tree string="Putaway Rules" editable="bottom" sample='1'>
+ <field name="sequence" widget="handle"
+ invisible="context.get('invisible_handle', False)"/>
+ <field name="product_id"
+ attrs="{'readonly': [('category_id', '!=', False)], 'required': [('category_id', '=', False)]}"
+ options="{'no_create': True, 'no_open': True}"
+ readonly="context.get('single_product', False)"
+ force_save="1"/>
+ <field name="category_id"
+ attrs="{'readonly': [('product_id', '!=', False)], 'required': [('product_id', '=', False)]}"
+ options="{'no_create': True, 'no_open': True}"
+ readonly="context.get('fixed_category', False)"
+ force_save="1"/>
+ <field name="location_in_id"
+ options="{'no_create': True}"
+ readonly="context.get('fixed_location', False)"/>
+ <field name="location_out_id" attrs="{'readonly': [('location_in_id', '=', False)]}"
+ options="{'no_create': True}"/>
+ <field name="company_id" groups="stock.group_stock_multi_locations" force_save="1" readonly="context.get('fixed_location', False)" options="{'no_create': True}"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_removal" model="ir.ui.view">
+ <field name="name">product.removal.form</field>
+ <field name="model">product.removal</field>
+ <field name="arch" type="xml">
+ <form string="Removal">
+ <group col="4">
+ <field name="name"/>
+ <field name="method"/>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record id="action_putaway_tree" model="ir.actions.act_window">
+ <field name="name">Putaways Rules</field>
+ <field name="res_model">stock.putaway.rule</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="stock_putaway_list"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No putaway rule found. Let's create one!
+ </p><p>
+ Create new putaway rules to dispatch automatically specific products to their appropriate destination location upon receptions.
+ </p>
+ </field>
+ </record>
+
+ <record id="view_putaway_search" model="ir.ui.view">
+ <field name="name">stock.putaway.rule.search</field>
+ <field name="model">stock.putaway.rule</field>
+ <field name="arch" type="xml">
+ <search string="Putaway Rules">
+ <field name="product_id"/>
+ <field name="category_id"/>
+ <field name="location_in_id"/>
+ <field name="location_out_id"/>
+ <group expand='0' string='Filters'>
+ <filter name="filter_to_rules_on_product"
+ string="Rules on Products"
+ domain="[('product_id', '!=', False)]"/>
+ <filter name="filter_to_rules_on_category"
+ string="Rules on Categories"
+ domain="[('category_id' ,'!=', False)]"/>
+ </group>
+ <group expand="0" string="Group By">
+ <filter string="Location: When arrives to" name="location_in" context="{'group_by':'location_in_id'}"/>
+ <filter string="Location: Store to" name="location_out" context="{'group_by':'location_out_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="category_open_putaway"> <!-- Putaway rules from category -->
+ <field name="name">Putaway Rules</field>
+ <field name="res_model">stock.putaway.rule</field>
+ <field name="context">{
+ 'search_default_category_id': [active_id],
+ 'fixed_category': True,
+ }</field>
+ </record>
+ <record model="ir.actions.act_window" id="location_open_putaway"> <!-- Putaway rules from location -->
+ <field name="name">Putaway Rules</field>
+ <field name="res_model">stock.putaway.rule</field>
+ <field name="context">{'fixed_location': True}</field>
+ <field name="domain">['|', ('location_out_id', '=', active_id), ('location_in_id', '=', active_id)]</field>
+ </record>
+
+ <menuitem id="menu_putaway" name="Putaway Rules" parent="stock.menu_warehouse_config"
+ action="action_putaway_tree" sequence="5" groups="stock.group_stock_multi_locations"/>
+</odoo>
diff --git a/addons/stock/views/product_views.xml b/addons/stock/views/product_views.xml
new file mode 100644
index 00000000..443fdeae
--- /dev/null
+++ b/addons/stock/views/product_views.xml
@@ -0,0 +1,421 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="product_category_form_view_inherit" model="ir.ui.view">
+ <field name="name">product.category.form</field>
+ <field name="model">product.category</field>
+ <field name="inherit_id" ref="product.product_category_form_view" />
+ <field name="arch" type="xml">
+ <div name="button_box" position="inside">
+ <button string="Putaway Rules"
+ class="oe_stat_button"
+ icon="fa-random" name="%(category_open_putaway)d" type="action"
+ groups="stock.group_stock_multi_locations"/>
+ </div>
+ <group name="first" position="after">
+ <group string="Logistics">
+ <field name="route_ids" widget="many2many_tags" groups="stock.group_adv_location"/>
+ <field name="total_route_ids" widget="many2many_tags" groups="stock.group_adv_location" attrs="{'invisible': [('parent_id', '=', False)]}"/>
+ <field name="removal_strategy_id" options="{'no_create': True}"/>
+ </group>
+ </group>
+ </field>
+ </record>
+
+ <record model="ir.actions.server" id="action_open_routes">
+ <field name="name">Routes</field>
+ <field name="model_id" ref="product.model_product_template"/>
+ <field name="groups_id" eval="[(4,ref('stock.group_stock_user'))]"/>
+ <field name="state">code</field>
+ <field name="code">
+ action = model.action_open_routes_diagram()
+ </field>
+ </record>
+
+ <record id="view_stock_product_tree" model="ir.ui.view">
+ <field name="name">product.stock.tree.inherit</field>
+ <field name="model">product.product</field>
+ <field name="inherit_id" ref="product.product_product_tree_view"/>
+ <field name="arch" type="xml">
+ <field name="price" position="after">
+ <field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show" decoration-danger="virtual_available &lt; 0" decoration-warning="virtual_available == 0" decoration-bf="1"/>
+ <field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}" string="Forecasted Quantity" optional="show" decoration-danger="virtual_available &lt; 0" decoration-warning="virtual_available == 0"/>
+ </field>
+ </field>
+ </record>
+
+ <record id="view_stock_product_template_tree" model="ir.ui.view">
+ <field name="name">product.template.stock.tree.inherit</field>
+ <field name="model">product.template</field>
+ <field name="inherit_id" ref="product.product_template_tree_view"/>
+ <field name="arch" type="xml">
+ <field name="uom_id" position="before">
+ <field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show" decoration-danger="qty_available &lt; 0"/>
+ <field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show" decoration-danger="virtual_available &lt; 0" decoration-bf="1"/>
+ </field>
+ <field name="default_code" position="after">
+ <field name="responsible_id" widget="many2one_avatar_user"/>
+ </field>
+ </field>
+ </record>
+
+ <!-- Product Template -->
+
+ <record id="product_template_search_form_view_stock" model="ir.ui.view">
+ <field name="name">product.template.search.stock.form</field>
+ <field name="model">product.template</field>
+ <field name="mode">primary</field>
+ <field name="inherit_id" ref="product.product_template_search_view"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='pricelist_id']" position="after">
+ <separator/>
+ <field name="location_id" context="{'location': self}" filter_domain="[]"/>
+ <field name="warehouse_id" context="{'warehouse': self}" filter_domain="[]"/>
+ <separator/>
+ <filter name="real_stock_available" string="Available Products" domain="[('qty_available','&gt;',0)]"/>
+ <filter name="real_stock_negative" string="Negative Forecasted Quantity" domain="[('virtual_available','&lt;',0)]"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="stock_product_search_form_view" model="ir.ui.view">
+ <field name="name">product.product.search.stock.form</field>
+ <field name="model">product.product</field>
+ <field name="mode">primary</field>
+ <field name="inherit_id" ref="product.product_search_form_view"/>
+ <field name="arch" type="xml">
+ <xpath expr="//filter[@name='inactive']" position="after">
+ <separator/>
+ <filter name="real_stock_available" string="Available Products" domain="[('qty_available','&gt;',0)]"/>
+ <filter name="real_stock_negative" string="Negative Forecasted Quantity" domain="[('virtual_available','&lt;',0)]"/>
+ </xpath>
+ </field>
+ </record>
+
+ <!-- view common to both template and product -->
+ <record id="view_template_property_form" model="ir.ui.view">
+ <field name="name">product.template.stock.property.form.inherit</field>
+ <field name="model">product.template</field>
+ <field name="inherit_id" ref="product.product_template_form_view"/>
+ <field name="arch" type="xml">
+ <xpath expr="//group[@name='group_lots_and_weight']" position="inside">
+ <label for="sale_delay" attrs="{'invisible': [('sale_ok', '=', False)]}"/>
+ <div attrs="{'invisible': [('sale_ok', '=', False)]}">
+ <field name="sale_delay" class="oe_inline" style="vertical-align:baseline"/> days
+ </div>
+ </xpath>
+ <xpath expr="//group[@name='group_lots_and_weight']" position="before">
+ <field name="has_available_route_ids" invisible="1"/>
+ <group string="Operations" name="operations">
+ <label for="route_ids" attrs="{'invisible': [('type', 'in', ['service', 'digital'])]}"/>
+ <div>
+ <field name="route_ids" class="mb-0" widget="many2many_checkboxes" attrs="{'invisible': ['|', ('has_available_route_ids', '=', False), ('type', 'in', ['service', 'digital'])]}"/>
+ <button id="stock.view_diagram_button" string="View Diagram" type="action" name="%(action_open_routes)d" icon="fa-arrow-right"
+ attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
+ class="btn btn-link pt-0" context="{'default_product_tmpl_id': id}"/>
+ </div>
+ <field name="route_from_categ_ids" widget="many2many_tags" readonly="1" attrs="{'invisible': [('route_from_categ_ids', '=', [])]}"/>
+ </group>
+ </xpath>
+ <xpath expr="//group[@name='group_lots_and_weight']" position="after">
+ <group string="Traceability" name="traceability" groups="stock.group_production_lot"
+ attrs="{'invisible': [('type', '=', 'consu')]}">
+ <field name="tracking" widget="radio" attrs="{'invisible': [('type', 'in', ['service', 'digital'])]}"/>
+ </group>
+ <group string="Counterpart Locations" name="stock_property" groups="base.group_no_one">
+ <field name="property_stock_production"/>
+ <field name="property_stock_inventory"/>
+ </group>
+ </xpath>
+ <page name="inventory" position="inside">
+ <group string="Description for Delivery Orders">
+ <field name="description_pickingout" nolabel="1" placeholder="This note is added to delivery orders."/>
+ </group>
+ <group string="Description for Receipts">
+ <field name="description_pickingin" nolabel="1" placeholder="This note is added to receipt orders (e.g. where to store the product in the warehouse)."/>
+ </group>
+ <group string="Description for Internal Transfers" groups="stock.group_stock_multi_locations">
+ <field name="description_picking" placeholder="This note is added to internal transfer orders (e.g. where to pick the product in the warehouse)." nolabel="1"/>
+ </group>
+ </page>
+ <page name="inventory" position="attributes">
+ <attribute name="groups">stock.group_stock_user,product.group_stock_packaging</attribute>
+ </page>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="product_template_kanban_stock_view">
+ <field name="name">Product Template Kanban Stock</field>
+ <field name="model">product.template</field>
+ <field name="inherit_id" ref="product.product_template_kanban_view"/>
+ <field name="arch" type="xml">
+ <xpath expr="//kanban" position="inside">
+ <field name="type"/>
+ </xpath>
+ <xpath expr="//div[@name='product_lst_price']" position="after">
+ <div t-if="record.type.raw_value == 'product'">On hand: <field name="qty_available"/> <field name="uom_id"/></div>
+ </xpath>
+ </field>
+ </record>
+
+ <!-- Product Variant -->
+
+ <record id="product_search_form_view_stock" model="ir.ui.view">
+ <field name="name">product.search.stock.form</field>
+ <field name="model">product.product</field>
+ <field name="inherit_id" ref="product.product_search_form_view"/>
+ <field name="arch" type="xml">
+ <field name="pricelist_id" position="before">
+ <field name="location_id" options="{'no_create': True}" context="{'location': self}"/>
+ <field name="warehouse_id" context="{'warehouse': self}"/>
+ </field>
+ </field>
+ </record>
+
+ <record id="product_product_view_form_easy_inherit_stock" model="ir.ui.view">
+ <field name="name">product.product.view.form.easy.inherit.stock</field>
+ <field name="model">product.product</field>
+ <field name="inherit_id" ref="product.product_variant_easy_edit_view"/>
+ <field name="arch" type="xml">
+ <sheet position="before">
+ <header>
+ <button string="Update Quantity" type="object"
+ groups="stock.group_stock_manager"
+ name="action_update_quantity_on_hand"
+ attrs="{'invisible': [('type', '!=', 'product')]}"/>
+ <button string="Replenish" type="action"
+ name="%(action_product_replenish)d"
+ context="{'default_product_id': id}"
+ groups="stock.group_stock_user"
+ attrs="{'invisible': [('type', '!=', 'product')]}"/>
+ </header>
+ </sheet>
+ <div name="button_box" position="inside">
+ <button string="Putaway Rules" type="object"
+ name="action_view_related_putaway_rules"
+ class="oe_stat_button" icon="fa-random" groups="stock.group_stock_multi_locations"
+ attrs="{'invisible': [('type', '=', 'service')]}"
+ context="{'invisible_handle': True, 'single_product': True}"/>
+ </div>
+ </field>
+ </record>
+
+ <!-- view used for product.product only -->
+ <record model="ir.ui.view" id="product_form_view_procurement_button">
+ <field name="name">product.product.procurement</field>
+ <field name="model">product.product</field>
+ <field name="groups_id" eval="[(4, ref('stock.group_stock_user'))]"/>
+ <field name="inherit_id" ref="product.product_normal_form_view"/>
+ <field name="arch" type="xml">
+ <data>
+ <header position="inside">
+ <button string="Update Quantity" type="object"
+ groups="stock.group_stock_manager"
+ name="action_update_quantity_on_hand"
+ attrs="{'invisible': [('type', '!=', 'product')]}"/>
+ <button string="Replenish" type="action"
+ name="%(action_product_replenish)d"
+ context="{'default_product_id': id}"
+ groups="stock.group_stock_user"
+ attrs="{'invisible': [('type', '!=', 'product')]}"/>
+ </header>
+ <div name="button_box" position="inside">
+ <button class="oe_stat_button"
+ name="action_open_quants"
+ icon="fa-cubes"
+ type="object" attrs="{'invisible':[('type', '!=', 'product')]}">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value">
+ <field name="qty_available" widget="statinfo" nolabel="1" class="mr4"/>
+ <field name="uom_name"/>
+ </span>
+ <span class="o_stat_text">On Hand</span>
+ </div>
+ </button>
+ <button type="object"
+ name="action_product_forecast_report"
+ attrs="{'invisible':[('type', '!=', 'product')]}"
+ context="{'default_product_id': id}"
+ class="oe_stat_button" icon="fa-cubes">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value">
+ <field name="virtual_available" widget="statinfo" nolabel="1" class="mr4"/>
+ <field name="uom_name"/>
+ </span>
+ <span class="o_stat_text">Forecasted</span>
+ </div>
+ </button>
+ <button string="Product Moves"
+ type="object"
+ name= "action_view_stock_move_lines"
+ attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
+ class="oe_stat_button" icon="fa-exchange"
+ groups="stock.group_stock_user"/>
+ <button name="action_view_orderpoints" type="object"
+ attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']),('nbr_reordering_rules', '!=', 1)]}"
+ class="oe_stat_button" icon="fa-refresh">
+ <div class="o_field_widget o_stat_info mr4">
+ <span class="o_stat_text">Min :</span>
+ <span class="o_stat_text">Max:</span>
+ </div>
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value"><field name="reordering_min_qty"/></span>
+ <span class="o_stat_value"><field name="reordering_max_qty"/></span>
+ </div>
+ </button>
+ <button type="object"
+ name="action_view_orderpoints"
+ attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '==', 1)]}"
+ class="oe_stat_button" icon="fa-refresh">
+ <field name="nbr_reordering_rules" widget="statinfo"/>
+ </button>
+ <button string="Lot/Serial Numbers" type="object"
+ name="action_open_product_lot"
+ attrs="{'invisible': [('tracking', '=', 'none')]}"
+ class="oe_stat_button" icon="fa-bars" groups="stock.group_production_lot"/>
+ <button string="Putaway Rules" type="object"
+ name="action_view_related_putaway_rules"
+ class="oe_stat_button" icon="fa-random" groups="stock.group_stock_multi_locations"
+ attrs="{'invisible': [('type', '=', 'service')]}"
+ context="{'invisible_handle': True, 'single_product': True}"/>
+ </div>
+ <xpath expr="//button[@name='%(action_open_routes)d']" position="attributes">
+ <attribute name="context">
+ {'default_product_id': id}
+ </attribute>
+ </xpath>
+ </data>
+ </field>
+ </record>
+
+ <!-- view used for product.template only -->
+ <record model="ir.ui.view" id="product_template_form_view_procurement_button">
+ <field name="name">product.template_procurement</field>
+ <field name="model">product.template</field>
+ <field name="groups_id" eval="[(4, ref('stock.group_stock_user'))]"/>
+ <field name="inherit_id" ref="product.product_template_only_form_view"/>
+ <field name="arch" type="xml">
+ <data>
+ <header position="inside" >
+ <button string="Update Quantity" type="object"
+ groups="stock.group_stock_manager"
+ name="action_update_quantity_on_hand"
+ attrs="{'invisible': [('type', '!=', 'product')]}"/>
+ <button string="Replenish" type="action"
+ name="%(action_product_replenish)d"
+ context="{'default_product_tmpl_id': id}"
+ groups="stock.group_stock_user"
+ attrs="{'invisible': [('type', '!=', 'product')]}"/>
+ </header>
+ <div name="button_box" position="inside">
+ <button type="object"
+ name="action_open_quants"
+ attrs="{'invisible':[('type', '!=', 'product')]}"
+ class="oe_stat_button" icon="fa-cubes">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value" widget="statinfo">
+ <field name="qty_available" widget="statinfo" nolabel="1" class="mr4"/>
+ <field name="uom_name"/>
+ </span>
+ <span class="o_stat_text">On Hand</span>
+ </div>
+ </button>
+ <button type="object"
+ name="action_product_tmpl_forecast_report"
+ attrs="{'invisible':[('type', '!=', 'product')]}"
+ context="{'default_product_tmpl_id': id}"
+ class="oe_stat_button" icon="fa-cubes">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value">
+ <field name="virtual_available" widget="statinfo" nolabel="1" class="mr4"/>
+ <field name="uom_name"/>
+ </span>
+ <span class="o_stat_text">Forecasted</span>
+ </div>
+ </button>
+ <button string="Product Moves" type="object"
+ name= "action_view_stock_move_lines"
+ attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
+ class="oe_stat_button" icon="fa-exchange"
+ groups="stock.group_stock_user"/>
+ <button type="object"
+ name="action_view_orderpoints"
+ attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '!=', 1)]}"
+ class="oe_stat_button" icon="fa-refresh">
+ <div class="o_field_widget o_stat_info mr4">
+ <span class="o_stat_text">Min:</span>
+ <span class="o_stat_text">Max:</span>
+ </div>
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value"><field name="reordering_min_qty"/></span>
+ <span class="o_stat_value"><field name="reordering_max_qty"/></span>
+ </div>
+ </button>
+ <button type="object"
+ name="action_view_orderpoints"
+ attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '==', 1)]}"
+ class="oe_stat_button"
+ icon="fa-refresh">
+ <field name="nbr_reordering_rules" widget="statinfo"/>
+ </button>
+ <button string="Lot/Serial Numbers" type="object"
+ name="action_open_product_lot"
+ attrs="{'invisible': [('tracking', '=', 'none')]}"
+ class="oe_stat_button" icon="fa-bars" groups="stock.group_production_lot"/>
+ <button string="Putaway Rules" type="object"
+ name="action_view_related_putaway_rules"
+ class="oe_stat_button" icon="fa-random" groups="stock.group_stock_multi_locations"
+ attrs="{'invisible': [('type', '=', 'service')]}"
+ context="{
+ 'invisible_handle': True,
+ 'single_product': product_variant_count == 1,
+ }"/>
+ </div>
+
+ <!-- change attrs of fields added in view_template_property_form
+ to restrict the display for templates -->
+ <xpath expr="//group[@name='group_lots_and_weight']" position="attributes">
+ <attribute name="attrs">{'invisible': [('type', 'not in', ['product', 'consu'])]}</attribute>
+ </xpath>
+
+ <xpath expr="//label[@for='weight']" position="before">
+ <field name="responsible_id" domain="[('share', '=', False)]"/>
+ </xpath>
+ </data>
+ </field>
+ </record>
+
+ <record id="product_template_action_product" model="ir.actions.act_window">
+ <field name="name">Products</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">product.template</field>
+ <field name="view_mode">kanban,tree,form</field>
+ <field name="search_view_id" ref="product_template_search_form_view_stock"/>
+ <field name="context">{"search_default_consumable": 1, 'default_type': 'product'}</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No product found. Let's create one!
+ </p><p>
+ Track your stock quantities by creating storable products.
+ </p>
+ </field>
+ </record>
+
+ <record id="stock_product_normal_action" model="ir.actions.act_window">
+ <field name="name">Product Variants</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">product.product</field>
+ <field name="view_mode">tree,form,kanban</field>
+ <field name="search_view_id" ref="stock_product_search_form_view"/>
+ </record>
+
+ <menuitem id="menu_product_variant_config_stock" name="Products" action="product_template_action_product"
+ parent="stock.menu_stock_inventory_control" sequence="1"/>
+ <menuitem id="product_product_menu" name="Product Variants" action="stock_product_normal_action"
+ parent="menu_stock_inventory_control" sequence="2" groups="product.group_product_variant"/>
+ <menuitem id="menu_product_packagings" name="Product Packagings" parent="stock.menu_product_in_config_stock" action="product.action_packaging_view" groups="product.group_stock_packaging"/>
+ <menuitem id="menu_forecast_inventory" name="Forecasted Inventory" parent="stock.menu_warehouse_report" sequence="101" action="stock.report_stock_quantity_action"/>
+
+ </data>
+</odoo>
diff --git a/addons/stock/views/report_stock_traceability.xml b/addons/stock/views/report_stock_traceability.xml
new file mode 100644
index 00000000..f6181bcf
--- /dev/null
+++ b/addons/stock/views/report_stock_traceability.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <template id="report_mrp_line">
+ <t t-foreach="lines" t-as="a">
+ <t t-set="trclass" t-value="'o_stock_reports_default_style'"/>
+ <t t-if="a.get('model') == 'stock.move.line'"><t t-set="trclass" t-value="'o_stock_reports_level0'"/></t>
+ <t t-set="domainClass" t-value="'o_stock_reports_domain_line'"/>
+ <t t-if="a['unfoldable'] == false">
+ <t t-set="domainClass" t-value="'o_stock_reports_domain_line_1'"/>
+ </t>
+ <t t-set="column" t-value="0" />
+ <tr t-att-data-unfold="a['unfoldable']" t-att-data-parent_id="a['parent_id']" t-att-data-id="a['id']" t-att-data-model_id="a['model_id']" t-att-data-model="a['model']" t-att-data-lot_name="a['lot_name']" t-att-data-lot_id="a['lot_id']" t-att-class="trclass">
+ <t t-set="tdclass" t-value="''" />
+ <t t-set="spanclass" t-value="''" />
+ <t t-if="a.get('unfoldable')"><t t-set="tdclass" t-value="'o_stock_reports_unfoldable'" /></t>
+ <t t-if="not a.get('unfoldable')"><t t-set="spanclass" t-value="'o_stock_reports_nofoldable'" /></t>
+ <t t-set="column" t-value="0" />
+ <t t-foreach="a['columns']" t-as="c">
+ <t t-set="column" t-value="column + 1" />
+ <td t-att-data-id="a.get('id')" t-att-data-model="a['model']" t-att-data-model_id="a['model_id']" t-att-class="tdclass" t-att-data-level="a['level']">
+ <t t-if="column == 1">
+ <t t-if="a.get('unfoldable') and not a.get('is_used')">
+ <span t-att-data-id="a['id']" class="o_stock_reports_unfoldable o_stock_reports_caret_icon"><i class="fa fa-fw fa-caret-right" role="img" aria-label="Unfold" title="Unfold"></i></span>
+ </t>
+ <t t-if="a.get('is_used')">
+ <span role="img" class="o_stock_reports_stream" title="Traceability Report" aria-label="Traceability Report"><i class="fa fa-fw fa-level-up fa-rotate-270"></i></span>
+ </t>
+ </t>
+ <t t-if="a['reference'] == c">
+ <span t-if="c" t-att-class="spanclass">
+ <a t-att-data-active-id="a['res_id']" t-att-data-res-model="a['res_model']" class="o_stock_reports_web_action" href="#"><t t-esc="c" /></a>
+ </span>
+ </t>
+ <t t-elif="a['lot_name'] == c">
+ <span>
+ <a class="o_stock_report_lot_action" href="#"><t t-esc="c"/></a>
+ </span>
+ </t><t t-else="">
+ <t t-esc="c"/>
+ </t>
+ </td>
+ </t>
+ </tr>
+ </t>
+ </template>
+
+ <template id="report_stock_inventory">
+ <div class="container-fluid o_stock_reports_page o_stock_reports_no_print">
+ <span t-if="lines" class="o_report_heading text-left"><h1>Traceability Report</h1></span>
+ <span><t t-esc="context"/></span>
+ <div class="o_stock_reports_table table-responsive">
+ <t t-if="not lines">
+ <span class="text-center"><h1>No operation made on this lot.</h1></span>
+ </t>
+ <t t-if="lines">
+ <table class="table">
+ <thead>
+ <tr class="o_report_header">
+ <th class="o_report_line_header">Reference</th>
+ <th class="o_report_line_header">Product</th>
+ <th class="o_report_line_header">Date</th>
+ <th class="o_report_line_header">Lot/Serial #</th>
+ <th class="o_report_line_header">From</th>
+ <th class="o_report_line_header">To</th>
+ <th class="o_report_line_header">Quantity</th>
+ </tr>
+ </thead>
+ <tbody>
+ <t t-call="stock.report_mrp_line"/>
+ </tbody>
+ </table>
+ </t>
+ </div>
+ </div>
+ </template>
+
+ <template id="assets_stock_print_report" inherit_id="web.assets_common">
+ <xpath expr="." position="inside">
+ <link rel="stylesheet" type="text/scss" href="/stock/static/src/scss/stock_traceability_report.scss"/>
+ </xpath>
+ </template>
+
+ <template id="report_stock_inventory_print">
+ <t t-raw="'&lt;base href=%s&gt;' % base_url"/>
+ <t t-call="web.html_container">
+ <t t-call-assets="stock.assets_stock_print_report" t-js="False"/>
+ <t t-call='stock.report_stock_body_print'/>
+ </t>
+ </template>
+
+ <template id="report_stock_body_print">
+ <div class="container o_stock_reports_page o_stock_reports_no_print">
+ <span class="text-left"><h3>Traceability Report</h3></span>
+ <div class="o_stock_reports_table table-responsive">
+ <table class="table">
+ <thead>
+ <tr class="o_report_header">
+ <th class="o_report_line_header">Reference</th>
+ <th class="o_report_line_header">Product</th>
+ <th class="o_report_line_header">Date</th>
+ <th class="o_report_line_header">Lot/Serial #</th>
+ <th class="o_report_line_header">From</th>
+ <th class="o_report_line_header">To</th>
+ <th class="o_report_line_header">Quantity</th>
+ </tr>
+ </thead>
+ <tbody>
+ <t t-set="space_td" t-value="'margin-left: 0'"/>
+ <t t-foreach="lines" t-as="a">
+ <t t-set="space_td" t-value="'margin-left: '+ str(a['level']) + 'px;'"/>
+ <t t-set="trclass" t-value="'o_stock_reports_default_style'"/>
+ <t t-if="a.get('model') == 'stock.move.line'"><t t-set="trclass" t-value="'o_stock_reports_level0'"/></t>
+ <t t-set="column" t-value="0" />
+ <tr t-att-data-id="a['id']" t-att-data-model="a['model']" t-att-class="trclass">
+ <t t-set="tdclass" t-value="''" />
+ <t t-if="a.get('unfoldable')"><t t-set="tdclass" t-value="'o_stock_reports_unfoldable'" /></t>
+ <t t-set="column" t-value="0" />
+ <t t-foreach="a['columns']" t-as="c">
+ <t t-set="column" t-value="column + 1" />
+ <td>
+ <t t-if="column == 1">
+ <span t-att-style="space_td"></span>
+ </t>
+ <span>
+ <t t-esc="c" />
+ </span>
+ </td>
+ </t>
+ </tr>
+ </t>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </template>
+</odoo>
diff --git a/addons/stock/views/res_config_settings_views.xml b/addons/stock/views/res_config_settings_views.xml
new file mode 100644
index 00000000..1fcfdf87
--- /dev/null
+++ b/addons/stock/views/res_config_settings_views.xml
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <record id="res_config_settings_view_form" model="ir.ui.view">
+ <field name="name">res.config.settings.view.form.inherit.stock</field>
+ <field name="model">res.config.settings</field>
+ <field name="priority" eval="30"/>
+ <field name="inherit_id" ref="base.res_config_settings_view_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//div[hasclass('settings')]" position="inside" >
+ <div class="app_settings_block" data-string="Inventory" string="Inventory" data-key="stock" groups="stock.group_stock_manager">
+ <h2>Operations</h2>
+ <div class="row mt16 o_settings_container" name="operations_setting_container">
+ <div class="col-12 col-lg-6 o_setting_box"
+ id="product_packs_tracking"
+ title="Put your products in packs (e.g. parcels, boxes) and track them">
+ <div class="o_setting_left_pane">
+ <field name="group_stock_tracking_lot"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_stock_tracking_lot"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/products/usage.html#packages" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Put your products in packs (e.g. parcels, boxes) and track them
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="process_transfers">
+ <div class="o_setting_left_pane">
+ <field name="module_stock_picking_batch"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_stock_picking_batch"/>
+ <div class="text-muted">
+ Process transfers in batch per worker
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="warning_info">
+ <div class="o_setting_left_pane">
+ <field name="group_warning_stock"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_warning_stock" string="Warnings"/>
+ <div class="text-muted">
+ Get informative or blocking warnings on partners
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>Barcode</h2>
+ <div class="row mt16 o_settings_container" name="barcode_setting_container">
+ <div class="col-12 col-lg-6 o_setting_box" id="process_operations_barcodes">
+ <div class="o_setting_left_pane">
+ <field name="module_stock_barcode" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane" id="barcode_settings">
+ <label for="module_stock_barcode"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/barcode/setup/software.html" title="Documentation" class="mr-2 o_doc_link" target="_blank"></a>
+ <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
+ <div class="text-muted" name="stock_barcode">
+ Process operations faster with barcodes
+ </div>
+ <div class="content-group">
+ <div id="use_product_barcode"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>Shipping</h2>
+ <div class="row mt16 o_settings_container" name="shipping_setting_container">
+ <div class="col-12 col-lg-6 o_setting_box" id="stock_move_email">
+ <div class="o_setting_left_pane">
+ <field name="stock_move_email_validation"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="stock_move_email_validation" string="Email Confirmation"/>
+ <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
+ <div class="text-muted">
+ Send an automatic confirmation email when Delivery Orders are done
+ </div>
+ <div class="row mt16" attrs="{'invisible': [('stock_move_email_validation', '=', False)]}">
+ <label for="stock_mail_confirmation_template_id" string="Email Template" class="col-lg-4 o_light_label"/>
+ <field name="stock_mail_confirmation_template_id" class="oe_inline" attrs="{'required': [('stock_move_email_validation', '=', True)]}" context="{'default_model': 'stock.picking'}"/>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="stock_sms">
+ <div class="o_setting_left_pane">
+ <field name="module_stock_sms"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_stock_sms"/>
+ <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
+ <div class="text-muted">
+ Send an automatic confirmation SMS Text Message when Delivery Orders are done
+ </div>
+ <div class="content-group">
+ <div id="stock_confirmation_sms"/>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="signature_delivery_orders">
+ <div class="o_setting_left_pane">
+ <field name="group_stock_sign_delivery"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_stock_sign_delivery"/>
+ <div class="text-muted">
+ Require a signature on your delivery orders
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="delivery" title="Shipping connectors allow to compute accurate shipping costs, print shipping labels and request carrier picking at your warehouse to ship to the customer. Apply shipping connector from delivery methods.">
+ <div class="o_setting_left_pane">
+ <field name="module_delivery"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_delivery"/>
+ <div class="text-muted" id="delivery_carrier">
+ Compute shipping costs
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>Shipping Connectors</h2>
+ <div class="row mt16 o_settings_container" name="product_setting_container">
+ <div class="col-12 col-lg-6 o_setting_box" id="compute_shipping_costs_ups">
+ <div class="o_setting_left_pane">
+ <field name="module_delivery_ups" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_delivery_ups"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Compute shipping costs and ship with UPS
+ </div>
+ <div class="content-group">
+ <div id="stock_delivery_ups"/>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="compute_shipping_costs_dhl">
+ <div class="o_setting_left_pane">
+ <field name="module_delivery_dhl" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_delivery_dhl"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Compute shipping costs and ship with DHL
+ </div>
+ <div class="content-group">
+ <div id="stock_delivery_dhl"/>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="compute_shipping_costs_fedex">
+ <div class="o_setting_left_pane">
+ <field name="module_delivery_fedex" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_delivery_fedex"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Compute shipping costs and ship with FedEx
+ </div>
+ <div class="content-group">
+ <div id="stock_delivery_fedex"/>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="compute_shipping_costs_usps">
+ <div class="o_setting_left_pane">
+ <field name="module_delivery_usps" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_delivery_usps"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Compute shipping costs and ship with USPS
+ </div>
+ <div class="content-group">
+ <div id="stock_delivery_usps"/>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="compute_shipping_costs_bpost">
+ <div class="o_setting_left_pane">
+ <field name="module_delivery_bpost" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_delivery_bpost"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Compute shipping costs and ship with bpost
+ </div>
+ <div class="content-group">
+ <div id="stock_delivery_bpost"/>
+ </div>
+ </div>
+ </div>
+
+ <div class="col-12 col-lg-6 o_setting_box" id="compute_shipping_costs_easypost">
+ <div class="o_setting_left_pane">
+ <field name="module_delivery_easypost" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_delivery_easypost"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Compute shipping costs and ship with Easypost
+ </div>
+ <div class="content-group">
+ <div id="stock_delivery_easypost"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>Products</h2>
+ <div class="row mt16 o_settings_container" name="product_setting_container">
+ <div class="col-12 col-lg-6 o_setting_box" id="product_attributes">
+ <div class="o_setting_left_pane">
+ <field name="group_product_variant"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_product_variant"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/sales/sales/products_prices/products/variants.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Set product attributes (e.g. color, size) to manage variants
+ </div>
+ <div class="content-group">
+ <div class="mt8" attrs="{'invisible': [('group_product_variant', '=', False)]}">
+ <button name="%(product.attribute_action)d" icon="fa-arrow-right" type="action" string="Attributes" class="btn-link"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="sell_purchase_uom">
+ <div class="o_setting_left_pane">
+ <field name="group_uom"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_uom"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/products/uom.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Sell and purchase products in different units of measure
+ </div>
+ <div class="content-group">
+ <div class="mt8" attrs="{'invisible': [('group_uom', '=', False)]}">
+ <button name="%(uom.product_uom_form_action)d" icon="fa-arrow-right" type="action" string="Units Of Measure" class="btn-link"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box"
+ id="manage_product_packaging"
+ title="Manage product packagings (e.g. pack of 6 bottles, box of 10 pieces)">
+ <div class="o_setting_left_pane">
+ <field name="group_stock_packaging"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_stock_packaging"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/products/usage.html#packaging" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Manage product packagings (e.g. pack of 6 bottles, box of 10 pieces)
+ </div>
+ <div class="content-group">
+ <div class="mt8" attrs="{'invisible': [('group_stock_packaging', '=', False)]}">
+ <button name="%(product.action_packaging_view)d" icon="fa-arrow-right" type="action" string="Product Packagings" class="btn-link"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>Traceability</h2>
+ <div class="row mt16 o_settings_container" id="production_lot_info">
+ <div class="col-12 col-lg-6 o_setting_box" id="full_traceability">
+ <div class="o_setting_left_pane">
+ <field name="group_stock_production_lot"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_stock_production_lot"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/lots_serial_numbers/differences.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Get a full traceability from vendors to customers
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box"
+ id="expiration_dates_serial_numbers"
+ attrs="{'invisible': [('group_stock_production_lot', '=', False)]}"
+ title="Track following dates on lots &amp; serial numbers: best before, removal, end of life, alert. Such dates are set automatically at lot/serial number creation based on values set on the product (in days).">
+ <div class="o_setting_left_pane">
+ <field name="module_product_expiry"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_product_expiry"/>
+ <div class="text-muted">
+ Set expiration dates on lots &amp; serial numbers
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" attrs="{'invisible': [('group_stock_production_lot', '=', False)]}" id="group_lot_on_delivery_slip">
+ <div class="o_setting_left_pane">
+ <field name="group_lot_on_delivery_slip"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_lot_on_delivery_slip"/>
+ <div class="text-muted">
+ Lots &amp; Serial numbers will appear on the delivery slip
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box" id="owner_stored_products">
+ <div class="o_setting_left_pane">
+ <field name="group_stock_tracking_owner"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_stock_tracking_owner"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/misc/owned_stock.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Set owner on stored products
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2 class="mt32">Warehouse</h2>
+ <div class="row mt16 o_settings_container" name="warehouse_setting_container">
+ <div class="col-12 col-lg-6 o_setting_box"
+ id="track_product_location"
+ title="Store products in specific locations of your warehouse (e.g. bins, racks) and to track inventory accordingly.">
+ <div class="o_setting_left_pane">
+ <field name="group_stock_multi_locations"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_stock_multi_locations"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/warehouses/difference_warehouse_location.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Track product location in your warehouse
+ </div>
+ <div class="content-group">
+ <div class="mt8" attrs="{'invisible': [('group_stock_multi_locations', '=', False)]}">
+ <button name="%(stock.action_location_form)d" icon="fa-arrow-right" type="action" string="Locations" class="btn-link"/><br/>
+ <button name="stock.action_putaway_tree" icon="fa-arrow-right" type="action" string="Putaway Rules" class="btn-link"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box"
+ id="use_own_routes"
+ title="Add and customize route operations to process product moves in your warehouse(s): e.g. unload &gt; quality control &gt; stock for incoming products, pick &gt; pack &gt; ship for outgoing products. You can also set putaway strategies on warehouse locations in order to send incoming products into specific child locations straight away (e.g. specific bins, racks).">
+ <div class="o_setting_left_pane">
+ <field name="group_stock_adv_location"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="group_stock_adv_location"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/routes/concepts/use-routes.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Use your own routes
+ </div>
+ <div class="content-group">
+ <div class="mt8" attrs="{'invisible': [('group_stock_adv_location', '=', False)]}">
+ <button name="%(stock.action_warehouse_form)d" icon="fa-arrow-right" type="action" string="Set Warehouse Routes" class="btn-link"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2 id="schedule_info" invisible="1">Advanced Scheduling</h2>
+ <div class="row mt16 o_settings_container">
+ <div id="sale_security_lead"/>
+ <div id="purchase_po_lead"/>
+ </div>
+ </div>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="action_stock_config_settings" model="ir.actions.act_window">
+ <field name="name">Settings</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">res.config.settings</field>
+ <field name="view_mode">form</field>
+ <field name="target">inline</field>
+ <field name="context">{'module' : 'stock', 'bin_size': False}</field>
+ </record>
+
+ <menuitem id="menu_stock_config_settings" name="Configuration" parent="menu_stock_root"
+ sequence="100" groups="group_stock_manager"/>
+ <menuitem id="menu_stock_general_settings" name="Settings" parent="menu_stock_config_settings"
+ sequence="0" action="action_stock_config_settings" groups="base.group_system"/>
+ </data>
+</odoo>
diff --git a/addons/stock/views/res_partner_views.xml b/addons/stock/views/res_partner_views.xml
new file mode 100644
index 00000000..d8bb37eb
--- /dev/null
+++ b/addons/stock/views/res_partner_views.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <!--
+ Partners Extension
+ -->
+
+ <record id="view_partner_stock_form" model="ir.ui.view">
+ <field name="name">res.partner.stock.property.form.inherit</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="mail.res_partner_view_form_inherit_mail"/>
+ <field name="arch" type="xml">
+ <xpath expr="//page[@name='sales_purchases']/group" position="inside">
+ <group name="container_row_stock" groups="base.group_no_one" priority="6">
+ <group string="Inventory" name="inventory" colspan="2">
+ <field name="property_stock_customer" />
+ <field name="property_stock_supplier" />
+ </group>
+ </group>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="view_partner_stock_warnings_form" model="ir.ui.view">
+ <field name="name">res.partner.stock.warning</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="base.view_partner_form"/>
+ <field name="arch" type="xml">
+ <page name="internal_notes" position="inside">
+ <group colspan="2" col="2" groups="stock.group_warning_stock">
+ <separator string="Warning on the Picking" colspan="4"/>
+ <field name="picking_warn" nolabel="1" />
+ <field name="picking_warn_msg" colspan="3" nolabel="1"
+ attrs="{'required':[('picking_warn', '!=', False), ('picking_warn','!=','no-message')],'readonly':[('picking_warn','=','no-message')]}"/>
+ </group>
+ </page>
+ </field>
+ </record>
+
+ </data>
+</odoo>
diff --git a/addons/stock/views/stock_inventory_views.xml b/addons/stock/views/stock_inventory_views.xml
new file mode 100644
index 00000000..f4d9eda9
--- /dev/null
+++ b/addons/stock/views/stock_inventory_views.xml
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="stock_inventory_line_tree" model="ir.ui.view">
+ <field name="name">stock.inventory.line.tree</field>
+ <field name="model">stock.inventory.line</field>
+ <field name="arch" type="xml">
+ <tree default_order="location_id,product_id" editable="top" string="Inventory Details" js_class="inventory_validate_button"
+ decoration-danger="product_qty != theoretical_qty"
+ decoration-muted="product_qty == theoretical_qty"
+ decoration-bf="is_editable">
+ <field name="company_id" invisible="1"/>
+ <field name="product_tracking" invisible="1"/>
+ <field name="is_editable" invisible="1"/>
+ <field name="outdated" invisible="1"/>
+ <field name="product_id" width="1.6"
+ context="{'default_type': 'product'}"
+ readonly="context.get('default_product_id', False)"
+ attrs="{'readonly': ['|',
+ ('is_editable', '=', False),
+ ('state', '!=', 'confirm')]}"/>
+ <field name="location_id" groups="stock.group_stock_multi_locations"
+ options="{'no_create': True}"
+ invisible="context.get('readonly_location_id', False)"
+ readonly="context.get('readonly_location_id', False)"
+ attrs="{'readonly': ['|',
+ ('is_editable', '=', False),
+ ('state', '!=', 'confirm')]}"/>
+ <field name="inventory_date" optional="hide" width="0.8"/>
+ <field name="prod_lot_id" groups="stock.group_production_lot" width="0.8"
+ attrs="{'readonly': ['|', '|',
+ ('product_tracking', '=', 'none'),
+ ('is_editable', '=', False),
+ ('state', '!=', 'confirm')]}"
+ context="{'default_product_id': product_id, 'default_company_id': company_id}" optional="show"/>
+ <field name="package_id" groups="stock.group_tracking_lot" width="0.8"
+ attrs="{'readonly': ['|',
+ ('is_editable', '=', False),
+ ('state', '!=', 'confirm')]}"
+ string="Package" optional="show"/>
+ <field name="partner_id" groups="stock.group_tracking_owner"
+ attrs="{'readonly': ['|',
+ ('is_editable', '=', False),
+ ('state', '!=', 'confirm')]}"/>
+ <field name="theoretical_qty" string="On Hand" width="0.5"
+ force_save="1" readonly="1" optional="show"/>
+ <button name="action_refresh_quantity" title="Refresh quantity"
+ icon="fa-refresh" type="object"
+ attrs="{'invisible': [('outdated', '=', False)]}"/>
+ <field name="product_qty" width="0.5" string="Counted"/>
+ <field name="difference_qty" optional="show" width="0.5"/>
+ <field name="product_uom_id" string="UoM" groups="uom.group_uom"
+ width="0.3" force_save="1"/>
+ <field name="inventory_id" invisible="1"/>
+ <field name="state" invisible="1"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="stock_inventory_line_tree_no_product_create" model="ir.ui.view">
+ <field name="name">stock.inventory.line.tree2</field>
+ <field name="model">stock.inventory.line</field>
+ <field name="inherit_id" ref="stock.stock_inventory_line_tree"/>
+ <field name="mode">primary</field>
+ <field name="priority">1000</field>
+ <field name="arch" type="xml">
+ <field name="product_id" position="attributes"><attribute name="options">{'no_create': True}</attribute></field>
+ </field>
+ </record>
+
+ <record id="stock_inventory_line_search" model="ir.ui.view">
+ <field name="name">stock.inventory.line.search</field>
+ <field name="model">stock.inventory.line</field>
+ <field name="arch" type="xml">
+ <search string="Search Inventory Lines">
+ <field name="product_id"/>
+ <field name="location_id" groups="stock.group_stock_multi_locations"/>
+ <field name="prod_lot_id" groups="stock.group_production_lot"/>
+ <field name="package_id" groups="stock.group_tracking_lot"/>
+ <field name="partner_id" groups="stock.group_tracking_owner"/>
+ <filter string="Outdated Theoretical Quantities"
+ name="outdated" domain="[('outdated', '=', True)]"/>
+ <filter string="Difference different than zero"
+ name="difference" domain="[('difference_qty', '!=', '0')]"/>
+ <group expand='0' string='Group by...'>
+ <filter string='Location' name="location" domain="[]" context="{'group_by' : 'location_id'}"/>
+ <filter string='Packaging' name="packaging" domain="[]" context="{'group_by' : 'package_id'}"/>
+ <filter string='Product' name="product" domain="[]" context="{'group_by' : 'product_id'}"/>
+ <filter string='Product Category' name="product_category" domain="[]" context="{'group_by' : 'categ_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="view_inventory_filter" model="ir.ui.view">
+ <field name="name">stock.inventory.filter</field>
+ <field name="model">stock.inventory</field>
+ <field name="arch" type="xml">
+ <search string="Search Inventory">
+ <field name="name" string="Reference"/>
+ <field name="product_ids" string="Product" filter_domain="['|', ('product_ids', 'ilike', self), ('line_ids.product_id','ilike',self)]"/>
+ <filter string="Draft" name="draft" domain="[('state', '=', 'draft')]"/>
+ <filter string="In Progress" name="confirm" domain="[('state', '=', 'confirm')]"/>
+ <filter string="Validated" name="done" domain="[('state', '=', 'done')]"/>
+ <separator/>
+ <filter string="Inventory Date" name="inventory_date" date="date"/>
+ <group expand="0" string="Group By">
+ <filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/>
+ <filter string="Inventory Date" name="inventories_month" domain="[]" context="{'group_by': 'date'}" help="Physical Inventories by Date"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="view_inventory_tree" model="ir.ui.view">
+ <field name="name">stock.inventory.tree</field>
+ <field name="model">stock.inventory</field>
+ <field name="arch" type="xml">
+ <tree string="Lot/Serial Number Inventory" sample="1">
+ <field name="date"/>
+ <field name="name"/>
+ <field name="location_ids" widget="many2many_tags" optional="hide" groups="stock.group_stock_multi_locations"/>
+ <field name="product_ids" widget="many2many_tags" optional="hide"/>
+ <field name="company_id" groups="base.group_multi_company" optional="show"/>
+ <field name="state" widget="badge" decoration-success="state == 'done'" decoration-info="state in ('draft', 'confirm')"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_stock_inventory_kanban" model="ir.ui.view">
+ <field name="name">stock.inventory.kanban</field>
+ <field name="model">stock.inventory</field>
+ <field name="arch" type="xml">
+ <kanban class="o_kanban_mobile" sample="1">
+ <field name="name"/>
+ <field name="date"/>
+ <field name="state"/>
+ <templates>
+ <t t-name="kanban-box">
+ <div t-attf-class="oe_kanban_global_click">
+ <div class="o_kanban_record_top">
+ <div class="o_kanban_record_headings">
+ <strong class="o_kanban_record_title"><span><t t-esc="record.name.value"/></span></strong>
+ </div>
+ <field name="state" widget="label_selection" options="{'classes': {'draft': 'info', 'cancel': 'default', 'confirm': 'success', 'done': 'success'}}"/>
+ </div>
+ <div class="o_kanban_record_bottom">
+ <div class="oe_kanban_bottom_left">
+ </div>
+ <div class="oe_kanban_bottom_right">
+ <field name="date" widget="date"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record id="view_inventory_form" model="ir.ui.view">
+ <field name="name">stock.inventory.form</field>
+ <field name="model">stock.inventory</field>
+ <field name="arch" type="xml">
+ <form string="Inventory Adjustment">
+ <header>
+ <button name="action_start" states="draft" string="Start Inventory" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
+ <button name="action_open_inventory_lines" states="confirm" string="Continue Inventory" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
+ <button name="action_validate" string="Validate Inventory" type="object" attrs="{'invisible': ['|', ('state', '!=', 'confirm'), ('line_ids', '!=', [])]}" groups="stock.group_stock_manager"/>
+ <button name="action_validate" string="Validate Inventory" type="object" attrs="{'invisible': ['|', ('state', '!=', 'confirm'), ('line_ids', '=', [])]}" class="oe_highlight" groups="stock.group_stock_manager"/>
+ <button name="action_print" string="Print Count Sheet" type="object" attrs="{'invisible': [('state', '=', 'draft')]}" groups="stock.group_stock_user"/>
+ <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
+ <button name="action_cancel_draft" states="confirm" string="Cancel Inventory" type="object"
+ confirm="If you cancel this inventory adjustment, all its inventory adjustment lines will be lost. Are you sure you want to discard it ?"/>
+ <field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
+ </header>
+ <sheet>
+ <field name="line_ids" invisible="1"/>
+ <div class="oe_button_box" name="button_box">
+ <button string="Product Moves" type="object"
+ name="action_view_related_move_lines"
+ class="oe_stat_button" icon="fa-exchange"
+ attrs="{'invisible': [('state', '!=', 'done')]}"
+ context="{'no_reference': True}"/>
+ </div>
+ <div class="oe_title">
+ <label for="name" class="oe_edit_only"/>
+ <h1><field name="name" placeholder="e.g. Annual inventory"/></h1>
+ </div>
+ <group>
+ <group>
+ <field name="location_ids" options="{'no_create': True}"
+ widget="many2many_tags"
+ force_save="1"
+ groups="stock.group_stock_multi_locations"/>
+ <field name="product_ids"
+ context="{'default_type': 'product'}"
+ widget="many2many_tags"/>
+ <field name="exhausted"/>
+ </group>
+ <group>
+ <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
+ <field name="prefill_counted_quantity" widget="radio"
+ attrs="{'invisible': [('state', '!=', 'draft')]}"/>
+ </group>
+ </group>
+ </sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids" widget="mail_followers"/>
+ <field name="activity_ids" widget="mail_activity"/>
+ <field name="message_ids" widget="mail_thread"/>
+ </div>
+ </form>
+ </field>
+ </record>
+
+ <record id="action_inventory_form" model="ir.actions.act_window">
+ <field name="name">Inventory Adjustments</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">stock.inventory</field>
+ <field name="view_mode">tree,kanban,form</field>
+ <field name="view_id" ref="view_inventory_tree"/>
+ <field name="search_view_id" ref="view_inventory_filter"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_barcode_scanner">
+ Want to speed up your inventory counts? Try our Barcode app
+ </p><p>
+ Barcode scanner can be activated via inventory settings.
+ Manual inventory adjustments can also be performed and pre-filled with
+ suggested counted quantity.
+ </p>
+ </field>
+ </record>
+
+ <record id="model_stock_inventory_line_action_reset_product_qty" model="ir.actions.server">
+ <field name="name">Set counted quantities to 0</field>
+ <field name="model_id" ref="model_stock_inventory_line"/>
+ <field name="binding_model_id" ref="model_stock_inventory_line"/>
+ <field name="state">code</field>
+ <field name="code">
+if records:
+ action = records.action_reset_product_qty()
+ </field>
+ </record>
+
+ <record id="model_stock_inventory_line_action_recompute_quantity" model="ir.actions.server">
+ <field name="name">Recompute On Hand Quantity</field>
+ <field name="model_id" ref="model_stock_inventory_line"/>
+ <field name="binding_model_id" ref="model_stock_inventory_line"/>
+ <field name="state">code</field>
+ <field name="code">
+if records:
+ action = records.action_refresh_quantity()
+ </field>
+ </record>
+
+ <menuitem action="action_inventory_form" id="menu_action_inventory_form" parent="menu_stock_warehouse_mgmt" sequence="30"/>
+</odoo>
diff --git a/addons/stock/views/stock_location_views.xml b/addons/stock/views/stock_location_views.xml
new file mode 100644
index 00000000..0c01cdb1
--- /dev/null
+++ b/addons/stock/views/stock_location_views.xml
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="act_product_location_open" model="ir.actions.act_window">
+ <field name="name">Products</field>
+ <field name="res_model">product.product</field>
+ <field name="context">{'location': active_id, 'search_default_real_stock_available': 1, 'search_default_virtual_stock_available': 1,
+ 'search_default_virtual_stock_negative': 1, 'search_default_real_stock_negative': 1, 'create': False}</field>
+ <field name="binding_model_id" ref="model_stock_location"/>
+ <field name="binding_view_types">form</field>
+ <field name="search_view_id" ref="stock.stock_product_search_form_view"/>
+ </record>
+
+ <record id="view_location_form" model="ir.ui.view">
+ <field name="name">stock.location.form</field>
+ <field name="model">stock.location</field>
+ <field name="arch" type="xml">
+ <form string="Stock Location" create="false">
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ <button string="Putaway Rules"
+ class="oe_stat_button"
+ icon="fa-random" name="%(location_open_putaway)d" type="action"
+ groups="stock.group_stock_multi_locations" context="{'default_company_id': company_id}"/>
+ <button string="Current Stock"
+ class="oe_stat_button"
+ icon="fa-cubes" name="%(location_open_quants)d" type="action"/>
+ </div>
+ <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
+ <label for="name" class="oe_edit_only"/>
+ <h1><field name="name"/></h1>
+ <label for="location_id" class="oe_edit_only"/>
+ <h2><field name="location_id" options="{'no_create': True}"/></h2>
+
+ <group>
+ <group string="Additional Information" name="additional_info">
+ <field name="active" invisible="1"/>
+ <field name="usage"/>
+ <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
+ <field name="scrap_location" attrs="{'invisible': [('usage', 'not in', ('inventory', 'internal'))]}"/>
+ <field name="return_location"/>
+ </group>
+ <group string="Logistics" groups="stock.group_adv_location">
+ <field name="removal_strategy_id" options="{'no_create': True}"/>
+ </group>
+ </group>
+ <field name="comment" placeholder="External note..."/>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="stock_location_view_form_editable" model="ir.ui.view">
+ <field name="name">stock.location.form.editable</field>
+ <field name="model">stock.location</field>
+ <field name="inherit_id" ref="stock.view_location_form"/>
+ <field name="groups_id" eval="[(4, ref('stock.group_stock_multi_locations'))]"/>
+ <field name="arch" type="xml">
+ <xpath expr="//form" position="attributes">
+ <attribute name="create">true</attribute>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="view_location_search" model="ir.ui.view">
+ <field name="name">stock.location.search</field>
+ <field name="model">stock.location</field>
+ <field name="arch" type="xml">
+ <search string="Stock Locations">
+ <field name="complete_name" string="Stock Locations"/>
+ <filter name="in_location" string="Internal" domain="[('usage', '=', 'internal')]" help="Internal Locations"/>
+ <filter name="customer" string="Customer" domain="[('usage', '=', 'customer')]" help="Customer Locations"/>
+ <filter name="prod_inv_location" string="Production" domain="[('usage', 'in', ['inventory', 'production'])]" help="Production Locations"/>
+ <filter name="supplier" string="Vendor" domain="[('usage', '=', 'supplier')]" help="Vendor Locations"/>
+ <field name="location_id" string="Parent Location"/>
+ <separator/>
+ <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
+ </search>
+ </field>
+ </record>
+
+ <record id="view_location_tree2" model="ir.ui.view">
+ <field name="name">stock.location.tree</field>
+ <field name="model">stock.location</field>
+ <field name="priority" eval="2"/>
+ <field name="arch" type="xml">
+ <tree string="Stock Location" decoration-info="usage=='view'" decoration-danger="usage=='internal'" create="false">
+ <field name="active" invisible="1"/>
+ <field name="complete_name" string="Location"/>
+ <field name="usage"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="stock_location_view_tree2_editable" model="ir.ui.view">
+ <field name="name">stock.location.tree2.editable</field>
+ <field name="model">stock.location</field>
+ <field name="inherit_id" ref="stock.view_location_tree2"/>
+ <field name="groups_id" eval="[(4, ref('stock.group_stock_multi_locations'))]"/>
+ <field name="arch" type="xml">
+ <xpath expr="//tree" position="attributes">
+ <attribute name="create">true</attribute>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="action_location_form" model="ir.actions.act_window">
+ <field name="name">Locations</field>
+ <field name="res_model">stock.location</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_location_tree2"/>
+ <field name="search_view_id" ref="view_location_search"/>
+ <field name="context">{'search_default_in_location':1}</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Add a new location
+ </p><p>
+ Define your locations to reflect your warehouse structure and
+ organization. Odoo is able to manage physical locations
+ (warehouses, shelves, bin, etc), partner locations (customers,
+ vendors) and virtual locations which are the counterpart of
+ the stock operations like the manufacturing orders
+ consumptions, inventories, etc.
+ </p><p>
+ Every stock operation in Odoo moves the products from one
+ location to another one. For instance, if you receive products
+ from a vendor, Odoo will move products from the Vendor
+ location to the Stock location. Each report can be performed on
+ physical, partner or virtual locations.
+ </p>
+ </field>
+ </record>
+ <record id="action_prod_inv_location_form" model="ir.actions.act_window">
+ <field name="name">Locations</field>
+ <field name="res_model">stock.location</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_location_tree2"/>
+ <field name="search_view_id" ref="view_location_search"/>
+ <field name="context">{'search_default_prod_inv_location': 1}</field>
+ </record>
+
+ <menuitem action="action_location_form" id="menu_action_location_form"
+ parent="menu_warehouse_config" sequence="2" groups="stock.group_stock_multi_locations"/>
+
+ <!--Routes-->
+ <record id="stock_location_route_tree" model="ir.ui.view">
+ <field name="name">stock.location.route.tree</field>
+ <field name="model">stock.location.route</field>
+ <field name="arch" type="xml">
+ <tree string="Routes">
+ <field name="sequence" widget="handle" />
+ <field name="name"/>
+ <field name="active" invisible="1"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="stock_location_route_form_view" model="ir.ui.view">
+ <field name="name">stock.location.route.form</field>
+ <field name="model">stock.location.route</field>
+ <field eval="7" name="priority" />
+ <field name="arch" type="xml">
+ <form string="Route">
+ <sheet>
+ <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
+ <div class="oe_title">
+ <label for="name" class="oe_edit_only"/>
+ <h1><field name="name"/></h1>
+ </div>
+ <group>
+ <group>
+ <field name="sequence" string="Sequence" groups="base.group_no_one"/>
+ <field name="active" invisible="1"/>
+ <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
+ </group>
+ </group>
+ <separator string="Applicable On"/>
+ <p class="oe_grey">Select the places where this route can be selected</p>
+ <group>
+ <group>
+ <label for="product_categ_selectable" string="Product Categories"/>
+ <div>
+ <field name="product_categ_selectable" class="oe_inline"/>
+ </div>
+ <label for="product_selectable" string="Products"/>
+ <div>
+ <field name="product_selectable" class="oe_inline"/>
+ </div>
+ </group>
+ <group>
+ <field name="warehouse_selectable" string="Warehouses"/>
+ <field name="warehouse_domain_ids" invisible="1"/>
+ <field name="warehouse_ids" widget="many2many_tags" nolabel="1"
+ attrs="{'invisible': [('warehouse_selectable', '=', False)]}"/>
+ </group>
+ </group>
+ <group string="Rules" colspan="4" >
+ <field name="rule_ids" colspan="4" nolabel="1" context="{'default_company_id': company_id, 'form_view_ref':'stock.view_route_rule_form'}">
+ <tree>
+ <field name="sequence" widget="handle"/>
+ <field name="action"/>
+ <field name="location_src_id" options="{'no_create': True}"/>
+ <field name="location_id" options="{'no_create': True}"/>
+ </tree>
+ </field>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="stock_location_route_view_search" model="ir.ui.view">
+ <field name="name">stock.location.route.search</field>
+ <field name="model">stock.location.route</field>
+ <field name="arch" type="xml">
+ <search string="Route">
+ <field name="name"/>
+ <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
+ </search>
+ </field>
+ </record>
+
+ <record id="action_routes_form" model="ir.actions.act_window">
+ <field name="name">Routes</field>
+ <field name="res_model">stock.location.route</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="stock_location_route_tree" />
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Add a new route
+ </p><p>
+ You can define here the main routes that run through
+ your warehouses and that define the flows of your products. These
+ routes can be assigned to a product, a product category or be fixed
+ on procurement or sales order.
+ </p>
+ </field>
+ </record>
+
+ <menuitem id="menu_routes_config" action="action_routes_form" name="Routes" parent="menu_warehouse_config" sequence="3" groups="stock.group_adv_location"/>
+
+</odoo>
diff --git a/addons/stock/views/stock_menu_views.xml b/addons/stock/views/stock_menu_views.xml
new file mode 100644
index 00000000..6da09922
--- /dev/null
+++ b/addons/stock/views/stock_menu_views.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <menuitem name="Inventory" id="menu_stock_root" sequence="30"
+ groups="group_stock_manager,group_stock_user"
+ web_icon="stock,static/description/icon.png"/>
+
+ <menuitem id="menu_stock_warehouse_mgmt" name="Operations" parent="menu_stock_root" sequence="2"/>
+
+ <menuitem id="menu_stock_config_settings" name="Configuration" parent="menu_stock_root"
+ sequence="100" groups="group_stock_manager"/>
+ <menuitem id="menu_warehouse_config" name="Warehouse Management" parent="menu_stock_config_settings" groups="stock.group_stock_manager" sequence="1"/>
+
+
+ <menuitem id="menu_product_in_config_stock" name="Products" parent="stock.menu_stock_config_settings" sequence="4"/>
+
+ <menuitem id="menu_wms_barcode_nomenclature_all" parent="menu_product_in_config_stock" action="barcodes.action_barcode_nomenclature_form"
+ sequence="50" groups="base.group_no_one"/>
+
+ <menuitem id="product_uom_menu" name="Units of Measures" parent="menu_stock_config_settings"
+ sequence="5" groups="uom.group_uom"/>
+
+ <menuitem
+ action="product.product_category_action_form" id="menu_product_category_config_stock"
+ parent="stock.menu_product_in_config_stock" sequence="2"/>
+ <menuitem
+ action="product.attribute_action" id="menu_attribute_action"
+ parent="stock.menu_product_in_config_stock" sequence="4" groups="product.group_product_variant"/>
+
+ <menuitem
+ action="uom.product_uom_categ_form_action" id="menu_stock_uom_categ_form_action"
+ name="UoM Categories"
+ parent="product_uom_menu" sequence="5"/>
+ <menuitem
+ id="menu_stock_unit_measure_stock" name="Units of Measure"
+ parent="stock.menu_product_in_config_stock" sequence="35" groups="uom.group_uom"/>
+
+ <menuitem id="menu_stock_uom_form_action" action="uom.product_uom_form_action"
+ name="UoM"
+ parent="product_uom_menu" sequence="35"/>
+
+ <menuitem id="menu_stock_inventory_control" name="Products" parent="menu_stock_root" sequence="4"/>
+
+ <menuitem id="stock.menu_warehouse_report" name="Reporting" sequence="99" parent="stock.menu_stock_root" groups="group_stock_manager"/>
+</odoo>
diff --git a/addons/stock/views/stock_move_line_views.xml b/addons/stock/views/stock_move_line_views.xml
new file mode 100644
index 00000000..83711593
--- /dev/null
+++ b/addons/stock/views/stock_move_line_views.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="view_move_line_tree" model="ir.ui.view">
+ <field name="name">stock.move.line.tree</field>
+ <field name="model">stock.move.line</field>
+ <field name="arch" type="xml">
+ <tree string="Move Lines" create="0" default_order="date">
+ <field name="date"/>
+ <field name="reference" string="Reference"
+ invisible="context.get('no_reference', False)"/>
+ <field name="product_id"/>
+ <field name="lot_id" groups="stock.group_production_lot"/>
+ <field name="location_id"/>
+ <field name="location_dest_id"/>
+ <field name="qty_done" string="Quantity Done"/>
+ <field name="product_uom_id" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ <field name="company_id" groups="base.group_multi_company" force_save="1"/>
+ <field name="state" widget='badge' decoration-success="state == 'done'" decoration-info="state not in ('done', 'cancel')"/>
+ </tree>
+ </field>
+ </record>
+ <record id="view_move_line_form" model="ir.ui.view">
+ <field name="name">stock.move.line.form</field>
+ <field name="model">stock.move.line</field>
+ <field name="arch" type="xml">
+ <form string="Move Lines" create="0" edit="0">
+ <header>
+ <field name="state" widget="statusbar"/>
+ </header>
+ <sheet>
+ <field name="company_id" invisible="1"/>
+ <field name="picking_id" invisible="1"/>
+ <field name="product_uom_category_id" invisible="1"/>
+ <group>
+ <group>
+ <field name="date"/>
+ <field name="reference" string="Reference"/>
+ <field name="origin"/>
+ <field name="product_id"/>
+ <field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
+ <field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
+ </group>
+ <group>
+ <label for="product_uom_qty" string="Quantity Reserved" attrs="{'invisible': [('state', '=', 'done')]}"/>
+ <div class="o_row" attrs="{'invisible': [('state', '=', 'done')]}">
+ <field name="product_uom_qty" readonly="1"/>
+ <field name="product_uom_id" options="{'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ </div>
+ <label for="qty_done" string="Quantity Done"/>
+ <div class="o_row">
+ <field name="qty_done"/>
+ <field name="product_uom_id" options="{'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ </div>
+ <field name="lot_id" groups="stock.group_production_lot" context="{'default_product_id': product_id, 'active_picking_id': picking_id, 'default_company_id': company_id}" attrs="{'invisible': [('lot_id', '=', False),('lot_name', '!=', False)]}"/>
+ <field name="lot_name" groups="stock.group_production_lot" attrs="{'invisible': ['|',('lot_id', '!=', False),('lot_name', '=', False)]}"/>
+ <field name="package_id" string="Source Package" groups="product.group_stock_packaging"/>
+ <field name="result_package_id" string="Destination Package" groups="stock.group_tracking_lot"/>
+ <field name="owner_id" string="Owner" groups="stock.group_tracking_owner"/>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="stock_move_line_view_search" model="ir.ui.view">
+ <field name="name">stock.move.line.search</field>
+ <field name="model">stock.move.line</field>
+ <field name="arch" type="xml">
+ <search string="Stock Moves">
+ <field name="picking_id" string="Transfer"/>
+ <field name="reference" string="Reference"/>
+ <field name="product_id"/>
+ <field name="location_id" string="Source Location" groups="stock.group_stock_multi_locations"/>
+ <field name="location_dest_id" string="Destination Location" groups="stock.group_stock_multi_locations"/>
+ <separator/>
+ <filter string="To Do" name="todo" domain="[('state', 'not in', ['done', 'draft'])]"/>
+ <filter string="Done" name="done" domain="[('state', '=', 'done')]"/>
+ <separator/>
+ <filter string="Incoming" name="incoming" domain="[('picking_id.picking_type_id.code', '=', 'incoming')]"/>
+ <filter string="Outgoing" name="outgoing" domain="[('picking_id.picking_type_id.code', '=', 'outgoing')]"/>
+ <filter string="Internal" name="internal" domain="[('picking_id.picking_type_id.code', '=', 'internal')]"/>
+ <filter string="Manufacturing" name="manufacturing" domain="[('picking_id.picking_type_id.code', '=', 'mrp_operation')]"/>
+ <separator/>
+ <group expand="0" string="Group By">
+ <filter string="Product" name="groupby_product_id" domain="[]" context="{'group_by': 'product_id'}"/>
+ <filter string="Status" name="by_state" domain="[]" context="{'group_by': 'state'}"/>
+ <filter string="Date" name="by_date" domain="[]" context="{'group_by': 'date'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="view_stock_move_line_kanban" model="ir.ui.view">
+ <field name="name">stock.move.line.kanban</field>
+ <field name="model">stock.move.line</field>
+ <field name="arch" type="xml">
+ <kanban class="o_kanban_mobile">
+ <templates>
+ <t t-name="kanban-box">
+ <div t-attf-class="oe_kanban_card oe_kanban_global_click">
+ <strong><field name="product_id"/></strong>
+ <field name="picking_id"/>
+ <div class="row">
+ <div class="col-6">
+ <field name="lot_id" invisible="not context.get('show_lots_m2o')" groups="stock.group_production_lot" context="{'default_product_id': product_id, 'active_picking_id': picking_id}"/>
+ <field name="lot_name" invisible="not context.get('show_lots_text')" groups="stock.group_production_lot"/>
+ <field name="qty_done" string="Quantity Done"/>
+ <field name="product_uom_id" string="Unit of Measure" groups="uom.group_uom"/>
+ </div>
+ <div class="col-6 text-right">
+ <field name="date"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record id="stock_move_line_action" model="ir.actions.act_window">
+ <field name="name">Product Moves</field>
+ <field name="res_model">stock.move.line</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,pivot,form</field>
+ <field name="view_id" ref="view_move_line_tree"/>
+ <field name="context">{'search_default_done': 1, 'search_default_groupby_product_id': 1, 'create': 0}</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_empty_folder">
+ There's no product move yet
+ </p><p>
+ This menu gives you the full traceability of inventory operations on a specific product.
+ You can filter on the product to see all the past movements for the product.
+ </p>
+ </field>
+ </record>
+
+ <menuitem
+ action="stock_move_line_action"
+ id="stock_move_line_menu"
+ parent="stock.menu_warehouse_report" sequence="150"/>
+</odoo>
diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml
new file mode 100644
index 00000000..e85a6f37
--- /dev/null
+++ b/addons/stock/views/stock_move_views.xml
@@ -0,0 +1,453 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="view_move_pivot" model="ir.ui.view">
+ <field name="name">stock.move.pivot</field>
+ <field name="model">stock.move</field>
+ <field name="arch" type="xml">
+ <pivot string="Stock Moves Analysis" sample="1">
+ <field name="product_id" type="row"/>
+ <field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>
+ <field name="product_uom_qty" type="measure"/>
+ </pivot>
+ </field>
+ </record>
+
+ <record id="view_move_graph" model="ir.ui.view">
+ <field name="name">stock.move.graph</field>
+ <field name="model">stock.move</field>
+ <field name="arch" type="xml">
+ <graph string="Stock Moves Analysis" sample="1">
+ <field name="product_id"/>
+ <field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>
+ <field name="product_uom_qty" type="measure"/>
+ </graph>
+ </field>
+ </record>
+
+ <record id="view_move_tree" model="ir.ui.view">
+ <field name="name">stock.move.tree</field>
+ <field name="model">stock.move</field>
+ <field eval="8" name="priority"/>
+ <field name="arch" type="xml">
+ <tree string="Moves" create="0">
+ <field name="date" groups="base.group_no_one" decoration-danger="(state not in ('cancel','done')) and date > current_date" />
+ <field name="reference"/>
+ <field name="picking_type_id" invisible="1"/>
+ <field name="create_date" invisible="1" groups="base.group_no_one"/>
+ <field name="product_id"/>
+ <field name="location_id" options="{'no_create': True}" string="From"/>
+ <field name="location_dest_id" options="{'no_create': True}" string="To"/>
+ <field name="product_uom_qty"/>
+ <field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ <field name="state" widget='badge' decoration-success="state == 'done'" decoration-info="state not in ('done', 'cancel')"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_picking_move_tree" model="ir.ui.view">
+ <field name="name">stock.picking.move.tree</field>
+ <field name="model">stock.move</field>
+ <field eval="50" name="priority"/>
+ <field name="arch" type="xml">
+ <tree decoration-danger="state != 'done' and quantity_done > reserved_availability and show_reserved_availability" decoration-muted="scrapped == True or state == 'cancel' or (state == 'done' and is_locked == True)" string="Stock Moves" editable="bottom">
+ <field name="company_id" invisible="1"/>
+ <field name="name" invisible="1"/>
+ <field name="date" invisible="1"/>
+ <field name="state" invisible="1" readonly="0"/>
+ <field name="picking_type_id" invisible="1"/>
+ <field name="location_id" invisible="1"/>
+ <field name="location_dest_id" invisible="1"/>
+ <field name="scrapped" invisible="1"/>
+ <field name="picking_code" invisible="1"/>
+ <field name="product_type" invisible="1"/>
+ <field name="show_details_visible" invisible="1"/>
+ <field name="show_reserved_availability" invisible="1"/>
+ <field name="show_operations" invisible="1" readonly="1"/>
+ <field name="additional" invisible="1"/>
+ <field name="has_move_lines" invisible="1"/>
+ <field name="is_locked" invisible="1"/>
+ <field name="product_uom_category_id" invisible="1"/>
+ <field name="product_id" required="1" attrs="{'readonly': ['|', '&amp;', ('state', '!=', 'draft'), ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
+ <field name="is_initial_demand_editable" invisible="1"/>
+ <field name="is_quantity_done_editable" invisible="1"/>
+ <field name="product_uom_qty" string="Demand" attrs="{'readonly': [('is_initial_demand_editable', '=', False)]}"/>
+ <field name="reserved_availability" string="Reserved"/>
+ <field name="quantity_done" string="Done" attrs="{'readonly': [('is_quantity_done_editable', '=', False)]}"/>
+ <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft'), ('additional', '=', False)]}" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_move_kandan" model="ir.ui.view">
+ <field name="name">stock.move.kanban</field>
+ <field name="model">stock.move</field>
+ <field name="priority">10</field>
+ <field name="arch" type="xml">
+ <kanban class="o_kanban_mobile">
+ <field name="product_id"/>
+ <field name="show_details_visible"/>
+ <field name="product_uom_qty"/>
+ <field name="quantity_done"/>
+ <field name="reserved_availability"/>
+ <field name="inventory_id"/>
+ <field name="state"/>
+ <field name="name"/>
+ <field name="product_uom"/>
+ <field name="location_id"/>
+ <field name="location_dest_id"/>
+ <templates>
+ <t t-name="kanban-box">
+ <div t-attf-class="oe_kanban_global_click">
+ <div class="o_kanban_record_top">
+ <div class="o_kanban_record_headings">
+ <strong class="o_kanban_record_title"><span><field name="product_id"/></span></strong>
+ </div>
+ <button name="action_show_details" string="Register lots, packs, location"
+ class="o_icon_button fa fa-list" type="object"
+ attrs="{'invisible': [('show_details_visible', '=', False)]}" options='{"warn": true}'/>
+ </div>
+ <div class="o_kanban_record_body">
+ <div attrs="{'invisible': [('inventory_id', '=', False)]}">
+ <span>Initial Demand <field name="product_uom_qty"/></span><br/>
+ <span>Quantity Done <field name="quantity_done"/></span>
+ </div>
+ <div attrs="{'invisible': [('inventory_id', '!=', False)]}">
+ <span>Quantity Done <field name="quantity_done"/>/<field name="reserved_availability"/></span>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record id="view_stock_move_operations" model="ir.ui.view">
+ <field name="name">stock.move.operations.form</field>
+ <field name="model">stock.move</field>
+ <field name="priority">1000</field>
+ <field name="arch" type="xml">
+ <form string="Move Detail">
+ <field name="sequence" invisible="1"/>
+ <field name="company_id" invisible="1"/>
+ <field name="state" invisible="1"/>
+ <field name="location_id" invisible="1"/>
+ <field name="location_dest_id" invisible="1"/>
+ <field name="picking_id" invisible="1"/>
+ <field name="is_locked" invisible="1"/>
+ <field name="picking_type_entire_packs" invisible="1"/>
+ <field name="display_assign_serial" invisible="1"/>
+ <group>
+ <group>
+ <field name="product_id" readonly="1"/>
+ <label for="product_uom_qty"/>
+ <div class="o_row">
+ <span><field name="product_uom_qty" readonly="1" nolabel="1"/></span>
+ <span><field name="product_uom" readonly="1" nolabel="1"/></span>
+ </div>
+ <label for="quantity_done"/>
+ <div class="o_row">
+ <span><field name="quantity_done" readonly="1" nolabel="1"/></span>
+ <span attrs="{'invisible': [('state', '=', 'done')]}"> / </span>
+ <span><field name="reserved_availability" nolabel="1" attrs="{'invisible': [('state', '=', 'done')]}" /></span>
+ <span><field name="product_uom" readonly="1" nolabel="1"/></span>
+ </div>
+ <field name="next_serial"
+ attrs="{'invisible': [('display_assign_serial', '=', False)]}"/>
+ <label for="next_serial_count" attrs="{'invisible': [('display_assign_serial', '=', False)]}"/>
+ <div class="o_row" attrs="{'invisible': [('display_assign_serial', '=', False)]}">
+ <span><field name="next_serial_count"/></span>
+ <button name="action_assign_serial_show_details" type="object"
+ class="btn-link"
+ title="Assign Serial Numbers">
+ <span>Assign Serial Numbers</span>
+ </button>
+ <button name="action_clear_lines_show_details" type="object"
+ class="btn-link"
+ title="Clear Lines"
+ attrs="{'invisible': [('display_assign_serial', '=', False)]}">
+ <span>Clear All</span>
+ </button>
+ </div>
+ </group>
+ </group>
+ <field name="move_line_ids" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}" context="{'tree_view_ref': 'stock.view_stock_move_line_operation_tree', 'default_product_uom_id': product_uom, 'default_picking_id': picking_id, 'default_move_id': id, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"/>
+ <footer class="oe_edit_only" attrs="{'invisible': ['|', ('state', '=', 'cancel'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}">
+ <button string="Confirm" special="save" class="oe_highlight"/>
+ <button string="Discard" special="cancel"/>
+ </footer>
+ <footer class="oe_edit_only" attrs="{'invisible': ['|', '&amp;', ('state', '!=', 'cancel'), ('state', '!=', 'done'), '&amp;', ('state', '=', 'done'), ('is_locked', '!=', True)]}">
+ <button string="Close" special="cancel"/>
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_stock_move_nosuggest_operations" model="ir.ui.view">
+ <field name="name">stock.move.operations.nosuggest.form</field>
+ <field name="model">stock.move</field>
+ <field name="priority">1000</field>
+ <field name="mode">primary</field>
+ <field name="inherit_id" ref="stock.view_stock_move_operations"/>
+ <field name="arch" type="xml">
+ <field name="move_line_ids" position="replace">
+ <field name="move_line_nosuggest_ids" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}" context="{'tree_view_ref': 'stock.view_stock_move_line_operation_tree','default_picking_id': picking_id, 'default_move_id': id, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"/>
+ </field>
+ </field>
+ </record>
+
+ <record id="view_stock_move_line_operation_tree" model="ir.ui.view">
+ <field name="name">stock.move.line.operations.tree</field>
+ <field name="model">stock.move.line</field>
+ <field name="priority">1000</field>
+ <field name="arch" type="xml">
+ <tree editable="bottom" decoration-muted="state == 'done' and is_locked == True" decoration-success="product_uom_qty==qty_done" decoration-danger="qty_done &gt; product_uom_qty and state != 'done' and picking_code != 'incoming'">
+ <field name="company_id" invisible="1" force_save="1"/>
+ <field name="picking_id" invisible="1" force_save="1"/>
+ <field name="move_id" invisible="1" force_save="1" />
+ <field name="product_uom_category_id" invisible="1"/>
+ <field name="product_id" invisible="1"/>
+ <field name="package_level_id" invisible="1"/>
+ <field name="location_id" options="{'no_create': True}" attrs="{'readonly': ['&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}" invisible="not context.get('show_source_location')" domain="[('id', 'child_of', parent.location_id), '|', ('company_id', '=', False), ('company_id', '=', company_id)]" groups="stock.group_stock_multi_locations"/>
+ <field name="location_dest_id" width="0.75" attrs="{'readonly': ['&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}" invisible="not context.get('show_destination_location')" domain="[('id', 'child_of', parent.location_dest_id), '|', ('company_id', '=', False), ('company_id', '=', company_id)]" groups="stock.group_stock_multi_locations"/>
+ <field name="lot_id" groups="stock.group_production_lot"
+ attrs="{'readonly': ['&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}"
+ invisible="not context.get('show_lots_m2o')"
+ domain="[('product_id', '=', parent.product_id), ('company_id', '=', company_id)]"
+ context="{
+ 'active_picking_id': picking_id,
+ 'default_company_id': parent.company_id,
+ 'default_product_id': parent.product_id,
+ }"
+ />
+ <field name="lot_name" widget="text" groups="stock.group_production_lot"
+ placeholder="Write your SN/LN one by one or copy paste a list."
+ attrs="{'readonly': ['&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}"
+ invisible="not context.get('show_lots_text')"/>
+ <field name="package_id" attrs="{'readonly': ['&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}" invisible="not context.get('show_package')" groups="stock.group_tracking_lot"/>
+ <field name="result_package_id" attrs="{'readonly': ['&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}" groups="stock.group_tracking_lot"/>
+ <field name="owner_id" attrs="{'readonly': ['&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}" invisible="not context.get('show_owner')" groups="stock.group_tracking_owner"/>
+ <field name="product_uom_qty" invisible="not context.get('show_reserved_quantity')" readonly="1"/>
+ <field name="state" invisible="1"/>
+ <field name="is_locked" invisible="1"/>
+ <field name="picking_code" invisible="1"/>
+ <field name="qty_done" attrs="{'readonly': ['|', '&amp;', ('state', '=', 'done'), ('is_locked', '=', True), '&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}"/>
+ <field name="product_uom_id" options="{'no_open': True, 'no_create': True}" attrs="{'readonly': ['|', ('product_uom_qty', '!=', 0.0), '&amp;', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}" string="Unit of Measure" groups="uom.group_uom"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_stock_move_line_detailed_operation_tree" model="ir.ui.view">
+ <field name="name">stock.move.line.operations.tree</field>
+ <field name="model">stock.move.line</field>
+ <field name="priority">1000</field>
+ <field name="arch" type="xml">
+ <tree editable="bottom" decoration-muted="(state == 'done' and is_locked == True)" decoration-danger="qty_done&gt;product_uom_qty and state!='done' and parent.picking_type_code != 'incoming'" decoration-success="qty_done==product_uom_qty and state!='done' and not result_package_id">
+ <field name="product_id" required="1" context="{'default_type': 'product'}" attrs="{'readonly': ['|', ('state', '=', 'done'), ('move_id', '!=', False)]}"/>
+ <field name="company_id" invisible="1"/>
+ <field name="move_id" invisible="1"/>
+ <field name="picking_id" invisible="1"/>
+ <field name="product_uom_category_id" invisible="1"/>
+ <field name="location_id" options="{'no_create': True}" attrs="{'column_invisible': [('parent.picking_type_code', '=', 'incoming')]}" groups="stock.group_stock_multi_locations" domain="[('id', 'child_of', parent.location_id), '|', ('company_id', '=', False), ('company_id', '=', company_id)]"/>
+ <field name="location_dest_id" options="{'no_create': True}" attrs="{'column_invisible': [('parent.picking_type_code', '=', 'outgoing')]}" groups="stock.group_stock_multi_locations" domain="[('id', 'child_of', parent.location_dest_id), '|', ('company_id', '=', False), ('company_id', '=', company_id)]"/>
+ <field name="package_id" groups="stock.group_tracking_lot"/>
+ <field name="result_package_id" groups="stock.group_tracking_lot"/>
+ <field name="lots_visible" invisible="1"/>
+ <field name="owner_id" groups="stock.group_tracking_owner" attrs="{'column_invisible': [('parent.picking_type_code', '=', 'incoming')]}"/>
+ <field name="state" invisible="1"/>
+ <field name="lot_id" groups="stock.group_production_lot" attrs="{'column_invisible': [('parent.show_lots_text', '=', True)], 'invisible': [('lots_visible', '=', False)]}" context="{'default_product_id': product_id, 'default_company_id': company_id, 'active_picking_id': picking_id}" optional="show"/>
+ <field name="lot_name" groups="stock.group_production_lot" attrs="{'column_invisible': [('parent.show_lots_text', '=', False)], 'invisible': [('lots_visible', '=', False)]}" context="{'default_product_id': product_id}"/>
+ <field name="is_initial_demand_editable" invisible="1"/>
+ <field name="product_uom_qty" readonly="1" attrs="{'column_invisible': ['|',('parent.immediate_transfer', '=', True),('parent.picking_type_code','=','incoming')]}" optional="show"/>
+ <field name="is_locked" invisible="1"/>
+ <field name="qty_done" attrs="{'readonly': [('state', 'in', ('done', 'cancel')), ('is_locked', '=', True)]}" force_save="1"/>
+ <field name="product_uom_id" force_save="1" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="uom.group_uom"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_move_form" model="ir.ui.view">
+ <field name="name">stock.move.form</field>
+ <field name="model">stock.move</field>
+ <field eval="1" name="priority"/>
+ <field name="arch" type="xml">
+ <form string="Stock Moves" create="0" edit="0">
+ <header>
+ <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" />
+ </header>
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ </div>
+ <group>
+ <group name="main_grp" colspan="2">
+ <group name="main_grp_col1">
+ <field name="reference"/>
+ <field name="location_id" options="{'no_create': True}"/>
+ <field name="location_dest_id" options="{'no_create': True}"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </group>
+ <group name="main_grp_col2">
+ <field name="product_id"/>
+ <field name="product_uom_category_id" invisible="1"/>
+ <label for="product_uom_qty"/>
+ <div class="o_row">
+ <field name="product_uom_qty"/>
+ <field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
+ </div>
+ <field name="name" invisible="1"/>
+ <div class="o_td_label">
+ <label for="date" string="Date Scheduled" attrs="{'invisible': [('state', '=', 'done')]}"/>
+ <label for="date" string="Date Processing" attrs="{'invisible': [('state', '!=', 'done')]}"/>
+ </div>
+ <field name="date" readonly="1" nolabel="1"/>
+ <field name="date_deadline" force_save="1"/>
+ </group>
+ </group>
+ <group name="origin_grp" string="Origin" groups="base.group_no_one" >
+ <field name="origin"/>
+ <field name="group_id"/>
+ <field name="procure_method" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="stock.group_adv_location"/>
+ </group>
+ <group name="linked_group" string="Linked Moves" groups="base.group_no_one" colspan="2">
+ <field name="move_orig_ids" string="Origin Moves" readonly="1">
+ <tree>
+ <field name="location_id"/>
+ <field name="location_dest_id"/>
+ <field name="product_uom_qty"/>
+ <field name="product_uom"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ <field name="move_dest_ids" string="Destination Moves" readonly="1">
+ <tree>
+ <field name="location_id"/>
+ <field name="location_dest_id"/>
+ <field name="product_uom_qty"/>
+ <field name="product_uom"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_move_search" model="ir.ui.view">
+ <field name="name">stock.move.search</field>
+ <field name="model">stock.move</field>
+ <field eval="3" name="priority"/>
+ <field name="arch" type="xml">
+ <search string="Stock Moves">
+ <field name="origin" filter_domain="['|', '|', ('origin', 'ilike', self), ('name', 'ilike', self), ('picking_id', 'ilike', self)]" string="Reference"/>
+ <field name="product_id"/>
+ <field name="name" string="Location" filter_domain="['|',('location_id', 'ilike', self),('location_dest_id', 'ilike', self)]"/>
+ <field name="partner_id" string="Partner" filter_domain="[('picking_id.partner_id', 'child_of', self)]"/>
+ <filter string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>
+ <filter string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
+ <filter string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
+ <separator/>
+ <filter string="Incoming" name="incoming" domain="[('location_id.usage', 'not in', ('internal', 'transit')), ('location_dest_id.usage', 'in', ('internal', 'transit'))]"/>
+ <filter string="Outgoing" name="outgoing" domain="[('location_id.usage', 'in', ('internal', 'transit')), ('location_dest_id.usage', 'not in', ('internal', 'transit'))]"/>
+ <separator/>
+ <filter string="Date" name="today" date="date" help="Scheduled or processing date"/>
+ <group expand="0" string="Group By">
+ <filter string="Product" name="by_product" domain="[]" context="{'group_by': 'product_id'}"/>
+ <filter string="Picking" name="groupby_picking_id" domain="[]" context="{'group_by': 'picking_id'}"/>
+ <filter string="Source Location" name="groupby_location_id" domain="[]" context="{'group_by': 'location_id'}" groups="stock.group_stock_multi_locations"/>
+ <filter string="Destination Location" name="groupby_dest_location_id" domain="[]" context="{'group_by': 'location_dest_id'}" groups="stock.group_stock_multi_locations"/>
+ <filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/>
+ <filter string="Creation Date" name="groupby_create_date" domain="[]" context="{'group_by': 'create_date'}" groups="base.group_no_one"/>
+ <filter string="Scheduled Date" name="groupby_date" domain="[]" context="{'group_by': 'date'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="stock_move_action" model="ir.actions.act_window">
+ <field name="name">Stock Moves</field>
+ <field name="res_model">stock.move</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_id" ref="view_move_tree"/>
+ <field name="search_view_id" ref="view_move_search"/>
+ <field name="context">{'search_default_done': 1, 'search_default_groupby_location_id': 1}</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No stock move found
+ </p><p>
+ This menu gives you the full traceability of inventory
+ operations on a specific product. You can filter on the product
+ to see all the past or future movements for the product.
+ </p>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_stock_move_tree_all">
+ <field name="sequence" eval="1"/>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="view_move_tree"/>
+ <field name="act_window_id" ref="stock_move_action"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_stock_move_form_all">
+ <field name="sequence" eval="3"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="view_move_form"/>
+ <field name="act_window_id" ref="stock_move_action"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_stock_move_pivot_all">
+ <field name="sequence" eval="3"/>
+ <field name="view_mode">pivot</field>
+ <field name="view_id" ref="view_move_pivot"/>
+ <field name="act_window_id" ref="stock_move_action"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_stock_move_graph_all">
+ <field name="sequence" eval="3"/>
+ <field name="view_mode">graph</field>
+ <field name="view_id" ref="view_move_graph"/>
+ <field name="act_window_id" ref="stock_move_action"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_stock_move_kanban_all">
+ <field name="sequence" eval="4"/>
+ <field name="view_mode">kanban</field>
+ <field name="view_id" ref="view_move_kandan"/>
+ <field name="act_window_id" ref="stock_move_action"/>
+ </record>
+
+
+ <!--
+ Receipt Picking (By Stock Move)
+ From stock_partial_move_view
+ -->
+ <record id="view_move_tree_receipt_picking" model="ir.ui.view">
+ <field name="name">stock.move.tree2</field>
+ <field name="model">stock.move</field>
+ <field name="priority" eval="6"/>
+ <field name="arch" type="xml">
+ <tree decoration-muted="state == 'cancel'" default_order='date, picking_id, sequence' string="Moves" create="0">
+ <field name="date" invisible="1"/>
+ <field name="date_deadline" optional="hide"/>
+ <field name="picking_id" string="Reference" invisible="1"/>
+ <field name="sequence" invisible="1"/>
+ <field name="origin" optional="show"/>
+ <field name="product_id"/>
+ <field name="product_uom_qty"/>
+ <field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ <field name="location_id" options="{'no_create': True}" invisible="1"/>
+ <field name="location_dest_id" invisible="1"/>
+ <field name="create_date" invisible="1"/>
+ <field name="state" optional="show"/>
+ <field name="company_id" invisible="1"/>
+ </tree>
+ </field>
+ </record>
+
+ <menuitem action="stock_move_action" id="stock_move_menu" parent="stock.menu_warehouse_report" sequence="140" groups="base.group_no_one"/>
+
+</odoo>
diff --git a/addons/stock/views/stock_orderpoint_views.xml b/addons/stock/views/stock_orderpoint_views.xml
new file mode 100644
index 00000000..2e92d585
--- /dev/null
+++ b/addons/stock/views/stock_orderpoint_views.xml
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="view_stock_warehouse_orderpoint_kanban" model="ir.ui.view">
+ <field name="name">stock.warehouse.orderpoint.kanban</field>
+ <field name="model">stock.warehouse.orderpoint</field>
+ <field name="arch" type="xml">
+ <kanban class="o_kanban_mobile">
+ <field name="name"/>
+ <field name="product_id"/>
+ <field name="trigger"/>
+ <field name="product_min_qty"/>
+ <field name="product_max_qty"/>
+ <templates>
+ <t t-name="kanban-box">
+ <div t-attf-class="oe_kanban_global_click">
+ <div class="o_kanban_record_top">
+ <div class="o_kanban_record_headings">
+ <strong class="o_kanban_record_title"><t t-esc="record.name.value"/></strong>
+ </div>
+ <span class="badge badge-pill"><strong>Min qty :</strong><t t-esc="record.product_min_qty.value"/></span>
+ </div>
+ <div class="o_kanban_record_bottom">
+ <div class="oe_kanban_bottom_left">
+ <span><t t-esc="record.product_id.value"/></span>
+ </div>
+ <div class="oe_kanban_bottom_right">
+ <span class="badge badge-pill"><strong>Max qty :</strong><t t-esc="record.product_max_qty.value"/></span>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record id="view_warehouse_orderpoint_tree_editable" model="ir.ui.view">
+ <field name="name">stock.warehouse.orderpoint.tree.editable</field>
+ <field name="model">stock.warehouse.orderpoint</field>
+ <field name="arch" type="xml">
+ <tree string="Reordering Rules" editable="bottom" js_class="stock_orderpoint_list" sample="1">
+ <field name="active" invisible="1"/>
+ <field name="allowed_route_ids" invisible="1"/>
+ <field name="product_category_id" invisible="1"/>
+ <field name="product_tmpl_id" invisible="1"/>
+ <field name="product_id" attrs="{'readonly': [('product_id', '!=', False)]}" invisible="context.get('default_product_id')" force_save="1"/>
+ <field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
+ <field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide"/>
+ <field name="qty_on_hand" force_save="1"/>
+ <field name="qty_forecast" force_save="1"/>
+ <field name="json_lead_days_popover" optional="show" nolabel="1" string="Forecast Description" width="10px" widget="popover_widget" attrs="{'invisible': [('id', '=', False)]}"/>
+ <field name="route_id" options="{'no_create': True, 'no_open': True}"/>
+ <field name="trigger" optional="hide"/>
+ <field name="product_min_qty" optional="show"/>
+ <field name="product_max_qty" optional="show"/>
+ <field name="qty_multiple" optional="hide"/>
+ <field name="qty_to_order"/>
+ <field name="product_uom_name" string="UoM" groups="uom.group_uom"/>
+ <field name="company_id" optional="hide" readonly="1" groups="base.group_multi_company"/>
+ <button name="action_replenish" string="Order Once" type="object" class="o_replenish_buttons" icon="fa-truck"
+ attrs="{'invisible': [('qty_to_order', '&lt;', 1.0)]}"/>
+ <button name="action_replenish_auto" string="Automate Orders" type="object" class="o_replenish_buttons" icon="fa-refresh"
+ attrs="{'invisible': ['|', ('qty_to_order', '&lt;', 1.0), ('trigger', '=', 'auto')]}"/>
+ <button name="%(action_orderpoint_snooze)d" string="Snooze" type="action" class="text-warning" icon="fa-bell-slash"
+ attrs="{'invisible': [('trigger', '!=', 'manual')]}" context="{'default_orderpoint_ids': [id]}"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_warehouse_orderpoint_tree_editable_config" model="ir.ui.view">
+ <field name="name">stock.warehouse.orderpoint.tree.editable.config</field>
+ <field name="model">stock.warehouse.orderpoint</field>
+ <field name="arch" type="xml">
+ <tree string="Reordering Rules" editable="bottom">
+ <field name="active" invisible="1"/>
+ <field name="allowed_route_ids" invisible="1"/>
+ <field name="warehouse_id" invisible="1"/>
+ <field name="product_tmpl_id" invisible="1"/>
+ <field name="product_id" invisible="context.get('default_product_id')" force_save="1"/>
+ <field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
+ <field name="route_id" optional="hide"/>
+ <field name="trigger" optional="hide"/>
+ <field name="product_min_qty" optional="show"/>
+ <field name="product_max_qty" optional="show"/>
+ <field name="qty_multiple" optional="show"/>
+ <field name="json_lead_days_popover" optional="show" nolabel="1" string="Forecast Description" width="10px" widget="popover_widget" attrs="{'invisible': [('id', '=', False)]}"/>
+ <field name="product_uom_name" string="UoM" groups="uom.group_uom"/>
+ <field name="company_id" optional="hide" readonly="1" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="stock_reorder_report_search">
+ <field name="name">stock.warehouse.orderpoint.reorder.search</field>
+ <field name="model">stock.warehouse.orderpoint</field>
+ <field name="arch" type="xml">
+ <search string="Replenishment Report Search">
+ <field name="name" string="Reordering Rule"/>
+ <field name="product_id"/>
+ <field name="trigger"/>
+ <field name="product_category_id"/>
+ <field name="warehouse_id" groups="stock.group_stock_multi_warehouses"/>
+ <field name="location_id" groups="stock.group_stock_multi_locations"/>
+ <filter string="To Reorder" name="filter_to_reorder" domain="[('qty_to_order', '&gt;', 0.0)]"/>
+ <separator/>
+ <filter string="Not Snoozed" name="filter_not_snoozed" domain="['|', ('snoozed_until', '=', False), ('snoozed_until', '&lt;=', datetime.date.today().strftime('%Y-%m-%d'))]"/>
+ <group expand="0" string="Group By">
+ <filter string="Warehouse" name="groupby_warehouse" domain="[]" context="{'group_by': 'warehouse_id'}" groups="stock.group_stock_multi_warehouses"/>
+ <filter string="Location" name="groupby_location" domain="[]" context="{'group_by': 'location_id'}" groups="stock.group_stock_multi_locations"/>
+ <filter string="Product" name="groupby_product" domain="[]" context="{'group_by': 'product_id'}"/>
+ <filter string="Category" name="groupby_category" domain="[]" context="{'group_by': 'product_category_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+
+ <record model="ir.ui.view" id="warehouse_orderpoint_search">
+ <field name="name">stock.warehouse.orderpoint.search</field>
+ <field name="model">stock.warehouse.orderpoint</field>
+ <field name="arch" type="xml">
+ <search string="Reordering Rules Search">
+ <field name="name" string="Reordering Rule"/>
+ <field name="product_id"/>
+ <field name="trigger"/>
+ <field name="warehouse_id" groups="stock.group_stock_multi_warehouses"/>
+ <field name="location_id" groups="stock.group_stock_multi_locations"/>
+ <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
+ <group expand="0" string="Group By">
+ <filter string="Warehouse" name="warehouse" domain="[]" context="{'group_by': 'warehouse_id'}" groups="stock.group_stock_multi_warehouses"/>
+ <filter string="Location" name="location" domain="[]" context="{'group_by': 'location_id'}" groups="stock.group_stock_multi_locations"/>
+ <filter string="Product" name="product" domain="[]" context="{'group_by': 'product_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
+ <field name="name">stock.warehouse.orderpoint.form</field>
+ <field name="model">stock.warehouse.orderpoint</field>
+ <field name="arch" type="xml">
+ <form string="Reordering Rules">
+ <div class="alert alert-info" role="alert">
+ <a style="cursor: pointer" class="alert-link o_form_uri" type="action" name="%(action_procurement_compute)d">Run the scheduler</a> manually to trigger the reordering rules right now.
+ </div>
+ <sheet>
+ <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
+ <div class="oe_title">
+ <h1>
+ <field name="name"/>
+ </h1>
+ </div>
+ <group>
+ <group>
+ <field name="active" invisible="1"/>
+ <field name="product_id"/>
+ <label for="product_min_qty"/>
+ <div class="o_row">
+ <field name="product_min_qty"/>
+ <field name="product_uom_name"/>
+ <field name="json_lead_days_popover" widget="popover_widget" attrs="{'invisible': [('id', '=', False)]}"/>
+ </div>
+ <label for="product_max_qty"/>
+ <div class="o_row">
+ <field name="product_max_qty"/>
+ <field name="product_uom_name"/>
+ </div>
+ <field name="qty_multiple" string="Quantity Multiple"/>
+ </group>
+ <group>
+ <field name="allowed_location_ids" invisible="1"/>
+ <field name="warehouse_id" widget="selection" groups="stock.group_stock_multi_locations"/>
+ <field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" domain="[('id', 'in', allowed_location_ids)]"/>
+ <label for="group_id" groups="base.group_no_one"/>
+ <div groups="base.group_no_one">
+ <field name="group_id" groups="stock.group_adv_location"/>
+ </div>
+ <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="action_orderpoint_replenish" model="ir.actions.act_window">
+ <field name="name">Replenishment</field>
+ <field name="res_model">stock.warehouse.orderpoint</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="view_warehouse_orderpoint_tree_editable"/>
+ <field name="search_view_id" ref="stock_reorder_report_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_replenishment">
+ You are good, no replenishment to perform!
+ </p><p>
+ You'll find here smart replenishment propositions based on inventory forecasts.
+ Choose the quantity to buy or manufacture and launch orders in a click.
+ To save time in the future, set the rules as "automated".
+ </p>
+ </field>
+ </record>
+
+ <record id="action_orderpoint" model="ir.actions.act_window">
+ <field name="name">Reordering Rules</field>
+ <field name="res_model">stock.warehouse.orderpoint</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,form</field>
+ <field name="view_id" ref="view_warehouse_orderpoint_tree_editable_config"/>
+ <field name="search_view_id" ref="warehouse_orderpoint_search"/>
+ <field name="context">{'search_default_trigger': 'auto'}</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No reordering rule found
+ </p><p>
+ Define a minimum stock rule so that Odoo creates automatically requests for quotations or draft manufacturing orders to resupply your stock.
+ </p>
+ </field>
+ </record>
+
+ <record model="ir.actions.server" id="action_replenishment">
+ <field name="name">Replenishment</field>
+ <field name="model_id" ref="model_stock_warehouse_orderpoint"/>
+ <field name="state">code</field>
+ <field name="code">
+ action = model.with_context(
+ search_default_trigger='manual',
+ search_default_filter_to_reorder=True,
+ search_default_filter_not_snoozed=True,
+ default_trigger='manual'
+ ).action_open_orderpoints()
+ </field>
+ </record>
+
+
+ <menuitem
+ id="menu_reordering_rules_replenish"
+ action="action_replenishment"
+ name="Replenishment" parent="menu_stock_warehouse_mgmt" sequence="10"
+ groups="stock.group_stock_manager"/>
+ <menuitem
+ id="menu_reordering_rules_config"
+ action="action_orderpoint"
+ name="Reordering Rules" parent="menu_product_in_config_stock" sequence="10"/>
+</odoo>
diff --git a/addons/stock/views/stock_package_level_views.xml b/addons/stock/views/stock_package_level_views.xml
new file mode 100644
index 00000000..fd22c93c
--- /dev/null
+++ b/addons/stock/views/stock_package_level_views.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="package_level_form_view" model="ir.ui.view">
+ <field name="name">Package Level</field>
+ <field name="model">stock.package_level</field>
+ <field name="arch" type="xml">
+ <form create="false" edit="false">
+ <header>
+ <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" />
+ </header>
+ <group>
+ <field name="picking_id" invisible="1"/>
+ <field name="show_lots_m2o" invisible="1"/>
+ <field name="show_lots_text" invisible="1"/>
+ <field name="picking_type_code" invisible="1"/>
+ <group>
+ <field name="package_id"/>
+ <field name="location_id" options="{'no_create': True}" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}" groups="stock.group_stock_multi_locations"/>
+ <field name="location_dest_id" options="{'no_create': True}" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}" groups="stock.group_stock_multi_locations"/>
+ <field name="is_done"/>
+ <field name="company_id" groups="base.main_company"/>
+ </group>
+ <field name="move_ids" attrs="{'invisible': [('state', 'in', ('new', 'draft', 'assigned', 'done'))]}">
+ <tree>
+ <field name="product_id"/>
+ <field name="product_uom_qty"/>
+ <field name="quantity_done"/>
+ <field name="product_uom" groups="uom.group_uom"/>
+ <field name="state" invisible="1"/>
+ </tree>
+ </field>
+ <field name="move_line_ids" attrs="{'invisible': [('state', 'in', ('confirmed', 'cancel'))]}">
+ <tree>
+ <field name="product_id"/>
+ <field name="lot_id" attrs="{'column_invisible': [('parent.show_lots_m2o', '=', False)]}" groups="stock.group_production_lot"/>
+ <field name="lot_name" attrs="{'column_invisible': [('parent.show_lots_text', '=', False)]}" groups="stock.group_production_lot"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"/>
+ <field name="product_uom_qty"/>
+ <field name="qty_done"/>
+ <field name="product_uom_id" options="{'no_open': True, 'no_create': True}" attrs="{'readonly': [('product_uom_qty', '!=', 0.0)]}" string="Unit of Measure" groups="uom.group_uom"/>
+ <field name="state" invisible="1"/>
+ </tree>
+ </field>
+ </group>
+ </form>
+ </field>
+ </record>
+
+
+ <record id="package_level_form_edit_view" model="ir.ui.view">
+ <field name="name">Package Level</field>
+ <field name="model">stock.package_level</field>
+ <field name="inherit_id" ref="stock.package_level_form_view"/>
+ <field name="mode">primary</field>
+ <field name="arch" type="xml">
+ <xpath expr='//form' position='inside'>
+ <footer class="oe_edit_only">
+ <button string="Confirm" special="save" class="oe_highlight"/>
+ <button string="Discard" special="cancel"/>
+ </footer>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="package_level_tree_view_picking" model="ir.ui.view">
+ <field name="name">Package Level Tree Picking</field>
+ <field name="model">stock.package_level</field>
+ <field name="priority">1000</field>
+ <field name="arch" type="xml">
+ <tree editable="bottom" decoration-muted="state == 'done'">
+ <field name="is_fresh_package" invisible="1"/>
+ <field name="company_id" invisible="1"/>
+ <field name="package_id" attrs="{'readonly': [('state', 'in', ('confirmed', 'assigned', 'done', 'cancel'))]}" options="{'no_create': True}"/>
+ <field name="location_id" options="{'no_create': True}" attrs="{'column_invisible': [('parent.picking_type_code', '=', 'incoming')]}" groups="stock.group_stock_multi_locations"/>
+ <field name="location_dest_id" options="{'no_create': True}" attrs="{'column_invisible': [('parent.picking_type_code', '=', 'outgoing')]}" groups="stock.group_stock_multi_locations"/>
+ <field name="state"/>
+ <field name="is_done" attrs="{'readonly': ['|', ('parent.state', 'in', ('draft', 'new', 'done')), ('is_fresh_package', '=', True)]}"/>
+ <button name="action_show_package_details" title="Display package content" type="object" icon="fa-list" />
+ </tree>
+ </field>
+ </record>
+</odoo>
diff --git a/addons/stock/views/stock_picking_views.xml b/addons/stock/views/stock_picking_views.xml
new file mode 100644
index 00000000..749b2d91
--- /dev/null
+++ b/addons/stock/views/stock_picking_views.xml
@@ -0,0 +1,781 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="view_pickingtype_filter" model="ir.ui.view">
+ <field name="name">stock.picking.type.filter</field>
+ <field name="model">stock.picking.type</field>
+ <field name="arch" type="xml">
+ <search string="Operation Type">
+ <field name="name"/>
+ <field name="warehouse_id"/>
+ <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
+ <group expand="0" string="Group By">
+ <filter string="Type of Operation" name="groupby_code" domain="[]" context="{'group_by': 'code'}"/>
+ <filter string="Warehouse" name="groupby_warehouse_id" domain="[]" context="{'group_by': 'warehouse_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="view_picking_type_tree">
+ <field name="name">Operation types</field>
+ <field name="model">stock.picking.type</field>
+ <field name="arch" type="xml">
+ <tree string="Operation Types">
+ <field name="sequence" widget="handle"/>
+ <field name="name"/>
+ <field name="active" invisible="1"/>
+ <field name="warehouse_id" groups="stock.group_stock_multi_warehouses"/>
+ <field name="sequence_id" groups="base.group_no_one"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="view_picking_type_form">
+ <field name="name">Operation Types</field>
+ <field name="model">stock.picking.type</field>
+ <field name="arch" type="xml">
+ <form string="Operation Types">
+ <sheet>
+ <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
+ <group>
+ <group>
+ <field name="active" invisible="1"/>
+ <field name="name"/>
+ <field name="sequence_id" groups="base.group_no_one"/>
+ <field name="sequence_code"/>
+ <field name="warehouse_id" groups="stock.group_stock_multi_warehouses" force_save="1"/>
+ </group>
+ <group>
+ <field name="code"/>
+ <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
+ <field attrs='{"invisible": [("code", "not in", ["incoming", "outgoing", "internal"])]}' name="return_picking_type_id"/>
+ <field name="show_operations"/>
+ <field name="show_reserved" attrs="{'invisible': [('code', '!=', 'incoming')]}"/>
+ </group>
+ </group>
+ <group>
+ <group attrs='{"invisible": [("code", "not in", ["incoming", "outgoing", "internal"])]}' string="Traceability" groups="stock.group_production_lot" name="stock_picking_type_lot">
+ <field name="use_create_lots"/>
+ <field name="use_existing_lots"/>
+ </group>
+ <group attrs='{"invisible": [("code", "not in", ["incoming", "outgoing", "internal"])]}' string="Packages" groups="stock.group_tracking_lot">
+ <field name="show_entire_packs"/>
+ </group>
+ <!-- As this group will be hidden without multi_loccation, you will not be able to create a
+ picking type with the code 'Internal', which make sense, but as the field 'code' on picking
+ types can't be partially hidden, you can still select the code internal in the form view -->
+ <group string="Locations" groups="stock.group_stock_multi_locations">
+ <field name="default_location_src_id" options="{'no_create': True}" attrs="{'required': [('code', 'in', ('internal', 'outgoing'))]}"/>
+ <field name="default_location_dest_id" options="{'no_create': True}" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="stock_picking_type_action" model="ir.actions.act_window">
+ <field name="name">Inventory Overview</field>
+ <field name="res_model">stock.picking.type</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">kanban,form</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Create a new operation type
+ </p><p>
+ The operation type system allows you to assign each stock
+ operation a specific type which will alter its views accordingly.
+ On the operation type you could e.g. specify if packing is needed by default,
+ if it should show the customer.
+ </p>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_picking_type_list">
+ <field name="name">stock.picking.type.list</field>
+ <field name="model">stock.picking.type</field>
+ <field name="arch" type="xml">
+ <tree string="Operation Types">
+ <field name="name"/>
+ <field name="sequence_id"/>
+ <field name="warehouse_id"/>
+ <field name="code"/>
+ <field name="return_picking_type_id"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ <field name="default_location_src_id" attrs="{'required': [('code', '=', 'internal')]}"/>
+ <field name="default_location_dest_id" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="action_picking_type_list" model="ir.actions.act_window">
+ <field name="name">Operations Types</field>
+ <field name="res_model">stock.picking.type</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,form</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p><p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+
+ </record>
+
+ <menuitem
+ action="stock_picking_type_action"
+ id="stock_picking_type_menu"
+ parent="menu_stock_root" sequence="0"
+ name="Overview"/>
+
+ <menuitem id="menu_pickingtype" name="Operations Types" parent="stock.menu_warehouse_config" action="action_picking_type_list" sequence="4"/>
+
+ <record model="ir.ui.view" id="stock_picking_calendar">
+ <field name="name">stock.picking.calendar</field>
+ <field name="model">stock.picking</field>
+ <field name="priority" eval="2"/>
+ <field name="arch" type="xml">
+ <calendar string="Calendar View" date_start="scheduled_date" color="partner_id" event_limit="5">
+ <field name="partner_id" filters="1"/>
+ <field name="origin"/>
+ <field name="picking_type_id"/>
+ <field name="state"/>
+ </calendar>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="stock_picking_kanban">
+ <field name="name">stock.picking.kanban</field>
+ <field name="model">stock.picking</field>
+ <field name="arch" type="xml">
+ <kanban class="o_kanban_mobile" sample="1">
+ <field name="name"/>
+ <field name="partner_id"/>
+ <field name="location_dest_id"/>
+ <field name="state"/>
+ <field name="scheduled_date"/>
+ <field name="activity_state"/>
+ <progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
+ <templates>
+ <t t-name="kanban-box">
+ <div t-attf-class="oe_kanban_card oe_kanban_global_click">
+ <div class="o_kanban_record_top mb8">
+ <field name="priority" widget="priority"/>
+ <div class="o_kanban_record_headings ml-1">
+ <strong class="o_kanban_record_title"><span><t t-esc="record.name.value"/></span></strong>
+ </div>
+ <strong>
+ <field name="state" widget="label_selection" options="{'classes': {'draft': 'default', 'cancel': 'default', 'none': 'danger', 'waiting': 'warning', 'confirmed': 'warning', 'partially_available': 'warning', 'done': 'success'}}"/>
+ </strong>
+ </div>
+ <div class="o_kanban_record_bottom">
+ <div class="oe_kanban_bottom_left">
+ <t t-esc="record.partner_id.value"/>
+ <field name="activity_ids" widget="kanban_activity"/>
+ <field name="json_popover" nolabel="1" widget="stock_rescheduling_popover" attrs="{'invisible': [('json_popover', '=', False)]}"/>
+ </div>
+ <div class="oe_kanban_bottom_right">
+ <t t-esc="record.scheduled_date.value and record.scheduled_date.value.split(' ')[0] or False"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record id="vpicktree" model="ir.ui.view">
+ <field name="name">stock.picking.tree</field>
+ <field name="model">stock.picking</field>
+ <field name="arch" type="xml">
+ <tree string="Picking list" multi_edit="1" sample="1">
+ <header>
+ <button name="do_unreserve" type="object" string="Unreserve"/>
+ </header>
+ <field name="priority" optional="show" widget="priority" nolabel="1"/>
+ <field name="name" decoration-bf="1"/>
+ <field name="location_id" options="{'no_create': True}" string="From" groups="stock.group_stock_multi_locations" optional="show"/>
+ <field name="location_dest_id" options="{'no_create': True}" string="To" groups="stock.group_stock_multi_locations" optional="show"/>
+ <field name="partner_id" optional="show"/>
+ <field name="signature" string="Signed" optional="hide" groups="stock.group_stock_sign_delivery"/>
+ <field name="user_id" optional="hide" widget="many2one_avatar_user"/>
+ <field name="scheduled_date" optional="show" widget="remaining_days" attrs="{'invisible':[('state', 'in', ('done', 'cancel'))]}"/>
+ <field name="date_deadline" optional="hide" widget="remaining_days" attrs="{'invisible':[('state', 'in', ('done', 'cancel'))]}"/>
+ <field name="origin" optional="show"/>
+ <field name="group_id" invisible="1"/>
+ <field name="backorder_id" optional="hide"/>
+ <field name="picking_type_id" optional="hide"/>
+ <field name="company_id" groups="base.group_multi_company" optional="show"/>
+ <field name="state" optional="show" widget="badge" decoration-success="state == 'done'" decoration-info="state not in ('done', 'cancel')"/>
+ <field name="activity_exception_decoration" widget="activity_exception"/>
+ <field name="json_popover" nolabel="1" widget="stock_rescheduling_popover" attrs="{'invisible': [('json_popover', '=', False)]}"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_picking_form" model="ir.ui.view">
+ <field name="name">stock.picking.form</field>
+ <field name="model">stock.picking</field>
+ <field eval="12" name="priority"/>
+ <field name="arch" type="xml">
+ <form string="Transfer">
+
+ <field name="is_locked" invisible="1"/>
+ <field name="show_mark_as_todo" invisible="1"/>
+ <field name="show_check_availability" invisible="1"/>
+ <field name="show_validate" invisible="1"/>
+ <field name="show_lots_text" invisible="1"/>
+ <field name="immediate_transfer" invisible="1"/>
+ <field name="picking_type_code" invisible="1"/>
+ <field name="hide_picking_type" invisible="1"/>
+ <field name="show_operations" invisible="1" readonly="1"/>
+ <field name="show_reserved" invisible="1" readonly="1"/>
+ <field name="move_line_exist" invisible="1"/>
+ <field name="has_packages" invisible="1"/>
+ <field name="picking_type_entire_packs" invisible="1"/>
+ <field name="use_create_lots" invisible="1"/>
+
+ <header>
+ <button name="action_confirm" attrs="{'invisible': [('show_mark_as_todo', '=', False)]}" string="Mark as Todo" type="object" class="oe_highlight" groups="base.group_user"/>
+ <button name="action_assign" attrs="{'invisible': [('show_check_availability', '=', False)]}" string="Check Availability" type="object" class="oe_highlight" groups="base.group_user"/>
+ <button name="button_validate" attrs="{'invisible': ['|', ('state', 'in', ('waiting','confirmed')), ('show_validate', '=', False)]}" string="Validate" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
+ <button name="button_validate" attrs="{'invisible': ['|', ('state', 'not in', ('waiting', 'confirmed')), ('show_validate', '=', False)]}" string="Validate" type="object" groups="stock.group_stock_user" class="o_btn_validate"/>
+ <widget name="signature" string="Sign" highlight="1"
+ attrs="{'invisible': ['|', '|', ('id', '=', False), ('picking_type_code', '!=', 'outgoing'), ('state', '!=', 'done')]}"
+ full_name="partner_id" groups="stock.group_stock_sign_delivery"/>
+ <widget name="signature" string="Sign"
+ attrs="{'invisible': ['|', '|', ('id', '=', False), ('picking_type_code', '!=', 'outgoing'), ('state', '=', 'done')]}"
+ full_name="partner_id" groups="stock.group_stock_sign_delivery"/>
+ <button name="do_print_picking" string="Print" groups="stock.group_stock_user" type="object" attrs="{'invisible': [('state', 'not in', ('assigned', 'partially_available'))]}"/>
+ <button name="%(action_report_delivery)d" string="Print" attrs="{'invisible': [('state', '!=', 'done')]}" type="action" groups="base.group_user"/>
+ <button name="%(act_stock_return_picking)d" string="Return" attrs="{'invisible': [('state', '!=', 'done')]}" type="action" groups="base.group_user"/>
+ <button name="do_unreserve" string="Unreserve" groups="base.group_user" type="object" attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '=', 'incoming'), ('immediate_transfer', '=', True), '&amp;', ('state', 'not in', ('assigned', 'partially_available')), ('move_type', '!=', 'one'), '&amp;', ('state', 'not in', ('assigned', 'partially_available', 'confirmed')), ('move_type', '=', 'one')]}"/>
+ <button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': ['|', '&amp;', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&amp;', ('picking_type_code', '=', 'outgoing'), ('state', '=', 'done')]}"/>
+ <button name="action_toggle_is_locked" attrs="{'invisible': ['|', ('state', 'in', ('draft','cancel')), ('is_locked', '=', False)]}" string="Unlock" groups="stock.group_stock_manager" type="object" help="If the picking is unlocked you can edit initial demand (for a draft picking) or done quantities (for a done picking)."/>
+ <button name="action_toggle_is_locked" attrs="{'invisible': [('is_locked', '=', True)]}" string="Lock" groups="stock.group_stock_manager" type="object"/>
+ <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" />
+ <button name="action_cancel" attrs="{'invisible': [('state', 'not in', ('assigned', 'confirmed', 'partially_available', 'draft', 'waiting'))]}" string="Cancel" groups="base.group_user" type="object"/>
+ </header>
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ <field name="has_scrap_move" invisible="True"/>
+ <field name="has_tracking" invisible="True"/>
+ <button name="action_see_move_scrap" string="Scraps" type="object"
+ class="oe_stat_button" icon="fa-arrows-v"
+ attrs="{'invisible': [('has_scrap_move', '=', False)]}"/>
+ <button name="action_see_packages" string="Packages" type="object"
+ class="oe_stat_button" icon="fa-cubes"
+ attrs="{'invisible': [('has_packages', '=', False)]}"/>
+ <button name="%(action_stock_report)d" icon="fa-arrow-up" class="oe_stat_button" string="Traceability" type="action" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('has_tracking', '=', False)]}" groups="stock.group_production_lot"/>
+ <!-- Use the following button to avoid onchange on one2many -->
+ <button name="action_picking_move_tree"
+ class="oe_stat_button"
+ icon="fa-arrows-v"
+ type="object"
+ help="List view of operations"
+ groups="base.group_no_one"
+ attrs="{'invisible': ['|', '&amp;', ('show_operations', '=', True), '|', ('is_locked', '=', True), ('state', '=', 'done'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}"
+ context="{'picking_type_code': picking_type_code, 'default_picking_id': id, 'form_view_ref':'stock.view_move_form', 'address_in_id': partner_id, 'default_picking_type_id': picking_type_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}">
+ <div class="o_form_field o_stat_info">
+ <span class="o_stat_text">Operations</span>
+ </div>
+ </button>
+ </div>
+ <div class="oe_title">
+ <h1>
+ <field name="priority" widget="priority" class="mr-3" attrs="{'invisible': [('name','=','/')]}"/>
+ <field name="name" attrs="{'invisible': [('name','=','/')]}"/>
+ </h1>
+ </div>
+ <group>
+ <group>
+ <div class="o_td_label">
+ <label for="partner_id" string="Delivery Address" style="font-weight:bold;"
+ attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}"/>
+ <label for="partner_id" string="Receive From" style="font-weight:bold;"
+ attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}"/>
+ <label for="partner_id" string="Contact" style="font-weight:bold;"
+ attrs="{'invisible': [('picking_type_code', 'in', ['incoming', 'outgoing'])]}"/>
+ </div>
+ <field name="partner_id" nolabel="1"/>
+ <field name="picking_type_id" attrs="{'invisible': [('hide_picking_type', '=', True)], 'readonly': [('state', '!=', 'draft')]}"/>
+ <field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/>
+ <field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}"/>
+ <field name="backorder_id" attrs="{'invisible': [('backorder_id','=',False)]}"/>
+ </group>
+ <group>
+ <label for="scheduled_date"/>
+ <div class="o_row">
+ <field name="scheduled_date" attrs="{'required': [('id', '!=', False)]}"
+ decoration-warning="state not in ('done', 'cancel') and scheduled_date &lt; now"
+ decoration-danger="state not in ('done', 'cancel') and scheduled_date &lt; current_date"
+ decoration-bf="state not in ('done', 'cancel') and (scheduled_date &lt; current_date or scheduled_date &lt; now)"/>
+ <field name="json_popover" widget="stock_rescheduling_popover" attrs="{'invisible': [('json_popover', '=', False)]}"/>
+ </div>
+ <field name="date_deadline"
+ attrs="{'invisible': ['|', ('state', 'in', ('done', 'cancel')), ('date_deadline', '=', False)]}"
+ decoration-danger="date_deadline and date_deadline &lt; current_date"
+ decoration-bf="date_deadline and date_deadline &lt; current_date"/>
+ <field name="date_done" string="Effective Date" attrs="{'invisible': [('state', '!=', 'done')]}"/>
+ <field name="origin" placeholder="e.g. PO0032"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"
+ attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}"/>
+ </group>
+ </group>
+ <notebook>
+ <!-- Reservation hidden -->
+ <page string="Detailed Operations"
+ name="detailed_operations_hidden"
+ attrs="{'invisible': ['|', ('show_operations', '=', False), ('show_reserved', '=', True)]}">
+ <field name="move_line_nosuggest_ids"
+ attrs="{'readonly': ['|', '|', ('show_operations', '=', False), ('state', '=', 'cancel'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}"
+ context="{'tree_view_ref': 'stock.view_stock_move_line_detailed_operation_tree', 'default_picking_id': id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"/>
+ <field name="package_level_ids_details"
+ context="{'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"
+ attrs="{'readonly': [('state', '=', 'done')], 'invisible': ['|', ('picking_type_entire_packs', '=', False), ('show_operations', '=', False)]}" />
+ <button class="oe_highlight" name="action_put_in_pack" type="object" string="Put in Pack" attrs="{'invisible': [('state', 'in', ('draft', 'done', 'cancel'))]}" groups="stock.group_tracking_lot"/>
+ </page>
+
+ <!-- Reservation displayed -->
+ <page string="Detailed Operations"
+ name="detailed_operations_shown"
+ attrs="{'invisible': ['|', ('show_operations', '=', False), ('show_reserved', '=', False)]}">
+ <field name="move_line_ids_without_package"
+ attrs="{'readonly': ['|', '|', ('show_operations', '=', False), ('state', '=', 'cancel'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}"
+ context="{'tree_view_ref': 'stock.view_stock_move_line_detailed_operation_tree', 'default_picking_id': id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"/>
+ <field name="package_level_ids_details" context="{'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}" attrs="{'readonly': [('state', '=', 'done')], 'invisible': ['|', ('picking_type_entire_packs', '=', False), ('show_operations', '=', False)]}" />
+ <button class="oe_highlight" name="action_put_in_pack" type="object" string="Put in Pack" attrs="{'invisible': [('state', 'in', ('draft', 'done', 'cancel'))]}" groups="stock.group_tracking_lot"/>
+ </page>
+
+ <page string="Operations" name="operations">
+ <field name="move_ids_without_package" mode="tree,kanban"
+ attrs="{'readonly': ['&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}"
+ context="{'default_company_id': company_id, 'default_date': scheduled_date, 'default_date_deadline': date_deadline, 'picking_type_code': picking_type_code, 'default_picking_id': id, 'form_view_ref':'stock.view_move_form', 'address_in_id': partner_id, 'default_picking_type_id': picking_type_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}">
+ <tree decoration-danger="not parent.immediate_transfer and state != 'done' and quantity_done > reserved_availability and show_reserved_availability" decoration-muted="scrapped == True or state == 'cancel' or (state == 'done' and is_locked == True)" string="Stock Moves" editable="bottom">
+ <field name="company_id" invisible="1"/>
+ <field name="name" invisible="1"/>
+ <field name="state" invisible="1" readonly="0"/>
+ <field name="picking_type_id" invisible="1"/>
+ <field name="location_id" invisible="1"/>
+ <field name="location_dest_id" invisible="1"/>
+ <field name="scrapped" invisible="1"/>
+ <field name="picking_code" invisible="1"/>
+ <field name="product_type" invisible="1"/>
+ <field name="show_details_visible" invisible="1"/>
+ <field name="show_reserved_availability" invisible="1"/>
+ <field name="show_operations" invisible="1" readonly="1"/>
+ <field name="additional" invisible="1"/>
+ <field name="has_move_lines" invisible="1"/>
+ <field name="is_locked" invisible="1"/>
+ <field name="product_uom_category_id" invisible="1"/>
+ <field name="has_tracking" invisible="1"/>
+ <field name="display_assign_serial" invisible="1"/>
+ <field name="product_id" required="1" context="{'default_type': 'product'}" attrs="{'readonly': ['|', '&amp;', ('state', '!=', 'draft'), ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
+ <field name="description_picking" string="Description" optional="hide"/>
+ <field name="date" invisible="1"/>
+ <field name="date_deadline" optional="hide"/>
+ <field name="is_initial_demand_editable" invisible="1"/>
+ <field name="is_quantity_done_editable" invisible="1"/>
+ <field name="product_uom_qty" string="Demand" attrs="{'column_invisible': [('parent.immediate_transfer', '=', True)], 'readonly': ['|', ('is_initial_demand_editable', '=', False), '&amp;', '&amp;', ('show_operations', '=', True), ('is_locked', '=', True), ('is_initial_demand_editable', '=', False)]}"/>
+ <field name="reserved_availability" string="Reserved" attrs="{'column_invisible': (['|','|', ('parent.state','=', 'done'), ('parent.picking_type_code', 'in', ['incoming', 'outgoing']), ('parent.immediate_transfer', '=', True)])}"/>
+ <field name="product_qty" invisible="1" readonly="1"/>
+ <field name="forecast_expected_date" invisible="1" />
+ <field name="forecast_availability" string="Reserved" attrs="{'column_invisible': ['|', ('parent.picking_type_code', '!=', 'outgoing'), ('parent.state','=', 'done')]}" widget="forecast_widget"/>
+ <field name="quantity_done" string="Done" attrs="{'readonly': [('is_quantity_done_editable', '=', False)]}"/>
+ <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft'), ('additional', '=', False)]}" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ <field name="lot_ids" widget="many2many_tags"
+ groups="stock.group_production_lot"
+ attrs="{'invisible': ['|', ('show_details_visible', '=', False), ('has_tracking', '!=', 'serial')]}"
+ optional="hide"
+ options="{'create': [('parent.use_create_lots', '=', True)]}"
+ context="{'default_company_id': company_id, 'default_product_id': product_id, 'active_picking_id': parent.id}"
+ domain="[('product_id','=',product_id)]"
+ />
+ <button name="action_show_details" type="object" icon="fa-list" width="0.1"
+ attrs="{'invisible': [('show_details_visible', '=', False)]}" options='{"warn": true}'/>
+ <button name="action_assign_serial" type="object"
+ icon="fa-plus-square"
+ width="0.1"
+ role="img" title="Assign Serial Numbers"
+ attrs="{'invisible': ['|', ('display_assign_serial', '=', False), ('show_operations', '=', False)]}"/>
+ </tree>
+ <form string="Stock Moves">
+ <header>
+ <field name="state" widget="statusbar"/>
+ </header>
+ <group>
+ <field name="product_uom_category_id" invisible="1"/>
+ <field name="additional" invisible="1"/>
+ <field name="has_move_lines" invisible="1"/>
+ <field name="company_id" invisible="1"/>
+ <field name="product_id" required="1" attrs="{'readonly': ['|', '&amp;', ('state', '!=', 'draft'), ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
+ <field name="is_initial_demand_editable" invisible="1"/>
+ <field name="is_quantity_done_editable" invisible="1"/>
+ <field name="product_uom_qty" attrs="{'invisible': [('parent.immediate_transfer', '=', True)], 'readonly': [('is_initial_demand_editable', '=', False)]}"/>
+ <field name="reserved_availability" string="Reserved" attrs="{'invisible': (['|','|', ('parent.state','=', 'done'), ('parent.picking_type_code', 'in', ['outgoing', 'incoming']), ('parent.immediate_transfer', '=', True)])}"/>
+ <field name="product_qty" invisible="1" readonly="1"/>
+ <field name="forecast_expected_date" invisible="1"/>
+ <field name="forecast_availability" string="Reserved" attrs="{'invisible': ['|', ('parent.picking_type_code', '!=', 'outgoing'), ('parent.state','=', 'done')]}" widget="forecast_widget"/>
+ <field name="quantity_done" string="Done" attrs="{'readonly': [('is_quantity_done_editable', '=', False)]}"/>
+ <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft'), ('additional', '=', False)]}" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
+ <field name="description_picking" string="Description"/>
+ </group>
+ </form>
+ </field>
+ <field name="id" invisible="1"/>
+ <field name="package_level_ids" context="{'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}" attrs="{'readonly': [('state', '=', 'done')], 'invisible': ['|', ('picking_type_entire_packs', '=', False), ('show_operations', '=', True)]}" />
+ <button class="oe_highlight" name="action_put_in_pack" type="object" string="Put in Pack" attrs="{'invisible': [('state', 'in', ('draft', 'done', 'cancel'))]}" groups="stock.group_tracking_lot"/>
+ </page>
+ <page string="Additional Info" name="extra">
+ <group>
+ <group string="Other Information" name="other_infos">
+ <field name="picking_type_code" invisible="1"/>
+ <field name="move_type" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/>
+ <field name="user_id" domain="[('share', '=', False)]"/>
+ <field name="group_id" groups="base.group_no_one"/>
+ <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" force_save="1"/>
+ </group>
+ </group>
+ </page>
+ <page string="Note" name="note">
+ <field name="note" string="Note" placeholder="Add an internal note that will be printed on the Picking Operations sheet"/>
+ </page>
+ </notebook>
+ </sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids"/>
+ <field name="activity_ids"/>
+ <field name="message_ids"/>
+ </div>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_picking_internal_search" model="ir.ui.view">
+ <field name="name">stock.picking.internal.search</field>
+ <field name="model">stock.picking</field>
+ <field name="arch" type="xml">
+ <search string="Picking Lists">
+ <field name="name" string="Transfer" filter_domain="['|', ('name', 'ilike', self), ('origin', 'ilike', self)]"/>
+ <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
+ <field name="origin"/>
+ <field name="product_id"/>
+ <field name="picking_type_id"/>
+ <filter name="my_transfers" string="My Transfers" domain="[('user_id', '=', uid)]"/>
+ <filter string="Starred" name="starred" domain="[('priority', '=', '1')]"/>
+ <separator/>
+ <filter name="draft" string="Draft" domain="[('state', '=', 'draft')]" help="Draft Moves"/>
+ <filter name="waiting" string="Waiting" domain="[('state', 'in', ('confirmed', 'waiting'))]" help="Waiting Moves"/>
+ <filter name="available" string="Ready" domain="[('state', 'in', ('assigned', 'partially_available'))]" help="Assigned Moves"/>
+ <filter name="done" string="Done" domain="[('state', '=', 'done')]" help="Pickings already processed"/>
+ <filter name="cancel" string="Cancelled" domain="[('state', '=', 'cancel')]" help="Cancelled Moves"/>
+ <separator/>
+ <filter name="late" string="Late" help="Deadline exceed or/and by the scheduled"
+ domain="[('state', 'in', ('assigned', 'waiting', 'confirmed')), '|', '|', ('has_deadline_issue', '=', True), ('date_deadline', '&lt;', current_date), ('scheduled_date', '&lt;', current_date)]"/>
+ <filter string="Planning Issues" name="planning_issues" help="Transfers that are late on scheduled time or one of pickings will be late"
+ domain="['|', ('delay_alert_date', '!=', False), '&amp;', ('scheduled_date','&lt;', time.strftime('%%Y-%%m-%%d %%H:%%M:%%S')), ('state', 'in', ('assigned', 'waiting', 'confirmed'))]"/>
+ <separator/>
+ <filter name="backorder" string="Backorders" domain="[('backorder_id', '!=', False), ('state', 'in', ('assigned', 'waiting', 'confirmed'))]" help="Remaining parts of picking partially processed"/>
+ <separator/>
+ <filter invisible="1" string="Late Activities" name="activities_overdue"
+ domain="[('my_activity_date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
+ help="Show all records which has next action date is before today"/>
+ <filter invisible="1" string="Today Activities" name="activities_today"
+ domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
+ <filter invisible="1" string="Future Activities" name="activities_upcoming_all"
+ domain="[('my_activity_date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))]"/>
+ <separator/>
+ <filter string="Warnings" name="activities_exception"
+ domain="[('activity_exception_decoration', '!=', False)]"/>
+ <group expand="0" string="Group By">
+ <filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/>
+ <filter string="Scheduled Date" name="expected_date" domain="[]" context="{'group_by': 'scheduled_date'}"/>
+ <filter string="Source Document" name="origin" domain="[]" context="{'group_by': 'origin'}"/>
+ <filter string="Operation Type" name="picking_type" domain="[]" context="{'group_by': 'picking_type_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="action_picking_tree_all" model="ir.actions.act_window">
+ <field name="name">Transfers</field>
+ <field name="res_model">stock.picking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,form,calendar</field>
+ <field name="domain"></field>
+ <field name="context">{'contact_display': 'partner_address', 'default_company_id': allowed_company_ids[0]}</field>
+ <field name="search_view_id" ref="view_picking_internal_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p><p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+ </record>
+
+ <record id="action_validate_picking" model="ir.actions.server">
+ <field name="name">Validate</field>
+ <field name="model_id" ref="stock.model_stock_picking"/>
+ <field name="binding_model_id" ref="stock.model_stock_picking"/>
+ <field name="binding_view_types">list</field>
+ <field name="state">code</field>
+ <field name="code">
+ if records:
+ res = records.button_validate()
+ if isinstance(res, dict):
+ action = res
+ </field>
+ </record>
+
+ <record id="action_unreserve_picking" model="ir.actions.server">
+ <field name="name">Unreserve</field>
+ <field name="model_id" ref="stock.model_stock_picking"/>
+ <field name="binding_model_id" ref="stock.model_stock_picking"/>
+ <field name="binding_view_types">list</field>
+ <field name="state">code</field>
+ <field name="code">
+ if records:
+ records.do_unreserve()
+ </field>
+ </record>
+
+ <menuitem id="all_picking" name="Transfers" parent="menu_stock_warehouse_mgmt" sequence="5" action="action_picking_tree_all" groups="stock.group_stock_manager,stock.group_stock_user"/>
+
+ <record id="stock_picking_action_picking_type" model="ir.actions.act_window">
+ <field name="name">All Transfers</field>
+ <field name="res_model">stock.picking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,form,calendar</field>
+ <field name="domain"></field>
+ <field name="context">{'contact_display': 'partner_address'}</field>
+ <field name="search_view_id" ref="view_picking_internal_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p><p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+ </record>
+
+ <record id="action_picking_tree_ready" model="ir.actions.act_window">
+ <field name="name">To Do</field>
+ <field name="res_model">stock.picking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,form,calendar</field>
+ <field name="domain"></field>
+ <field name="context">{'contact_display': 'partner_address', 'search_default_available': 1}</field>
+ <field name="search_view_id" ref="view_picking_internal_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p><p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+ </record>
+
+ <record id="action_picking_tree_waiting" model="ir.actions.act_window">
+ <field name="name">Waiting Transfers</field>
+ <field name="res_model">stock.picking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,form,calendar</field>
+ <field name="domain"></field>
+ <field name="context">{'contact_display': 'partner_address', 'search_default_waiting': 1}</field>
+ <field name="search_view_id" ref="view_picking_internal_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p><p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+ </record>
+
+ <record id="action_picking_tree_late" model="ir.actions.act_window">
+ <field name="name">Late Transfers</field>
+ <field name="res_model">stock.picking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,form,calendar</field>
+ <field name="domain"></field>
+ <field name="context">{'contact_display': 'partner_address', 'search_default_planning_issues': 1}</field>
+ <field name="search_view_id" ref="view_picking_internal_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p><p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+ </record>
+
+ <record id="action_picking_tree_backorder" model="ir.actions.act_window">
+ <field name="name">Backorders</field>
+ <field name="res_model">stock.picking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,kanban,form,calendar</field>
+ <field name="domain"></field>
+ <field name="context">{'contact_display': 'partner_address', 'search_default_backorder': 1}</field>
+ <field name="search_view_id" ref="view_picking_internal_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p>
+ <p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+ </record>
+
+ <record id="action_picking_form" model="ir.actions.act_window">
+ <field name="name">New Transfer</field>
+ <field name="res_model">stock.picking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">form</field>
+ <field name="domain"></field>
+ <field name="context">{
+ 'search_default_picking_type_id': [active_id],
+ 'default_picking_type_id': active_id,
+ 'contact_display': 'partner_address',
+ }
+ </field>
+ <field name="search_view_id" ref="view_picking_internal_search"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ No transfer found. Let's create one!
+ </p>
+ <p>
+ Transfers allow you to move products from one location to another.
+ </p>
+ </field>
+ </record>
+ <record id="do_view_pickings" model="ir.actions.act_window">
+ <field name="name">Transfers for Groups</field>
+ <field name="res_model">stock.picking</field>
+ <field name="view_mode">tree,form</field>
+ <field name="domain">[('group_id','=',active_id)]</field>
+ </record>
+
+ <record id="stock_picking_type_kanban" model="ir.ui.view">
+ <field name="name">stock.picking.type.kanban</field>
+ <field name="model">stock.picking.type</field>
+ <field name="arch" type="xml">
+ <kanban class="oe_background_grey o_kanban_dashboard o_emphasize_colors o_stock_kanban" create="0">
+ <field name="color"/>
+ <field name="code" readonly="1"/>
+ <field name="count_picking_ready"/>
+ <field name="count_picking_draft"/>
+ <field name="count_picking_waiting"/>
+ <field name="count_picking_late"/>
+ <field name="count_picking_backorders"/>
+ <templates>
+ <t t-name="kanban-box">
+ <div t-if="['incoming', 'outgoing', 'internal'].indexOf(record.code.raw_value) > -1" t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}" name="stock_picking">
+ <div>
+ <div t-attf-class="o_kanban_card_header">
+ <div class="o_kanban_card_header_title">
+ <div class="o_primary" t-if="!selection_mode">
+ <a type="object" name="get_stock_picking_action_picking_type">
+ <field name="name"/>
+ </a>
+ </div>
+ <div class="o_primary" t-if="selection_mode">
+ <field name="name"/>
+ </div>
+ <div class="o_secondary"><field class="o_secondary" name="warehouse_id" readonly="1" groups="stock.group_stock_multi_warehouses"/></div>
+ </div>
+ <div class="o_kanban_manage_button_section" t-if="!selection_mode">
+ <a class="o_kanban_manage_toggle_button" href="#"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a>
+ </div>
+ </div>
+ <div class="container o_kanban_card_content" t-if="!selection_mode">
+ <div class="row">
+ <div class="col-6 o_kanban_primary_left">
+ <button class="btn btn-primary" name="get_action_picking_tree_ready" type="object">
+ <span t-if="record.code.raw_value =='incoming'"><t t-esc="record.count_picking_ready.value"/> To Process</span>
+ <span t-if="record.code.raw_value =='outgoing'"><t t-esc="record.count_picking_ready.value"/> To Process</span>
+ <span t-if="record.code.raw_value =='internal'"><t t-esc="record.count_picking_ready.value"/> To Process</span>
+ </button>
+ </div>
+ <div class="col-6 o_kanban_primary_right">
+ <div t-if="record.count_picking_ready.raw_value > 0" class="row">
+ </div>
+
+ <div t-if="record.count_picking_waiting.raw_value > 0" class="row">
+ <div class="col-12">
+ <a name="get_action_picking_tree_waiting" type="object">
+ <field name="count_picking_waiting"/>
+ Waiting
+ </a>
+ </div>
+ </div>
+
+ <div t-if="record.count_picking_late.raw_value > 0" class="row">
+ <div class="col-12">
+ <a class="oe_kanban_stock_picking_type_list" name="get_action_picking_tree_late" type="object">
+ <field name="count_picking_late"/>
+ Late
+ </a>
+ </div>
+ </div>
+
+ <div t-if="record.count_picking_backorders.raw_value > 0" class="row">
+ <div class="col-12">
+ <a class="oe_kanban_stock_picking_type_list" name="get_action_picking_tree_backorder" type="object">
+ <field name="count_picking_backorders"/>
+ Back Orders
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div><div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
+ <div class="row">
+ <div class="col-6 o_kanban_card_manage_section o_kanban_manage_view">
+ <div role="menuitem" class="o_kanban_card_manage_title">
+ <span t-if="record.code.raw_value == 'internal'">Transfers</span>
+ <span t-else="">View</span>
+ </div>
+ <div role="menuitem">
+ <a name="get_stock_picking_action_picking_type" type="object">All</a>
+ </div>
+ <div role="menuitem">
+ <a name="get_action_picking_tree_ready" type="object">Ready</a>
+ </div>
+ <div role="menuitem">
+ <a name="get_action_picking_tree_waiting" type="object">Waiting</a>
+ </div>
+ </div>
+ <div class="col-6 o_kanban_card_manage_section o_kanban_manage_new">
+ <div role="menuitem" class="o_kanban_card_manage_title">
+ <span>New</span>
+ </div>
+ <div role="menuitem">
+ <a name="%(action_picking_form)d" type="action" context="{'default_immediate_transfer': True}">Immediate Transfer</a>
+ </div>
+ <div role="menuitem">
+ <a name="%(action_picking_form)d" type="action">Planned Transfer</a>
+ </div>
+ </div>
+ </div>
+
+ <div t-if="widget.editable" class="o_kanban_card_manage_settings row">
+ <div class="col-8" role="menuitem" aria-haspopup="true">
+ <ul class="oe_kanban_colorpicker" data-field="color" role="menu"/>
+ </div>
+ <div role="menuitem" class="col-4">
+ <a class="dropdown-item" role="menuitem" type="edit">Configuration</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </t>
+
+ </templates>
+ </kanban>
+ </field>
+ </record>
+</odoo>
diff --git a/addons/stock/views/stock_production_lot_views.xml b/addons/stock/views/stock_production_lot_views.xml
new file mode 100644
index 00000000..135132d2
--- /dev/null
+++ b/addons/stock/views/stock_production_lot_views.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="view_production_lot_form" model="ir.ui.view">
+ <field name="name">stock.production.lot.form</field>
+ <field name="model">stock.production.lot</field>
+ <field name="priority">10</field>
+ <field name="arch" type="xml">
+ <form string="Lots/Serial Numbers">
+ <sheet>
+ <field name="display_complete" invisible="1"/>
+ <div class="oe_button_box" name="button_box"
+ attrs="{'invisible': [('display_complete', '=', False)]}">
+ <button name="action_lot_open_quants" icon="fa-arrows" class="oe_stat_button" string="Location" type="object"/>
+ <button name="%(action_stock_report)d" icon="fa-arrow-up" class="oe_stat_button" string="Traceability" type="action"/>
+ </div>
+ <div class="oe_title">
+ <label for="name" class="oe_edit_only"/>
+ <h1>
+ <field name="name" placeholder="e.g. LOT/0001/20121"/>
+ </h1>
+ </div>
+ <group name="main_group">
+ <group>
+ <field name="product_id" context="{'default_type': 'product'}" readonly="context.get('set_product_readonly', False)" force_save="1" help="Product this lot/serial number contains. You cannot change it anymore if it has already been moved."/>
+ <label for="product_qty" attrs="{'invisible': [('display_complete', '=', False)]}"/>
+ <div class="o_row" attrs="{'invisible': [('display_complete', '=', False)]}">
+ <field name="product_qty"/>
+ <field name="product_uom_id" readonly="1" groups="uom.group_uom"/>
+ </div>
+ <field name="ref"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </group>
+ <group></group>
+ </group>
+ <notebook attrs="{'invisible': [('display_complete', '=', False)]}">
+ <page string="Description" name="description">
+ <field name="note"/>
+ </page>
+ </notebook>
+ </sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids"/>
+ <field name="activity_ids"/>
+ <field name="message_ids"/>
+ </div>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_production_lot_tree" model="ir.ui.view">
+ <field name="name">stock.production.lot.tree</field>
+ <field name="model">stock.production.lot</field>
+ <field name="arch" type="xml">
+ <tree string="Lots/Serial Numbers" multi_edit="1">
+ <field name="name" decoration-bf="1"/>
+ <field name="ref" optional="show"/>
+ <field name="product_id" readonly="1"/>
+ <field name="create_date" optional="show"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="search_product_lot_filter">
+ <field name="name">Production Lots Filter</field>
+ <field name="model">stock.production.lot</field>
+ <field name="arch" type="xml">
+ <search string="Product Lots Filter">
+ <field name="name" string="Lot/Serial Number" filter_domain="['|', ('name', 'ilike', self),('ref', 'ilike', self)]"/>
+ <field name="product_id"/>
+ <group expand="0" string="Group By">
+ <filter name="group_by_product" string="Product" domain="[]" context="{'group_by': 'product_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="action_production_lot_form" model="ir.actions.act_window">
+ <field name="name">Lots/Serial Numbers</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">stock.production.lot</field>
+ <field name="view_ids"
+ eval="[(5, 0, 0),
+ (0, 0, {'view_mode': 'tree', 'view_id': ref('view_production_lot_tree')}),
+ (0, 0, {'view_mode': 'form', 'view_id': ref('view_production_lot_form')})]"/>
+ <field name="search_view_id" ref="search_product_lot_filter"/>
+ <field name="context">{'search_default_group_by_product': 1, 'display_complete': True, 'default_company_id': allowed_company_ids[0]}</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Add a lot/serial number
+ </p><p>
+ Lots/Serial numbers help you tracking the path followed by your products.
+ From their traceability report you will see the full history of their use, as well as their composition.
+ </p>
+ </field>
+ </record>
+ <menuitem action="action_production_lot_form" id="menu_action_production_lot_form"
+ parent="menu_stock_inventory_control" groups="stock.group_production_lot"
+ sequence="101"/>
+</odoo>
diff --git a/addons/stock/views/stock_quant_views.xml b/addons/stock/views/stock_quant_views.xml
new file mode 100644
index 00000000..45128f81
--- /dev/null
+++ b/addons/stock/views/stock_quant_views.xml
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="quant_search_view" model="ir.ui.view">
+ <field name="name">stock.quant.search</field>
+ <field name="model">stock.quant</field>
+ <field eval="10" name="priority"/>
+ <field name="arch" type="xml">
+ <search string="Quants">
+ <field name="product_id"/>
+ <field name="location_id"/>
+ <field name="package_id" groups="stock.group_tracking_lot"/>
+ <field name="lot_id" groups="stock.group_production_lot"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"/>
+ <group expand='0' string='Filters'>
+ <filter name='internal_loc' string="Internal Locations" domain="[('location_id.usage','=', 'internal')]"/>
+ <filter name='transit_loc' string="Transit Locations" domain="[('location_id.usage' ,'=', 'transit')]"/>
+ <filter name="on_hand" string="On Hand" domain="[('on_hand', '=', True)]"/>
+ <separator/>
+ <filter name="negative" string="Negative Stock" domain="[('quantity', '&lt;', 0.0)]"/>
+ <filter name="positive" string="Positive Stock" domain="[('quantity', '&gt;', 0.0)]"/>
+ <filter name="reserved" string="Reservations" domain="[('reserved_quantity', '&gt;', 0.0)]"/>
+ <separator/>
+ <filter name="filter_in_date" date="in_date"/>
+ </group>
+ <group expand='0' string='Group by...'>
+ <filter string='Product' name="productgroup" context="{'group_by': 'product_id'}"/>
+ <filter string='Location' name="locationgroup" domain="[]" context="{'group_by': 'location_id'}"/>
+ <filter string='Owner' name="owner" context="{'group_by': 'owner_id'}" groups="stock.group_tracking_owner"/>
+ <filter string='Lot/Serial Number' name="Lot_Serial_number" context="{'group_by': 'lot_id'}" groups="stock.group_production_lot"/>
+ <filter string='Package' name="package" domain="[]" context="{'group_by': 'package_id'}" groups="stock.group_tracking_lot"/>
+ <filter string='Company' name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_stock_quant_form_editable">
+ <field name="name">stock.quant.form.editable</field>
+ <field name="model">stock.quant</field>
+ <field eval="11" name="priority"/>
+ <field name="arch" type="xml">
+ <form string="Inventory Valuation" create="false" edit="false" delete="false">
+ <sheet>
+ <group>
+ <group>
+ <field name="tracking" invisible="1"/>
+ <field name="product_id" readonly="0" options="{'no_create': True}"/>
+ <field name="location_id" readonly="0" options="{'no_create': True}"/>
+ <field name="lot_id" groups="stock.group_production_lot"
+ attrs="{'readonly': [('tracking', 'not in', ['serial', 'lot'])], 'required': [('tracking', '!=', 'none')]}"
+ context="{'default_product_id': product_id, 'default_company_id': company_id}"/>
+ <field name="package_id" readonly="0" groups="stock.group_tracking_lot"/>
+ <field name="owner_id" readonly="0" groups="stock.group_tracking_owner" options="{'no_create': True}"/>
+ <field name='company_id' groups="base.group_multi_company"/>
+ </group>
+ <group>
+ <label for="inventory_quantity" string="Quantity On Hand"/>
+ <div class="o_row">
+ <field name="inventory_quantity"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ </div>
+ <label for="reserved_quantity" string="Quantity Reserved"/>
+ <div class="o_row">
+ <field name="reserved_quantity"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ </div>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_stock_quant_form">
+ <field name="name">stock.quant.form</field>
+ <field name="model">stock.quant</field>
+ <field eval="10" name="priority"/>
+ <field name="arch" type="xml">
+ <form string="Inventory Valuation" create="false" edit="false" delete="false">
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ <button class="oe_stat_button" icon="fa-exchange" type="object" name="action_view_stock_moves" string="Product Moves"/>
+ </div>
+ <group>
+ <group>
+ <field name="product_id"/>
+ <field name="location_id" options="{'no_create': True}"/>
+ <field name="lot_id" groups="stock.group_production_lot"/>
+ <field name="package_id" groups="stock.group_tracking_lot"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"/>
+ </group>
+ <group>
+ <label for="quantity" string="Quantity On Hand"/>
+ <div class="o_row">
+ <field name="quantity"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ </div>
+ <label for="reserved_quantity" string="Quantity Reserved"/>
+ <div class="o_row">
+ <field name="reserved_quantity"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ </div>
+ <field name="in_date" attrs="{'invisible': [('lot_id', '=', False)]}" groups="stock.group_production_lot"/>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_stock_quant_tree_editable">
+ <field name="name">stock.quant.tree.editable</field>
+ <field name="model">stock.quant</field>
+ <field eval="10" name="priority"/>
+ <field name="arch" type="xml">
+ <tree editable="bottom"
+ create="1" edit="1" import="0" js_class="singleton_list"
+ sample="1">
+ <field name="id" invisible="1"/>
+ <field name="tracking" invisible="1"/>
+ <field name="product_id" attrs="{'readonly': [('id', '!=', False)]}"
+ invisible="context.get('single_product', False)"
+ readonly="context.get('single_product', False)" force_save="1"
+ options="{'no_create': True}"/>
+ <field name="location_id" attrs="{'readonly': [('id', '!=', False)]}"
+ invisible="context.get('hide_location', False)"
+ options="{'no_create': True}"/>
+ <field name="lot_id" groups="stock.group_production_lot"
+ attrs="{
+ 'readonly': ['|', ('id', '!=', False), ('tracking', 'not in', ['serial', 'lot'])],
+ 'required': [('tracking', '!=', 'none')]
+ }"
+ invisible="context.get('hide_lot', False)"
+ context="{'default_product_id': product_id, 'default_company_id': company_id}"/>
+ <field name="package_id" groups="stock.group_tracking_lot"
+ attrs="{'readonly': [('id', '!=', False)]}"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"
+ attrs="{'readonly': [('id', '!=', False)]}"
+ options="{'no_create': True}"/>
+ <field name="quantity" string="On Hand Quantity"
+ invisible="1"/>
+ <field name="inventory_quantity" string="On Hand Quantity" decoration-danger="inventory_quantity &lt; 0"
+ readonly="0"/>
+ <field name="available_quantity" optional="show"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ <field name='company_id' groups="base.group_multi_company" optional="show"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_stock_quant_tree">
+ <field name="name">stock.quant.tree</field>
+ <field name="model">stock.quant</field>
+ <field eval="10" name="priority"/>
+ <field name="arch" type="xml">
+ <tree string="Inventory Valuation" js_class="inventory_report_list"
+ create="0" delete="0">
+ <field name="product_id" invisible="context.get('single_product', False)"/>
+ <field name="location_id" invisible="context.get('hide_location', False)"/>
+ <field name="lot_id" groups="stock.group_production_lot"
+ invisible="context.get('hide_lot', False)"/>
+ <field name="package_id" groups="stock.group_tracking_lot"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"/>
+ <field name="available_quantity"/>
+ <field name="quantity"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ <field name='company_id' groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_stock_quant_pivot">
+ <field name="name">stock.quant.pivot</field>
+ <field name="model">stock.quant</field>
+ <field name="arch" type="xml">
+ <pivot string="Inventory" sample="1">
+ <field name="product_id" type="row"/>
+ <field name="location_id" type="col"/>
+ <field name="quantity" type="measure"/>
+ </pivot>
+ </field>
+ </record>
+
+ <record id="stock_quant_view_graph" model="ir.ui.view">
+ <field name="name">stock.quant.graph</field>
+ <field name="model">stock.quant</field>
+ <field name="arch" type="xml">
+ <graph string="Stock Quant" sample="1">
+ <field name="location_id"/>
+ <field name="quantity" type="measure"/>
+ </graph>
+ </field>
+ </record>
+
+ <record model="ir.actions.server" id="action_view_quants"> <!-- Menu + python -->
+ <field name="name">Inventory</field>
+ <field name="model_id" ref="model_stock_quant"/>
+ <field name="state">code</field>
+ <field name="groups_id" eval="[(4, ref('stock.group_stock_user'))]"/>
+ <field name="code">
+ action = model.with_context(
+ search_default_internal_loc=1,
+ search_default_productgroup=1,
+ search_default_locationgroup=1,
+ ).action_view_quants()
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="dashboard_open_quants"> <!-- Used in dashboard -->
+ <field name="name">Stock On Hand</field>
+ <field name="context">{'search_default_internal_loc': 1, 'search_default_productgroup':1, 'search_default_locationgroup':1}</field>
+ <field name="res_model">stock.quant</field>
+ </record>
+ <record model="ir.actions.act_window" id="location_open_quants"> <!-- Used in location -->
+ <field name="context">{'search_default_productgroup': 1}</field>
+ <field name="domain">[('location_id', 'child_of', active_ids)]</field>
+ <field name="name">Current Stock</field>
+ <field name="res_model">stock.quant</field>
+ </record>
+
+ <record id="quant_package_search_view" model="ir.ui.view">
+ <field name="name">stock.quant.package.search</field>
+ <field name="model">stock.quant.package</field>
+ <field eval="10" name="priority"/>
+ <field name="arch" type="xml">
+ <search string="Package">
+ <field name="name" string="Package Name"/>
+ <field name="location_id"/>
+ <field name="packaging_id"/>
+ <group expand='0' string='Group by...'>
+ <filter string='Location' name="location" domain="[]" context="{'group_by' : 'location_id'}"/>
+ <filter string='Packaging' name="packaging" domain="[]" context="{'group_by' : 'packaging_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_quant_package_form">
+ <field name="name">stock.quant.package.form</field>
+ <field name="model">stock.quant.package</field>
+ <field eval="10" name="priority"/>
+ <field name="arch" type="xml">
+ <form string="Package">
+ <header>
+ <button name="unpack" string="Unpack" type="object"/>
+ </header>
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ <button class="oe_stat_button" name="action_view_picking"
+ string="Package Transfers" type="object"
+ widget="statinfo" icon="fa-arrows-v"/>
+ </div>
+ <div class="oe_title">
+ <label for="name" string="Package Reference" class="oe_edit_only"/>
+ <h1><field name="name" class="oe_inline"/></h1>
+ </div>
+ <group>
+ <group id='stock.package_location_group'>
+ <field name='company_id' groups="base.group_multi_company"/>
+ <field name='owner_id' groups="stock.group_tracking_owner"/>
+ <field name="location_id" options="{'no_create': True}"/>
+ </group>
+ </group>
+ <separator string="Content"/>
+ <field name="quant_ids">
+ <tree>
+ <field name="product_id"/>
+ <field name="lot_id" groups="stock.group_production_lot"/>
+ <field name="quantity"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ </tree>
+ </field>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_quant_package_tree">
+ <field name="name">stock.quant.package.tree</field>
+ <field name="model">stock.quant.package</field>
+ <field eval="10" name="priority"/>
+ <field name="arch" type="xml">
+ <tree string="Package" sample="1">
+ <field name="display_name"/>
+ <field name="location_id" options="{'no_create': True}"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_quant_package_kanban">
+ <field name="name">stock.quant.package.kanban</field>
+ <field name="model">stock.quant.package</field>
+ <field name="arch" type="xml">
+ <kanban sample="1">
+ <templates>
+ <field name="name"/>
+ <t t-name="kanban-box">
+ <div class="oe_kanban_global_click">
+ <div class="o_kanban_record_top mb0">
+ <strong class="o_kanban_record_title"><field name="name"/></strong>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_package_view">
+ <field name="context">{}</field>
+ <field name="name">Packages</field>
+ <field name="res_model">stock.quant.package</field>
+ <field name="view_mode">kanban,tree,form</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Create a new package
+ </p><p>
+ Packages are usually created via transfers (during pack operation) and can contain different products.
+ Once created, the whole package can be moved at once, or products can be unpacked and moved as single units again.
+ </p>
+ </field>
+ </record>
+
+ <menuitem id="menu_package" name="Packages" parent="menu_stock_inventory_control" action="action_package_view" groups="stock.group_tracking_lot" sequence="102"/>
+ <menuitem id="menu_valuation" name="Inventory Report"
+ parent="stock.menu_warehouse_report" sequence="100"
+ action="action_view_quants"/>
+</odoo>
diff --git a/addons/stock/views/stock_rule_views.xml b/addons/stock/views/stock_rule_views.xml
new file mode 100644
index 00000000..49191b1c
--- /dev/null
+++ b/addons/stock/views/stock_rule_views.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <!--
+ Procurement
+ -->
+
+ <record id="procurement_group_form_view" model="ir.ui.view">
+ <field name="name">procurement.group.form</field>
+ <field name="model">procurement.group</field>
+ <field name="arch" type="xml">
+ <form string="Procurement group">
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ <button name="%(do_view_pickings)d" string="Transfers" type="action" class="oe_stat_button" icon="fa-truck"/>
+ </div>
+ <group>
+ <field name="name"/>
+ <field name="move_type"/>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <!-- Stock Rules -->
+
+ <record id="view_stock_rule_filter" model="ir.ui.view">
+ <field name="name">stock.rule.select</field>
+ <field name="model">stock.rule</field>
+ <field name="arch" type="xml">
+ <search string="Search Procurement">
+ <field name="name"/>
+ <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
+ <group expand='0' string='Group by...'>
+ <filter string='Route' name="groupby_route" context="{'group_by': 'route_id'}"/>
+ <filter string='Warehouse' name="groupby_warehouse" context="{'group_by': 'warehouse_id'}" groups="stock.group_stock_multi_warehouses"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <!-- <Rules> -->
+ <record id="view_stock_rule_tree" model="ir.ui.view">
+ <field name="name">stock.rule.tree</field>
+ <field name="model">stock.rule</field>
+ <field name="arch" type="xml">
+ <tree string="Rules">
+ <field name="action"/>
+ <field name="location_src_id" options="{'no_create': True}"/>
+ <field name="location_id" options="{'no_create': True}"/>
+ <field name="route_id"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_stock_rule_form" model="ir.ui.view">
+ <field name="name">stock.rule.form</field>
+ <field name="model">stock.rule</field>
+ <field name="arch" type="xml">
+ <form string="Rules">
+ <sheet>
+ <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
+ <div class="oe_title">
+ <label for="name" class="oe_edit_only"/>
+ <h1><field name="name"/></h1>
+ </div>
+ <group>
+ <group>
+ <field name="active" invisible="1"/>
+ <field name="picking_type_code_domain" invisible="1"/>
+ <field name="action"/>
+ <field name="picking_type_id"/>
+ <field name="location_src_id" options="{'no_create': True}" attrs="{'required': [('action', 'in', ['pull', 'push', 'pull_push'])]}"/>
+ <field name="location_id" options="{'no_create': True}"/>
+ <field name="auto" attrs="{'invisible': [('action', 'not in', ['push', 'pull_push'])]}"/>
+ <field name="procure_method" attrs="{'invisible': [('action', 'not in', ['pull', 'pull_push'])]}"/>
+ </group>
+ <group>
+ <div colspan="2">
+ <label for="rule_message" invisible="1"/>
+ <div>
+ <field name="rule_message" readonly="1"/>
+ </div>
+ </div>
+ </group>
+ </group>
+ <group>
+ <group name="apply_on" string="Applicability">
+ <field name="route_id"/>
+ <field name="warehouse_id" attrs="{'invisible': [('action', '=', 'push')]}" groups="base.group_no_one"/>
+ <field name="route_company_id" invisible="1"/>
+ <field name="company_id" options="{'no_create': True}" attrs="{'required': [('action', '=', 'push')]}" groups="base.group_multi_company"/>
+ <field name="sequence" string="Sequence" groups="base.group_no_one"/>
+ </group>
+ <group name="propagation_group" string="Propagation" attrs="{'invisible': [('action', '=', 'push')]}" groups="base.group_no_one">
+ <field name="group_propagation_option"/>
+ <field name="group_id" attrs="{'invisible': [('group_propagation_option', '!=', 'fixed')], 'required': [('group_propagation_option', '=', 'fixed')]}"/>
+ <field name="propagate_cancel"/>
+ <field name="propagate_warehouse_id"/>
+ </group>
+ <group string="Options" attrs="{'invisible': [('action', 'not in', ['pull', 'push', 'pull_push'])]}">
+ <field name="partner_address_id" attrs="{'invisible': [('action', '=', 'push')]}"/>
+ <label for="delay"/>
+ <div><field name="delay" class="oe_inline"/> days</div>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <!-- Form view for route -->
+
+ <record id="view_route_rule_form" model="ir.ui.view">
+ <field name="name">stock.rule.form</field>
+ <field name="model">stock.rule</field>
+ <field name="mode">primary</field>
+ <field name="inherit_id" ref="stock.view_stock_rule_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='route_id']" position="replace"></xpath>
+ <xpath expr="//group[@name='apply_on']" position="attributes">
+ <attribute name="groups">base.group_multi_company,base.group_no_one</attribute>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="action_rules_form" model="ir.actions.act_window">
+ <field name="name">Rules</field>
+ <field name="res_model">stock.rule</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem action="action_rules_form" id="menu_action_rules_form"
+ parent="menu_warehouse_config" sequence="2" groups="stock.group_adv_location"/>
+
+ </data>
+</odoo>
diff --git a/addons/stock/views/stock_scrap_views.xml b/addons/stock/views/stock_scrap_views.xml
new file mode 100644
index 00000000..514118d1
--- /dev/null
+++ b/addons/stock/views/stock_scrap_views.xml
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="stock_scrap_search_view" model="ir.ui.view">
+ <field name="name">stock.scrap.search</field>
+ <field name="model">stock.scrap</field>
+ <field name="arch" type="xml">
+ <search string="Search Scrap">
+ <field name="name" string="Reference"/>
+ <field name="product_id"/>
+ <field name="location_id"/>
+ <field name="scrap_location_id"/>
+ <field name="create_date"/>
+ <group expand="0" string="Group By">
+ <filter string="Product" name="product" domain="[]" context="{'group_by':'product_id'}"/>
+ <filter string="Location" name="location" domain="[]" context="{'group_by':'location_id'}"/>
+ <filter string="Scrap Location" name="scrap_location" domain="[]" context="{'group_by':'scrap_location_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="stock_scrap_form_view" model="ir.ui.view">
+ <field name="name">stock.scrap.form</field>
+ <field name="model">stock.scrap</field>
+ <field name="arch" type="xml">
+ <form string="Scrap">
+ <header>
+ <button name="action_validate" states="draft" string="Validate" type="object" class="oe_highlight" context="{'not_unlink_on_discard': True}"/>
+ <field name="state" widget="statusbar" statusbar_visible="draft,done" />
+ </header>
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ <button class="oe_stat_button" name="action_get_stock_picking"
+ string="Stock Operation" type="object"
+ attrs="{'invisible':[('picking_id','=',False)]}" icon="fa-cogs"/>
+ <field name="picking_id" invisible="1"/>
+ <button class="oe_stat_button" name="action_get_stock_move_lines"
+ string="Product Moves" type="object"
+ attrs="{'invisible':[('move_id','=',False)]}" icon="fa-exchange"/>
+ <field name="move_id" invisible="1"/>
+ </div>
+ <div class="oe_title">
+ <h1><field name="name" nolabel="1"/></h1>
+ </div>
+ <group>
+ <group>
+ <field name="product_id" context="{'default_type': 'product'}"/>
+ <label for="scrap_qty"/>
+ <div class="o_row">
+ <field name="scrap_qty"/>
+ <field name="product_uom_category_id" invisible="1"/>
+ <field name="product_uom_id" groups="uom.group_uom" force_save="1"/>
+ </div>
+ </group>
+ <group>
+ <field name="lot_id" attrs="{'invisible': ['|',('product_id', '=', False),('tracking', '=', 'none')], 'required': [('tracking', '!=', 'none')]}" groups="stock.group_production_lot"/>
+ <field name="tracking" invisible="1"/>
+ <field name="package_id" groups="stock.group_tracking_lot"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"/>
+ <field name="location_id" options="{'no_create': True, 'no_open': True}" groups="stock.group_stock_multi_locations" force_save="1"/>
+ <field name="scrap_location_id" options="{'no_create': True, 'no_open': True}" groups="stock.group_stock_multi_locations" force_save="1"/>
+ <field name="origin"/>
+ <field name="date_done" attrs="{'invisible': [('state', '=', 'draft')]}"/>
+ <field name="picking_id" attrs="{'invisible': [('picking_id', '=', False)]}"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </group>
+ </group>
+ </sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids"/>
+ <field name="message_ids"/>
+ </div>
+ </form>
+ </field>
+ </record>
+
+ <record id="stock_scrap_view_kanban" model="ir.ui.view">
+ <field name="name">stock.scrap.kanban</field>
+ <field name="model">stock.scrap</field>
+ <field name="arch" type="xml">
+ <kanban class="o_kanban_mobile" sample="1">
+ <field name="name"/>
+ <field name="product_id"/>
+ <field name="date_done"/>
+ <field name="scrap_qty"/>
+ <field name="state"/>
+ <templates>
+ <t t-name="kanban-box">
+ <div class="oe_kanban_global_click">
+ <div class="row mb4">
+ <strong class="col-6">
+ <span t-esc="record.name.value"/>
+ </strong>
+ <strong t-if="record.date_done.value" class="col-6 text-right">
+ <i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/><span t-esc="record.date_done.value"/>
+ </strong>
+ <div class="col-12">
+ <span t-esc="record.product_id.value"/>
+ </div>
+ <div class="col-6">
+ <span t-esc="record.scrap_qty.value"/>
+ </div>
+ <div class="col-6">
+ <span class="float-right badge badge-secondary">
+ <field name="state"/>
+ </span>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record id="stock_scrap_tree_view" model="ir.ui.view">
+ <field name="name">stock.scrap.tree</field>
+ <field name="model">stock.scrap</field>
+ <field name="arch" type="xml">
+ <tree multi_edit="1" sample="1">
+ <field name="name" decoration-bf="1"/>
+ <field name="date_done"/>
+ <field name="product_id" readonly="1"/>
+ <field name="scrap_qty"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ <field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
+ <field name="scrap_location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
+ <field name="company_id" readonly="1" groups="base.group_multi_company"/>
+ <field name="state" widget="badge" decoration-success="state == 'done'" decoration-info="state == 'draft'"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_stock_scrap">
+ <field name="name">Scrap Orders</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">stock.scrap</field>
+ <field name="view_mode">tree,form,kanban</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Scrap products
+ </p><p>
+ Scrapping a product will remove it from your stock. The product will
+ end up in a scrap location that can be used for reporting purpose.
+ </p>
+ </field>
+ </record>
+
+ <record id="stock_scrap_form_view2" model="ir.ui.view">
+ <field name="name">stock.scrap.form2</field>
+ <field name="model">stock.scrap</field>
+ <field name="arch" type="xml">
+ <form string="Scrap">
+ <group>
+ <group>
+ <field name="state" invisible="1"/>
+ <field name="product_id" options="{'no_create': True}" domain="[('id', 'in', context.get('product_ids', []))]"/>
+ <label for="scrap_qty"/>
+ <div class="o_row">
+ <field name="scrap_qty"
+ attrs="{'readonly': [('tracking', '=', 'serial')]}"/>
+ <field name="product_uom_category_id" invisible="1"/>
+ <field name="product_uom_id" groups="uom.group_uom"/>
+ </div>
+ </group>
+ <group>
+ <field name="picking_id" invisible="1"/>
+ <field name="tracking" invisible="1"/>
+ <field name="lot_id" groups="stock.group_production_lot"
+ context="{'default_company_id': company_id, 'default_product_id': product_id}"
+ attrs="{'invisible': ['|',('product_id', '=', False),('tracking', '=', 'none')], 'required': [('tracking', '!=', 'none')]}"/>
+ <field name="package_id" groups="stock.group_tracking_lot"/>
+ <field name="owner_id" groups="stock.group_tracking_owner"/>
+ <field name="company_id" invisible="1"/>
+ <field name="location_id" groups="stock.group_stock_multi_locations" options="{'no_open': True, 'no_create': True}"/>
+ <field name="scrap_location_id" groups="stock.group_stock_multi_locations" options="{'no_open': True, 'no_create': True}" />
+ </group>
+ </group>
+ <footer>
+ <button name="action_validate" string="Done" type="object" class="btn-primary"/>
+ <button string="Cancel" class="btn-secondary" special="cancel" />
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <menuitem
+ id="menu_stock_scrap"
+ name="Scrap"
+ parent="menu_stock_warehouse_mgmt"
+ action="action_stock_scrap"
+ sequence="99"/>
+
+</odoo>
diff --git a/addons/stock/views/stock_template.xml b/addons/stock/views/stock_template.xml
new file mode 100644
index 00000000..58a4a56e
--- /dev/null
+++ b/addons/stock/views/stock_template.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <template id="stock_assets_backend" name="mrp_workorder assets" inherit_id="web.assets_backend">
+ <xpath expr="." position="inside">
+ <script type="text/javascript" src="/stock/static/src/js/inventory_report_list_controller.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/inventory_report_list_view.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/inventory_singleton_list_controller.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/inventory_singleton_list_view.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/inventory_validate_button_controller.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/inventory_validate_button_view.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/report_stock_forecasted.js"/>
+ <script type="text/javascript" src="/stock/static/src/js/stock_orderpoint_list_controller.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/stock_orderpoint_list_model.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/stock_orderpoint_list_view.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/stock_traceability_report_backend.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/stock_traceability_report_widgets.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/popover_widget.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/forecast_widget.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/basic_model.js"></script>
+ <script type="text/javascript" src="/stock/static/src/js/stock_rescheduling_popover.js"></script>
+ <script type="text/javascript" src="/stock/static/tests/tours/stock_report_tests.js"></script>
+ <link rel="stylesheet" type="text/scss" href="/stock/static/src/scss/forecast_widget.scss"/>
+ <link rel="stylesheet" type="text/scss" href="/stock/static/src/scss/stock_traceability_report.scss"/>
+ <link rel="stylesheet" type="text/scss" href="/stock/static/src/scss/stock_empty_screen.scss"/>
+ </xpath>
+ </template>
+
+ <template id="qunit_suite" name="stock tests" inherit_id="web.qunit_suite_tests">
+ <xpath expr="." position="inside">
+ <script type="text/javascript" src="/stock/static/tests/singleton_list_tests.js"/>
+ <script type="text/javascript" src="/stock/static/tests/popover_widget_tests.js"/>
+ <script type="text/javascript" src="/stock/static/tests/stock_traceability_report_backend_tests.js"/>
+ </xpath>
+ </template>
+
+ <template id="message_head">
+ <t t-if="move.state != 'done'">
+ <strong>The initial demand has been updated.</strong>
+ </t>
+ <t t-if="move.state == 'done'">
+ <strong>
+ The done move line has been corrected.
+ </strong>
+ </t>
+ </template>
+
+ <template id="message_body">
+ <ul>
+ <li>
+ <t t-esc="move.product_id.display_name"/>:
+ </li>
+ <t t-if="move.state != 'done'">
+ <t t-if="'product_uom_qty' in vals">
+ <li>
+ Quantity : <t t-esc="move.product_uom_qty"/> -&gt; <t t-esc="float(vals.get('product_uom_qty'))"/>
+ </li>
+ </t>
+ </t>
+ <t t-if="'qty_done' in vals">
+ <li>
+ Quantity : <t t-esc="move.qty_done"/> -&gt; <t t-esc="float(vals.get('qty_done'))"/>
+ </li>
+ </t>
+ <t t-if="'location_id' in vals">
+ <li>
+ Source Location:
+ <t t-if="move.location_id">
+ <t t-esc="move.location_id.name"/> -&gt;
+ </t>
+ <t t-esc="vals['location_name']"/>
+ </li>
+ </t>
+ <t t-if="'location_dest_id' in vals">
+ <li>
+ Destination Location:
+ <t t-if="move.location_dest_id">
+ <t t-esc="move.location_dest_id.name"/> -&gt;
+ </t>
+ <t t-esc="vals['location_dest_name']"/>
+ </li>
+ </t>
+ <t t-if="'lot_name' in vals">
+ <li>
+ Lot/Serial :
+ <t t-if="move.lot_id">
+ <t t-esc="move.lot_id.name"/> -&gt;
+ </t>
+ <t t-esc="vals['lot_name']"/>
+ </li>
+ </t>
+ <t t-if="'package_name' in vals">
+ <li>
+ Source Package :
+ <t t-if="move.package_id">
+ <t t-esc="move.package_id.name"/> -&gt;
+ </t>
+ <t t-esc="vals['package_name']"/>
+ </li>
+ </t>
+ <t t-if="'result_package_name' in vals">
+ <li>
+ Destination Package :
+ <t t-if="move.result_package_id">
+ <t t-esc="move.result_package_id.name"/> -&gt;
+ </t>
+ <t t-esc="vals['result_package_name']"/>
+ </li>
+ </t>
+ <t t-if="'owner_name' in vals">
+ <li>
+ Owner :
+ <t t-if="move.owner_id">
+ <t t-esc="move.owner_id.name"/> -&gt;
+ </t>
+ <t t-esc="vals['owner_name']"/>
+ </li>
+ </t>
+ </ul>
+ </template>
+
+ <template id="track_move_template">
+ <div>
+ <t t-call="stock.message_head"/>
+ <t t-call="stock.message_body"/>
+ </div>
+ </template>
+
+ <template id="exception_on_picking">
+ <div> Exception(s) occurred on the picking
+ <a href="#" data-oe-model="stock.picking" t-att-data-oe-id="origin_picking.id"><t t-esc="origin_picking.name"/></a>.
+ Manual actions may be needed.
+ <div class="mt16">
+ <p>Exception(s):</p>
+ <ul t-foreach="moves_information" t-as="exception">
+ <t t-set="move" t-value="exception[0]"/>
+ <t t-set="new_qty" t-value="exception[1][0]"/>
+ <t t-set="old_qty" t-value="exception[1][1]"/>
+ <li><t t-esc="new_qty"/> <t t-esc="move.product_uom.name"/>
+ of <t t-esc="move.product_id.display_name"/> processed instead of <t t-esc="old_qty"/> <t t-esc="move.product_uom.name"/></li>
+ </ul>
+ </div>
+ <div class="mt16" t-if="impacted_pickings">
+ <p>Next transfer(s) impacted:</p>
+ <ul t-foreach="impacted_pickings" t-as="picking">
+ <li><a href="#" data-oe-model="stock.picking" t-att-data-oe-id="picking.id"><t t-esc="picking.name"/></a></li>
+ </ul>
+ </div>
+ </div>
+ </template>
+</odoo>
diff --git a/addons/stock/views/stock_warehouse_views.xml b/addons/stock/views/stock_warehouse_views.xml
new file mode 100644
index 00000000..c25df973
--- /dev/null
+++ b/addons/stock/views/stock_warehouse_views.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="view_warehouse" model="ir.ui.view">
+ <field name="name">stock.warehouse</field>
+ <field name="model">stock.warehouse</field>
+ <field name="arch" type="xml">
+ <form string="Warehouse">
+ <sheet>
+ <div class="oe_button_box" name="button_box">
+ <button name="action_view_all_routes"
+ string="Routes"
+ icon="fa-refresh"
+ class="oe_stat_button"
+ type="object"/>
+ </div>
+ <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
+ <label for="name" class="oe_edit_only"/>
+ <h1><field name="name"/></h1>
+ <group>
+ <group>
+ <field name="active" invisible="1"/>
+ <field name="code"/>
+ </group>
+ <group>
+ <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
+ <field name="partner_id"/>
+ </group>
+ </group>
+ <notebook colspan="4" groups="stock.group_adv_location">
+ <page string="Warehouse Configuration" name="warehouse_config" colspan="4">
+ <group colspan="4">
+ <group string="Shipments">
+ <field name="reception_steps" widget='radio'/>
+ <field name="delivery_steps" widget='radio'/>
+ </group>
+ <field name="show_resupply" invisible="1"/>
+ <group name="group_resupply" string="Resupply" attrs="{'invisible': [('show_resupply', '!=', True)]}">
+ <field name="warehouse_count" invisible="1"/>
+ <field name="resupply_wh_ids" attrs="{'invisible': [('show_resupply', '!=', True)]}" domain="[('id', '!=', id)]" widget='many2many_checkboxes'/>
+ </group>
+ </group>
+ </page>
+ <page string="Technical Information" name="technical_info" groups='base.group_no_one'>
+ <group>
+ <group string="Locations">
+ <field name="view_location_id" string="Warehouse view location" readonly="1" required="0"/>
+ <field name="lot_stock_id" readonly="1" required="0"/>
+ <field name="wh_input_stock_loc_id" readonly="1"/>
+ <field name="wh_qc_stock_loc_id" readonly="1"/>
+ <field name="wh_pack_stock_loc_id" readonly="1"/>
+ <field name="wh_output_stock_loc_id" readonly="1"/>
+ </group>
+ <group string="Operation Types">
+ <field name="in_type_id" readonly="1"/>
+ <field name="int_type_id" readonly="1"/>
+ <field name="pick_type_id" readonly="1"/>
+ <field name="pack_type_id" readonly="1"/>
+ <field name="out_type_id" readonly="1"/>
+ </group>
+ </group>
+ </page>
+ </notebook>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_warehouse_tree" model="ir.ui.view">
+ <field name="name">stock.warehouse.tree</field>
+ <field name="model">stock.warehouse</field>
+ <field name="arch" type="xml">
+ <tree string="Warehouse">
+ <field name="sequence" widget="handle"/>
+ <field name="name"/>
+ <field name="active" invisible="1"/>
+ <field name="lot_stock_id" groups="stock.group_stock_multi_locations"/>
+ <field name="partner_id"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="stock_warehouse_view_search" model="ir.ui.view">
+ <field name="name">stock.warehouse.search</field>
+ <field name="model">stock.warehouse</field>
+ <field name="arch" type="xml">
+ <search string="Warehouse">
+ <field name="name"/>
+ <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
+ </search>
+ </field>
+ </record>
+
+ <record id="action_warehouse_form" model="ir.actions.act_window">
+ <field name="name">Warehouses</field>
+ <field name="res_model">stock.warehouse</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_id" ref="view_warehouse_tree"/>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Define a new warehouse
+ </p>
+ </field>
+ </record>
+
+ <menuitem action="action_warehouse_form" id="menu_action_warehouse_form"
+ parent="menu_warehouse_config" sequence="1"/>
+
+</odoo>