[Merge] stock_planing : Merge with https://code.launchpad.net/~grzechu.g/openobject-addons/x_trunk_stock_planning_new
bzr revid: sbh@tinyerp.com-20100315085828-gmlgntpnl03wnpy3
This commit is contained in:
@@ -20,17 +20,122 @@
|
||||
|
||||
{
|
||||
"name":"Master Procurement Schedule",
|
||||
"version":"1.0",
|
||||
"author":"Tiny",
|
||||
"version":"1.1",
|
||||
"author":"Tiny and Grzegorz Grzelak (Cirrus)",
|
||||
"category":"Custom",
|
||||
"depends":["stock","sale"],
|
||||
"depends":["hr","stock","sale"],
|
||||
"description": """
|
||||
This module allows you to manage the planning of procurements based on sales
|
||||
forecasts, confirmed orders (customers and suppliers), stock movements, etc.
|
||||
You can planify expected outputs and inputs for each warehouses. It also works
|
||||
to manage all kind of procurements like purchase orders. That's why it is
|
||||
called Master Procurement Schedule instead of the classic Master Production
|
||||
Schedule therminology.
|
||||
This module is based on original Tiny module stock_planning version 1.0 of the same name Master Procurement Schedule.
|
||||
|
||||
Purpose of MPS is to allow create a manual procurement (requisition) apart of MRP scheduler (which works automatically on minimum stock rules).
|
||||
|
||||
Terms used in the module:
|
||||
- Stock and Sales Period - is the time (between Start Date and End Date) for which you plan Stock and Sales Forecast and make Procurement Planning.
|
||||
- Stock and Sales Forecast - is the quantity of products you plan to sell in the Period.
|
||||
- Stock Planning - is the quantity of products you plan to purchase or produce for the Period.
|
||||
|
||||
Because we have another module sale_forecast which uses terms "Sales Forecast" and "Planning" as amount values we will use terms "Stock and Sales Forecast" and "Stock Planning" to emphasize that we use quantity values.
|
||||
|
||||
Activity with this module is divided to three steps:
|
||||
- Creating Periods. Mandatory step.
|
||||
- Creating Sale Forecasts and entering quantities to them. Optional step but useful for farther planning.
|
||||
- Creating Planning lines, entering quantities to them and making Procurement. Making procurement is the final step for the Period.
|
||||
|
||||
Periods
|
||||
=======
|
||||
You have two menu items for Periods in "Sales Management - Configuration". There are:
|
||||
- "Create Sales Periods" - Which automates creating daily, weekly or monthly periods.
|
||||
- "Stock and sales Periods" - Which allows to create any type of periods, change the dates and change the State of period.
|
||||
|
||||
Creating periods is the first step you have to do to use modules features. You can create custom periods using "New" button in "Stock and Sales Periods" form or view but it is recommended to use automating tool.
|
||||
|
||||
Remarks:
|
||||
- These periods (officially Stock and Sales Periods) are separated of Financial or other periods in the system.
|
||||
- Periods are not assigned to companies (when you use multicompany feature at all). Module suppose that you use the same periods across companies. If you wish to use different periods for different companies define them as you wish (they can overlap). Later on in this text will be indications how to use such periods.
|
||||
- When periods are created automatically their start and finish dates are with with start hour 00:00:00 and end hour 23:59:00. Fe. when you create daily periods they will have start date 31.01.2010 00:00:00 and end date 31.01.2010 23:59:00. It works only in automatic creation of periods. When you create periods manually you have to take care about hours because you can have incorrect values form sales or stock.
|
||||
- If you use overlapping periods for the same product, warehouse and company results can be unpredictable.
|
||||
- If current date doesn't belong to any period or you have holes between periods results can be unpredictable.
|
||||
|
||||
Sales Forecasts
|
||||
===============
|
||||
You have few menus for Sales forecast in "Sales Management - Sales Forecasts".
|
||||
- "Create Sales Forecasts for Sales Periods" - which automates creating forecasts lines according to some parameters.
|
||||
- "Sales Forecasts" - few menus for working with forecasts lists and forms.
|
||||
|
||||
Menu "Create Sales Forecasts for Sales Periods" creates Forecasts for products from selected Category, for selected Period and for selected Warehouse. It is an option "Copy Last Forecast" to copy forecast and other settings of period before this one to created one.
|
||||
|
||||
Remarks:
|
||||
- This tool doesn't create lines if relevant lines (for the same Product, Period, Warehouse and validated or created by you) already exists. If you wish to create another forecast if relevant lines exists you have to do it manually using menus described bellow.
|
||||
- When created lines are validated by someone else you can use this tool to create another lines for the same Period, Product and Warehouse.
|
||||
- When you choose "Copy Last Forecast" created line takes quantity and some settings from your (validated by you or created by you if not validated yet) forecast which is for last period before period of created forecast. If there are few your forecasts for period before this one (it is possible) system takes one of them (no rule which of them).
|
||||
|
||||
|
||||
Menus "Sales Forecasts"
|
||||
On "Sales Forecast" form mainly you have to enter a forecast quantity in "Product Quantity". Farther calculation can work for draft forecasts. But validation can save your data against any accidental changes. You can click "Validate" button but it is not mandatory.
|
||||
|
||||
Instead of forecast quantity you can enter amount of forecast sales in field "Product Amount". System will count quantity from amount according to Sale price of the Product.
|
||||
|
||||
All values on the form are expressed in unit of measure selected on form. You can select one of unit of measure from default category or from second category. When you change unit of measure the quanities will be recalculated according to new UoM: editable values (blue fields) immediately, non edited fields after clicking of "Calculate Planning" button.
|
||||
|
||||
To find proper value for Sale Forecast you can use "Sales History" table for this product. You have to enter parameters to the top and left of this table and system will count sale quantities according to these parameters. So you can select fe. your department (at the top) then (to the left): last period, period before last and period year ago.
|
||||
|
||||
Remarks:
|
||||
|
||||
|
||||
Procurement Planning
|
||||
====================
|
||||
Menu for Planning you can find in "Warehouse - Stock Planning".
|
||||
- "Create Stock Planning Lines" - allows you to automate creating planning lines according to some parameters.
|
||||
- "Master Procurement Scheduler" - is the most important menu of the module which allows to create procurement.
|
||||
|
||||
As Sales forecast is phase of planning sales. The Procurement Planning (Planning) is the phase of scheduling Purchasing or Producing. You can create Procurement Planning quickly using tool from menu "Create Stock Planning Lines", then you can review created planning and make procurement using menu "Master Procurement Schedule".
|
||||
|
||||
Menu "Create Stock Planning Lines" allows you to create quickly Planning lines for products from selected Category, for selected Period, and for selected Warehouse. When you check option "All Products with Forecast" system creates lines for all products having forecast for selected Period and Warehouse. Selected Category will be ignored in this case.
|
||||
|
||||
Under menu "Master Procurement Scheduler" you can generally change the values "Planned Out" and "Planned In" to observe the field "Stock Simulation" and decide if this value would be accurate for end of the Period.
|
||||
"Planned Out" can be based on "Warehouse Forecast" which is the sum of all forecasts for Period and Warehouse. But your planning can be based on any other information you have. It is not necessary to have any forecast.
|
||||
"Planned In" quantity is used to calculate field "Incoming Left" which is the quantity to be procured to make stock as indicated in "Stock Simulation" at the and of Period. You can compare "Stock Simulation" quantity to minimum stock rules visible on the form. But you can plan different quantity than in Minimum Stock Rules. Calculation is made for whole Warehouse by default. But if you want to see values for Stock location of calculated warehouse you can use check box "Stock Location Only".
|
||||
|
||||
If after few tries you decide that you found correct quantities for "Planned Out" and "Planned In" and you are satisfied with end of period stock calculated in "Stock Simulation" you can click "Procure Incoming Left" button to procure quantity of field "Incoming Left" into the Warehouse. System creates appropriate Procurement Order. You can decide if procurement will be made to Stock or Input location of calculated Warehouse.
|
||||
|
||||
If you don't want to Produce or Buy the product but just pick calculated quantity from another warehouse you can click "Supply from Another Warehouse" (instead of "Procure Incoming Left"). System creates pick list with move from selected source Warehouse to calculated Warehouse (as destination). You can also decide if this pick should be done from Stock or Output location of source warehouse. Destination location (Stock or Input) of destination warehouse will be used as set for "Procure Incoming Left".
|
||||
|
||||
To see proper quantities in fields "Confirmed In", "Confirmed Out", "Confirmed In Before", "Planned Out Before" and "Stock Simulation" you have to click button "Calculate Planning".
|
||||
|
||||
All values on the form are expressed in unit of measure selected on form. You can select one of unit of measure from default category or from second category. When you change unit of measure the quanities will be recalculated according to new UoM: editable values (blue fields) immediately, non edited fields after clicking of "Calculate Planning" button.
|
||||
|
||||
How Stock Simulation field is calculated:
|
||||
Generally Stock Simulation shows the stock for end of the calculated period according to some planned or confirmed stock moves. Calculation always starts with quantity of real stock of beginning of current period. Then calculation adds or subtracts quantities of calculated period or periods before calculated.
|
||||
When you are in the same period (current period is the same as calculated) Stock Simulation is calculated as follows:
|
||||
Stock Simulation =
|
||||
Stock of beginning of current Period
|
||||
- Planned Out
|
||||
+ Planned In
|
||||
|
||||
When you calculate period next to current:
|
||||
Stock Simulation =
|
||||
Stock of beginning of current Period
|
||||
- Planned Out of current Period
|
||||
+ Confirmed In of current Period (incl. Already In)
|
||||
- Planned Out of calculated Period
|
||||
+ Planned In of calculated Period .
|
||||
|
||||
As you see calculated Period is taken the same way like in case above. But calculation of current Period are made a little bit different. First you should note that system takes for current Period only Confirmed In moves. It means that you have to make planning and procurement for current Period before this calculation (for Period next to current).
|
||||
|
||||
When you calculate Period ahead:
|
||||
Stock Simulation =
|
||||
Stock of beginning of current Period
|
||||
- Sum of Planned Out of Periods before calculated
|
||||
+ Sum of Confirmed In of Periods before calculated (incl. Already In)
|
||||
- Planned Out of calculated Period
|
||||
+ Planned In of calculated Period.
|
||||
|
||||
Periods before calculated means periods starting from current till period before calculated.
|
||||
|
||||
Remarks:
|
||||
- Remember to make planning for all periods before calculated because omitting these quantities and procurements can cause wrong suggestions for procurements few periods ahead.
|
||||
- If you made planning few periods ahead and you find that real Confirmed Out is bigger than Planned Out in some periods before you can repeat Planning and make another procurement. You should do it in the same planning line. If you create another planning line the suggestions can be wrong.
|
||||
- When you wish to work with different periods for some part of products define two kinds of periods (fe. Weekly and Monthly) and use them for different products. Example: If you use always Weekly periods for Products A, and Monthly periods for Products B your all calculations will work correctly. You can also use different kind of periods for the same products from different warehouse or companies. But you cannot use overlapping periods for the same product, warehouse and company because results can be unpredictable. The same apply to Forecasts lines.
|
||||
""",
|
||||
"demo_xml":[],
|
||||
"update_xml":["security/ir.model.access.csv","stock_planning_view.xml"],
|
||||
|
||||
@@ -1,5 +1,2 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_stock_planning","stock.planning","model_stock_planning","stock.group_stock_user",1,1,1,1
|
||||
"access_stock_planning_period","stock.planning.period","model_stock_planning_period","stock.group_stock_user",1,0,0,0
|
||||
"access_stock_period","stock.period","model_stock_period","stock.group_stock_user",1,0,0,0
|
||||
"access_stock_planning_sale_prevision","stock.planning.sale.prevision","model_stock_planning_sale_prevision","stock.group_stock_user",1,0,0,0
|
||||
"access_stock_planning","stock.planning","model_stock_planning","stock.group_stock_user",1,1,1,1
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_stock_planning_period_form" model="ir.ui.view">
|
||||
<field name="name">stock.planning.period.form</field>
|
||||
<field name="model">stock.planning.period</field>
|
||||
<menuitem id="menu_stock_period_main"
|
||||
name="Stock and Sales Periods"
|
||||
parent="base.menu_base_config"/>
|
||||
|
||||
<!-- Creating periods section -->
|
||||
|
||||
<record id="view_stock_period_createlines_form" model="ir.ui.view">
|
||||
<field name="name">stock.period.createlines.form</field>
|
||||
<field name="model">stock.period.createlines</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock Periods">
|
||||
<separator colspan="4" string="Create periods for Sale Planning"/>
|
||||
<form string="Stock and Sales Periods">
|
||||
<separator colspan="4" string="Create periods for Stock and Sales Planning"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
<separator colspan="4" string=""/>
|
||||
<group col="4" colspan="4">
|
||||
<button special="cancel" string="Cancel" />
|
||||
<group col="3" colspan="4">
|
||||
<button name="create_period" string="Create Daily Periods" type="object"/>
|
||||
<button name="create_period_weekly" string="Create Weekly Periods" type="object"/>
|
||||
<button name="create_period_monthly" string="Create Monthly Periods" type="object"/>
|
||||
@@ -20,30 +25,34 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_stock_planning_period_form" model="ir.actions.act_window">
|
||||
<field name="name">Stock Planning Periods</field>
|
||||
<field name="res_model">stock.planning.period</field>
|
||||
|
||||
<record id="action_stock_period_createlines_form" model="ir.actions.act_window">
|
||||
<field name="name">Stock and Sales Planning Periods</field>
|
||||
<field name="res_model">stock.period.createlines</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_stock_planning_period_form"/>
|
||||
<field name="view_id" ref="view_stock_period_createlines_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_stock_planning_main" name="Sales Planning Periods" parent="base.menu_base_config"/>
|
||||
<menuitem id="menu_stock_planning_period_create" parent="menu_stock_planning_main" action="action_stock_planning_period_form"/>
|
||||
|
||||
|
||||
<menuitem id="menu_stock_period_creatlines"
|
||||
name="Create Stock and Sales Periods"
|
||||
parent="menu_stock_period_main"
|
||||
action="action_stock_period_createlines_form"
|
||||
sequence = "5"/>
|
||||
|
||||
<!-- 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="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock Periods">
|
||||
<field name="name" select="1"/>
|
||||
<form string="Stock and Sales Periods">
|
||||
<field name="name"/>
|
||||
<field name="date_start"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="date_stop"/>
|
||||
<field name="state"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -53,7 +62,7 @@
|
||||
<field name="model">stock.period</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Stock Period" editable="bottom">
|
||||
<tree string="Stock and Sales Period" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
@@ -61,160 +70,346 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_stock_period_form" model="ir.actions.act_window">
|
||||
<field name="name">Stock and Sales Periods</field>
|
||||
<field name="res_model">stock.period</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="menu_stock_period"
|
||||
parent="menu_stock_planning_main"
|
||||
action="action_stock_period_form"/>
|
||||
|
||||
<record id="view_stock_planning_prevision_form" model="ir.ui.view">
|
||||
<field name="name">stock.planning.sale.prevision.form</field>
|
||||
<field name="model">stock.planning.sale.prevision</field>
|
||||
parent="menu_stock_period_main"
|
||||
action="action_stock_period_form"
|
||||
sequence = "10"/>
|
||||
|
||||
<!-- Create Forecast section -->
|
||||
|
||||
<record id="view_stock_sale_forecast_createlines_form" model="ir.ui.view">
|
||||
<field name="name">stock.sale.forecast.createlines</field>
|
||||
<field name="model">stock.sale.forecast.createlines</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Forecast">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="period_id" select="1"/>
|
||||
<field name="product_id" on_change="product_id_change(product_id,product_uom,product_qty,product_amt)" />
|
||||
<field name="product_qty" on_change="product_id_change(product_id,product_uom,product_qty,product_amt)" />
|
||||
<field name="product_amt" on_change="product_id_change(product_id,product_uom,product_qty,product_amt)" />
|
||||
<field name="product_uom" on_change="product_id_change(product_id,product_uom,product_qty,product_amt)" />
|
||||
<field name="amt_sold"/>
|
||||
<field name="state" colspan="2"/>
|
||||
<button name="action_validate" string="Validate" states="draft" type="object" colspan="2"/>
|
||||
<form string="Stock and Sales Forecasts">
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="period_id1" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="warehouse_id1" domain = "[('company_id','=',company_id)] "/>
|
||||
<newline/>
|
||||
<field name="product_categ_id1" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="copy_forecast"/>
|
||||
<separator colspan ="4" string="Forecast lines creation"/>
|
||||
<label colspan ="4" string="Creates forecast lines for selected warehouse and period. Doesn't duplicate existing lines created by you."/>
|
||||
<group colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" name="create_forecast" string="Create Forecasts" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_stock_sale_forecast_createlines_form" model="ir.actions.act_window">
|
||||
<field name="name">Create Stock and Sales Forecasts</field>
|
||||
<field name="res_model">stock.sale.forecast.createlines</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_stock_sale_forecast_createlines_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_stock_sale_forecast" name="Stock and Sales Forecasts" parent="base.menu_base_partner"/>
|
||||
|
||||
<menuitem id="menu_stock_sale_forecast_createlines" name="Create Stock and Sales Forecasts" parent="menu_stock_sale_forecast" action="action_stock_sale_forecast_createlines_form" sequence = "5"/>
|
||||
|
||||
<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="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock and Sales Forecast">
|
||||
<group colspan = "4" col = "4">
|
||||
<group colspan = "2" col="2" >
|
||||
<field name="company_id" select="1"
|
||||
groups="base.group_multi_company"
|
||||
widget="selection"
|
||||
on_change="onchange_company(company_id)"/>
|
||||
<field name="warehouse_id" select="1" domain = "[('company_id','=',company_id)] "/>
|
||||
<field name="period_id" select="1" />
|
||||
<field name="product_id" select="1" 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)"/>
|
||||
<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)" />
|
||||
<field name="product_qty" />
|
||||
<field name="state"/>
|
||||
<button name="action_validate" string="Validate" states="draft" type="object" colspan = "2"/>
|
||||
</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 = "Per Company :"/>
|
||||
<label string = "Periods :"/>
|
||||
<field name="analyzed_user_id" nolabel = "1" domain = "[('company_id','=',company_id)] "/>
|
||||
<field name="analyzed_dept_id" nolabel = "1" domain = "[('company_id','=',company_id)] " />
|
||||
<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>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_planning_prevision_tree" model="ir.ui.view">
|
||||
<field name="name">stock.planning.sale.prevision.tree</field>
|
||||
<field name="model">stock.planning.sale.prevision</field>
|
||||
<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="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sales Forecast" editable="bottom">
|
||||
<field name="user_id" select="1"/>
|
||||
<tree string="Stock and Sales Forecasts" editable="bottom">
|
||||
<field name="warehouse_id" select="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="period_id" select="1"/>
|
||||
<field name="product_id" select="1" on_change="product_id_change(product_id,product_uom)" />
|
||||
<field name="product_id" on_change="product_id_change(product_id)" />
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" on_change="product_id_change(product_id,product_uom)" />
|
||||
<field name="product_uom" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_planning_prevision_filter" model="ir.ui.view">
|
||||
<field name="name">stock.planning.sale.prevision.filter</field>
|
||||
<field name="model">stock.planning.sale.prevision</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sales Forecast">
|
||||
<filter string="Current" domain="[('user_id','=',uid)]" icon="gtk-execute" help="Current Sales Forecasts"/>
|
||||
<field name="period_id" select="1"/>
|
||||
<field name="product_id" select="1"/>
|
||||
<field name="user_id" widget="selection" select="1">
|
||||
<filter domain="[('user_id','=',uid)]" icon="gtk-execute" help="My Forecasts" default="1"/>
|
||||
</field>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_planning_prevision_graph" model="ir.ui.view">
|
||||
<field name="name">stock.planning.sale.prevision.graph</field>
|
||||
<field name="model">stock.planning.sale.prevision</field>
|
||||
<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="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Stock Planning" type = "bar">
|
||||
<field name="product_id" select="1"/>
|
||||
<graph string="Stock and Sales Forecast" type = "bar">
|
||||
<field name="period_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_id"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<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="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Stock and Sales Forecast">
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-purchase" string="Validated" domain="[('state','=','validated')]" separator="1"/>
|
||||
<field name="company_id" select="1" widget="selection"/>
|
||||
<field name="warehouse_id" select="1" widget="selection"/>
|
||||
<field name="period_id" select="1" widget="selection"/>
|
||||
<field name="product_id" select="1" widget="selection"/>
|
||||
<field name="create_uid" select="1" widget="selection">
|
||||
<filter icon="terp-purchase" domain="[('create_uid','=',uid)]" help="My Forecasts"/>
|
||||
</field>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="action_view_stock_planning_prevision_form" model="ir.actions.act_window">
|
||||
<field name="name">Sales Forecast</field>
|
||||
<field name="res_model">stock.planning.sale.prevision</field>
|
||||
<record id="action_view_stock_sale_forecast_form" model="ir.actions.act_window">
|
||||
<field name="name">Stock and 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="search_view_id" ref="view_stock_sale_forecast_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="action_view_stock_planning_prevision_form_my" model="ir.actions.act_window">
|
||||
<field name="name">My Sales Forecasts</field>
|
||||
<field name="res_model">stock.planning.sale.prevision</field>
|
||||
<menuitem id="menu_stock_sale_forecast_all"
|
||||
name="Stock and Sales Forecasts"
|
||||
parent="menu_stock_sale_forecast"
|
||||
action="action_view_stock_sale_forecast_form"/>
|
||||
|
||||
<!-- Create Planning section -->
|
||||
|
||||
<menuitem id="menu_stock_planning_main" name="Stock Planning" parent="stock.menu_stock_root"/>
|
||||
|
||||
<record id="view_stock_planning_createlines_form" model="ir.ui.view">
|
||||
<field name="name">stock.planning.createlines.form</field>
|
||||
<field name="model">stock.planning.createlines</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock Planning">
|
||||
<field name="company_id" widget= "selection" on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="period_id2" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="warehouse_id2" domain = "[('company_id','=',company_id)] "/>
|
||||
<newline/>
|
||||
<field name="forecasted_products"/>
|
||||
<newline/>
|
||||
<field name="product_categ_id2" attrs="{'required':[('forecasted_products','=',0)]}" widget="selection"/>
|
||||
<separator colspan ="4" string="Stock planning lines creation"/>
|
||||
<label colspan ="4" string="Creates planning lines for selected period and warehouse. Doesn't duplicate existing lines created by you."/>
|
||||
<group colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-ok" name="create_planning" string="Create Stock Planning" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_stock_planning_createlines_form" model="ir.actions.act_window">
|
||||
<field name="name">Create Stock Planning Lines</field>
|
||||
<field name="res_model">stock.planning.createlines</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_stock_planning_createlines_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_stock_manual_plannification" name="Procurement Forecast" parent="stock.menu_stock_root"/>
|
||||
|
||||
<menuitem id="menu_stock_prevision" name="Sales Forecasts" parent="base.menu_sales"/>
|
||||
|
||||
<menuitem id="menu_stock_prevision_all" name="Sales Forecasts" parent="menu_stock_prevision" action="action_view_stock_planning_prevision_form"/>
|
||||
|
||||
<!-- <menuitem id="menu_stock_prevision_current" name="Sales Forecast of Current Period" parent="menu_stock_prevision_all" action="action_view_stock_planning_prevision_form"/>-->
|
||||
|
||||
<!-- <menuitem id="menu_stock_prevision_my" name="My Sales Forecasts" parent="menu_stock_prevision" action="action_view_stock_planning_prevision_form_my"/>-->
|
||||
<menuitem
|
||||
id="menu_stock_planning_createlines"
|
||||
parent="menu_stock_planning_main"
|
||||
action="action_stock_planning_createlines_form" sequence = "5"/>
|
||||
|
||||
<!-- Planning section -->
|
||||
|
||||
<!-- <menuitem id="menu_stock_prevision_my_current" name="My Forecasts of Current Period" parent="menu_stock_prevision_my" action="action_view_stock_planning_prevision_form"/>-->
|
||||
|
||||
<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="type">form</field>
|
||||
<field name="priority">50</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock Planning">
|
||||
<separator string="Product Information" colspan="4"/>
|
||||
<group colspan="4">
|
||||
<field name="period_id" select="1"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="product_id" select="1" on_change="product_id_change(product_id,product_uom)" />
|
||||
<field name="product_uom" on_change="product_id_change(product_id,product_uom)" />
|
||||
<group colspan="4" col="7">
|
||||
<group colspan ="3" col="2">
|
||||
<separator colspan ="2" string = "General Info"/>
|
||||
|
||||
<field name="company_id" select = "1" widget= "selection"
|
||||
on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
|
||||
<field name="warehouse_id" select="1" domain = "[('company_id','=',company_id)] " />
|
||||
<field name="period_id" select="1" />
|
||||
<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)"/>
|
||||
<!-- <field name="state"/> -->
|
||||
<separator colspan ="2" string = "Forecasts"/>
|
||||
<field name="warehouse_forecast"/>
|
||||
<field name="company_forecast"/>
|
||||
<field name="confirmed_forecasts_only"/>
|
||||
|
||||
|
||||
</group>
|
||||
<group colspan ="2" col="2">
|
||||
<separator colspan ="2" string = "Current Period Situation"/>
|
||||
<field name="stock_start"/>
|
||||
<field name="already_out"/>
|
||||
<field name="already_in"/>
|
||||
<separator colspan ="2" string = "Planning and Situation for Calculated Period"/>
|
||||
<field name="planned_outgoing"/>
|
||||
<field name="outgoing"/>
|
||||
<field name="outgoing_left"/>
|
||||
<field name="to_procure"/>
|
||||
<field name="incoming"/>
|
||||
<field name="incoming_left"/>
|
||||
<button name="calculate_planning" string="Calculate Planning" type="object" colspan="2"/>
|
||||
<field name="stock_only"/>
|
||||
</group>
|
||||
<group colspan ="2" col="2">
|
||||
<separator colspan ="2" string = "Minimum Stock Rule Indicators"/>
|
||||
<field name="minimum_op"/>
|
||||
<field name="maximum_op"/>
|
||||
<separator colspan ="2" string = "Calculated Period Simulation"/>
|
||||
<field name="outgoing_before"/>
|
||||
<field name="incoming_before"/>
|
||||
<field name="stock_simulation"/>
|
||||
<button name="procure_incomming_left" string="Procure Incoming Left" type="object" colspan="2"/>
|
||||
<field name="procure_to_stock"/>
|
||||
<separator colspan ="2" string = "Internal Supply"/>
|
||||
<button name="internal_supply" string="Supply from Another Warehouse" type="object" colspan="2"/>
|
||||
<field name="supply_warehouse_id" domain = "[('company_id','=',company_id)] "/>
|
||||
<field name="stock_supply_location"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Forecast" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="planned_sale"/>
|
||||
<field name="stock_start"/>
|
||||
<newline/>
|
||||
<field name="planned_outgoing"/>
|
||||
<field name="outgoing"/>
|
||||
<field name="outgoing_left"/>
|
||||
<field name="to_procure"/>
|
||||
<field name="incoming"/>
|
||||
<field name="incoming_left"/>
|
||||
<newline/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<field name="state"/>
|
||||
<button name="procure_incomming_left" states="draft"
|
||||
confirm="Are you sure you want to create a Procurement Order using 'Delta In' quantity, for the given Warehouse?" string="Procure Delta In" type="object"/>
|
||||
<separator colspan ="4" string = "Requisition history"/>
|
||||
<field name = "history" colspan = "2" nolabel = "1"/>
|
||||
</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="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Stock Planning">
|
||||
<group col='10' colspan='4'>
|
||||
<!-- Doesn't work ! <filter icon="terp-purchase" string="Current" domain="[('line_time','=','Future')]" separator="1"/> -->
|
||||
<filter icon="terp-purchase" string="No Requisition" domain="[('history','=',False)]" separator="1"/>
|
||||
<field name="company_id" select="1" widget="selection"/>
|
||||
<field name="warehouse_id" select="1" widget="selection"/>
|
||||
<field name="period_id" select="1" widget="selection"/>
|
||||
<field name="product_id" select="1" widget="selection"/>
|
||||
</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="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Master Procurement Schedule" editable="bottom" colors ="blue:line_time=='Past';black:line_time=='Future'">
|
||||
<field name="period_id" select="1"/>
|
||||
<field name="product_id" select="1" on_change="product_id_change(product_id,product_uom)" />
|
||||
<field name="product_uom" on_change="product_id_change(product_id,product_uom)" />
|
||||
<field name="stock_start" string="Stock Simulation"/>
|
||||
<field name="planned_sale"/>
|
||||
<tree string="Master Procurement Schedule" colors ="blue:line_time=='Past';black:line_time=='Future'">
|
||||
<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"/>
|
||||
<field name="warehouse_forecast" string="Forecast"/>
|
||||
<field name="planned_outgoing"/>
|
||||
<field name="outgoing" />
|
||||
<field name="outgoing_left"/>
|
||||
<field name="to_procure"/>
|
||||
<field name="incoming" string="Confirmed In"/>
|
||||
<field name="incoming_left"/>
|
||||
<field name="line_time"/>
|
||||
<field name="state"/>
|
||||
<field name="stock_simulation" string="Stock"/> <!-- previously stock_start -->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -222,13 +417,15 @@
|
||||
<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="search_view_id" ref="view_stock_planning_filter"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_stock_planning"
|
||||
parent="menu_stock_manual_plannification"
|
||||
parent="menu_stock_planning_main"
|
||||
action="action_view_stock_planning_form"/>
|
||||
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user