odoo/addons/stock_planning/stock_planning_view.xml

348 lines
20 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="menu_stock_period_main"
name="Stock Periods"
parent="stock.menu_stock_configuration" sequence="20"/>
<!-- Periods tree and form section -->
<record id="view_stock_period_form" model="ir.ui.view">
<field name="name">stock.period.form</field>
<field name="model">stock.period</field>
<field name="arch" type="xml">
<form string="Stock Period" version="7.0">
<header>
<button name="button_open" string="Open" states="draft" type="object"/>
<button name="button_close" string="Close" states="open" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open"/>
</header>
<sheet string="Stock Periods">
<group col="4">
<field name="name"/>
<newline/>
<field name="date_start"/>
<field name="date_stop"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_stock_period_tree" model="ir.ui.view">
<field name="name">stock.period.tree</field>
<field name="model">stock.period</field>
<field name="arch" type="xml">
<tree string="Stock and Sales Period" editable="bottom" colors="gray:state == 'close';black:state in ('draft','open')">
<field name="name"/>
<field name="date_start"/>
<field name="date_stop"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_stock_period_search" model="ir.ui.view">
<field name="name">stock.period.search</field>
<field name="model">stock.period</field>
<field name="arch" type="xml">
<search string="Stock Periods">
<field name="name" string="Stock Periods"/>
<field name="date_start"/>
<field name="date_stop"/>
<filter string="Current" domain="[('state','in',['draft','open'])]" icon="terp-check" help="Current Periods"/>
<filter string="Closed" domain="[('state','=','close')]" icon="gtk-stop" help="Closed Periods"/>
</search>
</field>
</record>
<record id="action_stock_period_form" model="ir.actions.act_window">
<field name="name">Stock Periods</field>
<field name="res_model">stock.period</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_stock_period_search"/>
<field name="help">Stock periods are used for stock planning. Stock periods are independent of account periods. You can use wizard for creating periods and review them here.</field>
</record>
<menuitem
id="menu_stock_period"
parent="stock.menu_stock_configuration"
action="action_stock_period_form"
sequence = "25"/>
<record id="view_stock_sale_forecast_form" model="ir.ui.view">
<field name="name">stock.sale.forecast.form</field>
<field name="model">stock.sale.forecast</field>
<field name="arch" type="xml">
<form string="Stock and Sale Forecast" version="7.0">
<header>
<button name="action_validate" string="Approve" states="draft" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar"/>
</header>
<sheet string="Stock and Sales Forecast">
<group colspan = "4" col = "4" class="oe_header">
<group colspan = "2" col="2" >
<field name="company_id"
groups="base.group_multi_company"
widget="selection"
on_change="onchange_company(company_id)"/>
<field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
<field name="period_id" />
<field name="product_id" on_change="product_id_change(product_id)" />
<field name="product_uom_categ" invisible = "True"/>
<field name="product_uos_categ" invisible = "True"/>
<field name="product_uom"
domain = "[('category_id','in',[product_uom_categ,product_uos_categ])]"
on_change = "onchange_uom(product_uom, product_qty, active_uom, product_id)"/>
<field name="active_uom" invisible = "True" />
</group>
<group colspan = "2" col="2" >
<field name="user_id"/>
<field name="product_amt" on_change="product_amt_change(product_amt, product_uom, product_id)" />
<field name="product_qty" />
</group>
</group>
<separator colspan ="4" string="Sales History"/>
<group colspan = "4" col = "5">
<label string = " "/>
<label string = "Per User :"/>
<label string = "Per Department :"/>
<label string = "Per Warehouse :"/>
<label string = ""/>
<label string = "Periods :"/>
<field name="analyzed_user_id" nolabel = "1" domain = "[('company_id','=',company_id)] "/>
<field name="analyzed_team_id" nolabel = "1" />
<field name="analyzed_warehouse_id" nolabel = "1" domain = "[('company_id','=',company_id)] " />
<group colspan = "1" col = "2">
<field name = "analyze_company"/>
</group>
<field name = "analyzed_period1_id" nolabel = "1" />
<field name = "analyzed_period1_per_user" nolabel = "1" />
<field name = "analyzed_period1_per_dept" nolabel = "1" />
<field name = "analyzed_period1_per_warehouse" nolabel = "1" />
<field name = "analyzed_period1_per_company" nolabel = "1"/>
<field name = "analyzed_period2_id" nolabel = "1" />
<field name = "analyzed_period2_per_user" nolabel = "1" />
<field name = "analyzed_period2_per_dept" nolabel = "1" />
<field name = "analyzed_period2_per_warehouse" nolabel = "1" />
<field name = "analyzed_period2_per_company" nolabel = "1" />
<field name = "analyzed_period3_id" nolabel = "1"/>
<field name = "analyzed_period3_per_user" nolabel = "1" />
<field name = "analyzed_period3_per_dept" nolabel = "1" />
<field name = "analyzed_period3_per_warehouse" nolabel = "1" />
<field name = "analyzed_period3_per_company" nolabel = "1" />
<field name = "analyzed_period4_id" nolabel = "1" />
<field name = "analyzed_period4_per_user" nolabel = "1" />
<field name = "analyzed_period4_per_dept" nolabel = "1" />
<field name = "analyzed_period4_per_warehouse" nolabel = "1" />
<field name = "analyzed_period4_per_company" nolabel = "1" />
<field name = "analyzed_period5_id" nolabel = "1" />
<field name = "analyzed_period5_per_user" nolabel = "1" />
<field name = "analyzed_period5_per_dept" nolabel = "1" />
<field name = "analyzed_period5_per_warehouse" nolabel = "1" />
<field name = "analyzed_period5_per_company" nolabel = "1" />
<button name="calculate_sales_history" icon="gtk-execute"
string="Calculate Sales History" type="object" colspan = "1" states="draft" />
</group>
</sheet>
</form>
</field>
</record>
<record id="view_stock_sale_forecast_tree" model="ir.ui.view">
<field name="name">stock.sale.forecast.tree</field>
<field name="model">stock.sale.forecast</field>
<field name="arch" type="xml">
<tree string="Sales Forecasts" colors="gray:state=='validated';black:state=='draft'">
<field name="period_id"/>
<field name="product_id" on_change="product_id_change(product_id)" />
<field name="product_qty"/>
<field name="product_uom" />
<field name="warehouse_id"/>
<field name="company_id"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_stock_sale_forecast_graph" model="ir.ui.view">
<field name="name">stock.sale.forecast.graph</field>
<field name="model">stock.sale.forecast</field>
<field name="arch" type="xml">
<graph string="Stock and Sales Forecast" type = "bar">
<field name="period_id"/>
<field name="product_qty"/>
<field name="product_id"/>
</graph>
</field>
</record>
<!-- Forecast section -->
<menuitem id="menu_stock_sale_forecast" name="Sales Forecasts"
parent="base.menu_base_partner" sequence="5"/>
<record id="view_stock_sale_forecast_filter" model="ir.ui.view">
<field name="name">stock.sale.forecast.list.select</field>
<field name="model">stock.sale.forecast</field>
<field name="arch" type="xml">
<search string="Search Sales Forecast">
<filter icon="terp-camera_test" string="Validated" domain="[('state','=','validated')]" />
<field name="company_id"/>
<field name="warehouse_id" />
<field name="period_id" />
<field name="product_id"/>
<field name="create_uid"/>
<group expand="0" string="Group By...">
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"/>
<filter string="Warehouse " icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}" />
</group>
</search>
</field>
</record>
<record id="action_view_stock_sale_forecast_form" model="ir.actions.act_window">
<field name="name">Sales Forecast</field>
<field name="res_model">stock.sale.forecast</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{"search_default_create_uid":uid}</field>
<field name="help">This quantity sales forecast is an indication for Stock Planner to make procurement manually or to complement automatic procurement. You can use manual procurement with this forecast when some periods are exceptional for usual minimum stock rules.</field>
</record>
<menuitem id="menu_stock_sale_forecast_all"
name="Sales Forecasts"
parent="menu_stock_sale_forecast"
action="action_view_stock_sale_forecast_form"/>
<!-- Planning section -->
<menuitem id="menu_stock_planning_manual" name="Master Procurement Schedule" parent="procurement.menu_stock_sched" sequence="10"/>
<record id="view_stock_planning_form" model="ir.ui.view">
<field name="name">stock.planning.form</field>
<field name="model">stock.planning</field>
<field name="priority">50</field>
<field name="arch" type="xml">
<form string="Stock Planning" version="7.0">
<group>
<group string="General Info">
<field name="company_id" widget="selection"
on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
<field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
<field name="period_id" />
<field name="product_id" on_change="product_id_change(product_id)" />
<field name="product_uom_categ" invisible = "True"/>
<field name="product_uos_categ" invisible = "True"/>
<field name="product_uom"
domain = "[('category_id','in',[product_uom_categ,product_uos_categ])]"
on_change = "onchange_uom(product_uom, product_id, active_uom, planned_outgoing, to_procure)"/>
<field name="active_uom" invisible = "True"/>
<separator string="Current Period Situation" colspan="2"/>
<field name="stock_start"/>
<field name="already_out"/>
<field name="already_in"/>
<separator string="Minimum Stock Rule Indicators" colspan="2"/>
<field name="minimum_op"/>
<field name="maximum_op"/>
<separator string="Forecasts" colspan="2"/>
<field name="warehouse_forecast"/>
<field name="company_forecast"/>
<field name="confirmed_forecasts_only"/>
</group>
<group>
<button name="calculate_planning" string="Compute Planning" type="object" icon="gtk-execute"/>
<separator string="Planning and Situation for Calculated Period" colspan="2"/>
<field name="planned_outgoing"/>
<field name="outgoing"/>
<field name="outgoing_left"/>
<field name="to_procure"/>
<field name="incoming"/>
<label for="incoming_left"/>
<div>
<field name="incoming_left" class="oe_inline"/>
<button name="procure_incomming_left" icon="gtk-convert" string="Make Procurement" type="object" class="oe_inline"/>
<button name="internal_supply" string="Make Picking" help="Supply from Another Warehouse" icon="gtk-convert" type="object" class="oe_inline"/>
</div>
<field name="stock_only"/>
<separator string="Calculated Period Simulation" colspan="2"/>
<field name="outgoing_before"/>
<field name="incoming_before"/>
<field name="stock_simulation"/>
<field name="procure_to_stock"/>
<separator string="Internal Supply" colspan="2"/>
<field name="supply_warehouse_id" domain = "[('company_id','=',company_id)] "/>
<field name="stock_supply_location"/>
</group>
</group>
<group string="Procurement History" colspan="4">
<field name="history" nolabel="1" colspan="4"/>
</group>
</form>
</field>
</record>
<record id="view_stock_planning_filter" model="ir.ui.view">
<field name="name">stock.planning.list.select</field>
<field name="model">stock.planning</field>
<field name="arch" type="xml">
<search string="Search Stock Planning">
<filter icon="terp-purchase" string="No Requisition" domain="[('history','=',False)]" />
<field name="company_id"/>
<field name="warehouse_id"/>
<field name="period_id"/>
<field name="product_id"/>
<group expand="0" string="Group By...">
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"/>
<filter string="Warehouse " icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
</group>
</search>
</field>
</record>
<record id="view_stock_planning_tree" model="ir.ui.view">
<field name="name">stock.planning.tree</field>
<field name="model">stock.planning</field>
<field name="arch" type="xml">
<tree string="Master Procurement Schedule" colors ="blue:line_time=='Past';black:line_time=='Future'">
<field name="period_id"/>
<field name="company_id" invisible="1"/>
<field name="product_id" on_change="product_id_change(product_id)" />
<field name="product_uom"/>
<field name="warehouse_forecast" string="Forecast"/>
<field name="planned_outgoing"/>
<field name="to_procure"/>
<field name="line_time" invisible="1"/>
<field name="stock_simulation" string="Stock"/> <!-- previously stock_start -->
<field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
</tree>
</field>
</record>
<record id="action_view_stock_planning_form" model="ir.actions.act_window">
<field name="name">Master Procurement Schedule</field>
<field name="res_model">stock.planning</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help">The Master Procurement Schedule can be the main driver for warehouse replenishment, or can complement the automatic MRP scheduling (minimum stock rules, etc.).
Each MPS line gives you a pre-computed overview of the incoming and outgoing quantities of a given product for a given Stock Period in a given Warehouse, based on the current and future stock levels,
as well as the planned stock moves. The forecast quantities can be altered manually, and when satisfied with resulting (simulated) Stock quantity, you can trigger the procurement of what is missing to reach your desired quantities</field>
</record>
<menuitem
id="menu_stock_planning"
parent="menu_stock_planning_manual"
action="action_view_stock_planning_form"/>
</data>
</openerp>