[MOV] stock: stock.warehouse.orderpoint own views file
Create a file for stock.warehouse.orderpoint. It's not linked to warehouse so it should not share the same file. Task: 2161378
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
'views/stock_warehouse_views.xml',
|
||||
'views/stock_move_line_views.xml',
|
||||
'views/stock_move_views.xml',
|
||||
'views/stock_orderpoint_views.xml',
|
||||
'views/product_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/report_stock_traceability.xml',
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Order Point -->
|
||||
<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="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" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.tree</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Reordering Rules" multi_edit="1">
|
||||
<field name="name"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="warehouse_id" readonly="1" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="company_id" readonly="1" groups="base.group_multi_company"/>
|
||||
<field name="product_min_qty"/>
|
||||
<field name="product_max_qty"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
</tree>
|
||||
</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="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_form" 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"/>
|
||||
<field name="search_view_id" ref="warehouse_orderpoint_search" />
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a reordering rule
|
||||
</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>
|
||||
|
||||
<menuitem
|
||||
id="menu_reordering_rules_config"
|
||||
action="action_orderpoint_form"
|
||||
name="Reordering Rules" parent="menu_stock_inventory_control" sequence="10"/>
|
||||
</odoo>
|
||||
@@ -131,144 +131,4 @@
|
||||
<menuitem action="action_warehouse_form" id="menu_action_warehouse_form"
|
||||
parent="menu_warehouse_config" sequence="1"/>
|
||||
|
||||
<!-- Order Point -->
|
||||
<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="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" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.tree</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Reordering Rules" multi_edit="1">
|
||||
<field name="name"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="warehouse_id" readonly="1" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="company_id" readonly="1" groups="base.group_multi_company"/>
|
||||
<field name="product_min_qty"/>
|
||||
<field name="product_max_qty"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
</tree>
|
||||
</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="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_form" 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"/>
|
||||
<field name="search_view_id" ref="warehouse_orderpoint_search" />
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a reordering rule
|
||||
</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>
|
||||
|
||||
<menuitem
|
||||
id="menu_reordering_rules_config"
|
||||
action="action_orderpoint_form"
|
||||
name="Reordering Rules" parent="menu_stock_inventory_control" sequence="10"/>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user