odoo/addons/stock/views/stock_warehouse_views.xml

216 lines
12 KiB
XML

<?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="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
<button name="action_view_all_routes"
string="Routes"
icon="fa-refresh"
class="oe_stat_button"
type="object"/>
</div>
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<group>
<group>
<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" colspan="4">
<group colspan="4">
<field name="reception_steps" widget='radio'/>
<field name="delivery_steps" widget='radio'/>
<field name="default_resupply_wh_id" widget='selection'/>
<field name="resupply_wh_ids" domain="[('id', '!=', id)]" widget='many2many_checkboxes'/>
</group>
</page>
<page string="Technical Information" groups='base.group_no_one'>
<group>
<group string="Locations">
<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="name"/>
<field name="active" invisible="1"/>
<field name="lot_stock_id" groups="stock.group_stock_multi_locations"/>
<field name="partner_id"/>
</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_type">form</field>
<field name="view_id" ref="view_warehouse_tree"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new warehouse.
</p>
</field>
</record>
<menuitem action="action_warehouse_form" id="menu_action_warehouse_form"
groups="base.group_no_one,stock.group_stock_multi_warehouses"
parent="menu_warehouse_config" sequence="1"/>
<!-- Order Point -->
<record id="do_view_procurement_op" model="ir.actions.act_window">
<field name="name">Procurements</field>
<field name="res_model">procurement.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('orderpoint_id','=',active_id)]</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">
<field name="name"/>
<field name="active" invisible="1"/>
<field name="warehouse_id" groups="stock.group_stock_multi_locations"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="product_id"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
<field name="product_min_qty"/>
<field name="product_max_qty"/>
</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 Rules"/>
<field name="warehouse_id"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="product_id"/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group expand="0" string="Group By">
<filter string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
<filter string="Location" domain="[]" context="{'group_by':'location_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">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
<button name="%(stock.do_view_procurement_op)d" type="action" string="Procurements" class="oe_stat_button" icon="fa-refresh"/>
</div>
<group>
<group>
<field name="name" />
<field name="product_id"/>
</group>
<group>
<field name="warehouse_id" widget="selection" groups="stock.group_stock_multi_locations"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="group_id" groups="stock.group_adv_location"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
</group>
</group>
<group>
<group string="Rules">
<field name="product_min_qty" />
<field name="product_max_qty" />
<field name="qty_multiple" string="Quantity Multiple"/>
</group>
<group string="Misc">
<label for="lead_days"/>
<div class="o_row">
<field name="lead_days"/>
<field name="lead_type"/>
</div>
</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_type">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="oe_view_nocontent_create">
Click to add a reordering rule.
</p><p>You can define your minimum stock rules, so that Odoo will automatically create draft manufacturing orders or request for quotations according to the stock level. Once the virtual stock of a product (= stock on hand minus all confirmed orders and reservations) is below the minimum quantity, Odoo will generate a procurement request to increase the stock up to the maximum quantity.</p>
</field>
</record>
<menuitem
id="menu_reordering_rules_config"
action="action_orderpoint_form"
name="Reordering Rules" parent="menu_stock_inventory_control" sequence="10"/>
<act_window
context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
id="act_stock_warehouse_2_stock_warehouse_orderpoint"
name="Reordering Rules"
res_model="stock.warehouse.orderpoint"
src_model="stock.warehouse"
groups="stock.group_stock_user"/>
</odoo>