MPS improvement for better ergonomy and planning few periods ahead

Registered by Grzegorz Grzelak (

Concerns stock_planning module.
1. We should have two additional functionality to create forecasts and MPS schedules lines quickly. (like "Sales management - Configuration - Create Sales Periods" does for periods).

1. a. Create menu "Sales Management - Sales Forecasts - Create Forecasts". It should be window to select: Period, Product Category, Department and Warehouse. And checkbox: Copy forecast from last period. And according to these settings system should create Sales Forecast lines for combination Period - Department-Product (from category)-Warehouse, entering each Product from given category with forecast from last period. System shouldn't create lines if one already exists for combination Period-Department-Product-Warehouse. It would allow to use this functionality more times when Product Category scope is widened and avoid to create unwanted duplications.

Field Department will be added to the object replacing User (Salesman) field. Also field Warehouse should be added as needed to planning.

For forecast entering it should be more fields for forecasting:
- Sales done from this Warehouse in period of the same duration as period considered up to yesterday.
- Sales done from this Warehouse in period like period considered but year ago
- Sales confirmed from this Warehouse in period of the same duration from today ahead.
- ......

1. b. Create menu "Stock management - Planification - Create MPS lines". It should be a window for: Period, Product Category and Warehouse. After clicking button "Create" system should create MPS lines for indicated Period, Product category and Warehouse not duplicating them (if they already exists).

2. Current system doesn't allow to plan few periods ahead. When we are in September we cannot use MPS for December because system doesn't show us any moves (planned or confirmed) for November. System just takes current Real stock and moves of calculated period. I think that system should count Stock field as follows:
Stock = Current Period Beginning Stock + Confirmed In for MeanPer - Planned Out for MeanPer +Expected In - Planned Out.
where "MeanPer" means Meantime Periods (sum of these field from periods between current and calculated).
When you make plans for next period it will count as now:
Stock = Current Real Stock + 0 - 0 +Expected In - Planned Out.
But when you plan for few periods ahead it will add all confirmed moves before calculated period (system will suppose you already made all plans for periods before calculated one). And system subtract all Planned Out moves from MPS line for periods before calculated. It cannot be Confirmed Out because not all planed out moves for future will be confirmed at the moment. For cases that it is more than one MPS for period MPS should have timestamp field set when MPS goes to status Done. And only the most recent MPS of period should be taken into account.

Field Expected Out is needless. I think creating MPS lines we can fill field Planned Out with greater of values: Sales Forecast or Confirmed Out.

Field name Expected In should be changed to Incoming Left (Consistent with button Procure Incoming Left).
Field name Planned Sales should be changed to Sales Forecast
Field Stock to Stock Simulation.
We should add field minimum stock for aid.

Currently Procure incoming left creates some strange move FROM considered warehouse. I think this move should be not created. Procurement order doesn't require move as I see in mrp module.

When such procurement creates a PO and this PO is confirmed and Approved it is created a move from Supplier to considered Warehouse. And this move is not taken as Confirmed In because it is in state Available. I see in that as Confirmed In are taken only moves in states 'confirmed','waiting','assigned'. Should we do something with that?

I have started to redesign and code module stock_planning according to these blueprint. If someone have any suggestion please write them.

Blueprint information

Grzegorz Grzelak (
Needs approval
Grzegorz Grzelak (
Pending Approval
Series goal:
Proposed for extra-trunk
Beta Available
Milestone target:
milestone icon 6.0
Started by
Grzegorz Grzelak (


======Grzegorz Grzelak 16.01.2011
Hello I have created new blueprint for finishing the module.
link below:


Work Items

This blueprint contains Public information 
Everyone can see this information.