[MERGE] remove wizard cancel button and make action button red
[odoo/odoo.git] / addons / stock_planning / __openerp__.py
1 # -*- coding: utf-8 -*-
2 ##############################################################################
3 #
4 #    OpenERP, Open Source Management Solution
5 #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6 #
7 #    This program is free software: you can redistribute it and/or modify
8 #    it under the terms of the GNU Affero General Public License as
9 #    published by the Free Software Foundation, either version 3 of the
10 #    License, or (at your option) any later version.
11 #
12 #    This program is distributed in the hope that it will be useful,
13 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #    GNU Affero General Public License for more details.
16 #
17 #    You should have received a copy of the GNU Affero General Public License
18 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 #
20 ##############################################################################
21
22 {
23     "name": "Master Procurement Schedule",
24     "version": "1.2",
25     "author": "OpenERP SA and Grzegorz Grzelak (OpenGLOBE)",
26     "category" : "Manufacturing",
27     "images": ["images/master_procurement_schedule.jpeg","images/sales_forecast.jpeg","images/stock_planning_line.jpeg","images/stock_sales_period.jpeg"],
28     "depends": ["crm", "stock","sale"],
29     "description": """
30 MPS allows to create a manual procurement plan apart of the normal MRP scheduling, which works automatically based on minimum stock rules
31 =========================================================================================================================================
32
33 Quick Glossary
34 --------------
35 - Stock Period - the time boundaries (between Start Date and End Date) for your Sales and Stock forecasts and planning
36 - Sales Forecast - the quantity of products you plan to sell during the related Stock Period.
37 - Stock Planning - the quantity of products you plan to purchase or produce for the related Stock Period.
38
39 To avoid confusion with the terms used by the ``sale_forecast`` module, ("Sales Forecast" and "Planning" are amounts) we use terms "Stock and Sales Forecast" and "Stock Planning" to emphasize that we use quantity values.
40
41 Where to begin
42 --------------
43 Using this module is done in three steps:
44
45  * Create Stock Periods via the Warehouse>Configuration>Stock Periods menu (Mandatory step)
46  * Create Sale Forecasts fill them with forecast quantities, via the Sales>Sales Forecast menu. (Optional step but useful for further planning)
47  * Create the actual MPS plan, check the balance and trigger the procurements as required. The actual procurement is the final step for the Stock Period.
48
49 Stock Period configuration
50 --------------------------
51 You have two menu items for Periods in "Warehouse > Configuration > Stock Periods". There are:
52
53  * "Create Stock Periods" - can automatically creating daily, weekly or monthly periods.
54  * "Stock Periods" - allows to create any type of periods, change the dates and change the state of period.
55
56 Creating periods is the first step. You can create custom periods using the "New" button in "Stock Periods", but it is recommended to use the automatic assistant "Create Stock Periods".
57
58 Remarks:
59
60  - These periods (Stock Periods) are completely distinct from Financial or other periods in the system.
61  - Periods are not assigned to companies (when you use multicompany). 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.
62  - When periods are created automatically their start and finish dates are with start hour 00:00:00 and end hour 23:59:00. 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.
63  - If you use overlapping periods for the same product, warehouse and company results can be unpredictable.
64  - If current date doesn't belong to any period or you have holes between periods results can be unpredictable.
65
66 Sales Forecasts configuration
67 -----------------------------
68 You have few menus for Sales forecast in "Sales > Sales Forecasts":
69
70  - "Create Sales Forecasts" - can automatically create forecast lines according to your needs
71  - "Sales Forecasts" - for managing the Sales forecasts
72
73 Menu "Create Sales Forecasts" creates Forecasts for products from selected Category, for selected Period and for selected Warehouse.
74 It is also possible to copy the previous forecast.
75
76 Remarks:
77
78  - This tool doesn't duplicate lines if you already have an entry for the same Product, Period, Warehouse, created or validated by the same user. If you wish to create another forecast, if relevant lines exists you have to do it manually as described below.
79  - When created lines are validated by someone else you can use this tool to create another line for the same Period, Product and Warehouse.
80  - When you choose "Copy Last Forecast", created line take quantity and other 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.
81
82 On "Sales Forecast" form mainly you have to enter a forecast quantity in "Product Quantity".
83 Further calculation can work for draft forecasts. But validation can save your data against any accidental changes.
84 You can click "Validate" button but it is not mandatory.
85
86 Instead of forecast quantity you may enter the amount of forecast sales via the "Product Amount" field.
87 The system will count quantity from amount according to Sale price of the Product.
88
89 All values on the form are expressed in unit of measure selected on form.
90 You can select a unit of measure from the default category or from secondary category.
91 When you change unit of measure the forecast product quantity will be re-computed according to new UoM.
92
93 To work out your Sale Forecast you can use the "Sales History" of the product.
94 You have to enter parameters to the top and left of this table and system will count sale quantities according to these parameters.
95 So you can get results for a given sales team or period.
96
97
98 MPS or Procurement Planning
99 ---------------------------
100 An MPS planning consists in Stock Planning lines, used to analyze and possibly drive the procurement of 
101 products for each relevant Stock Period and Warehouse.
102 The menu is located in "Warehouse > Schedulers > Master Procurement Schedule":
103
104  - "Create Stock Planning Lines" - a wizard to help automatically create many planning lines
105  - "Master Procurement Schedule" - management of your planning lines
106
107 Similarly to the way Sales forecast serves to define your sales planning, the MPS lets you plan your procurements (Purchase/Manufacturing).
108 You can quickly populate the MPS with the "Create Stock Planning Lines" wizard, and then proceed to review them via the "Master Procurement Schedule" menu.
109
110 The "Create Stock Planning Lines" wizard lets you to quickly create all MPS lines for a given Product Category, and a given Period and Warehouse.
111 When you enable the "All Products with Forecast" option of the wizard, the system creates lines for all products having sales forecast for selected
112 Period and Warehouse (the selected Category will be ignored in this case).
113
114 Under menu "Master Procurement Schedule" you will usually change the "Planned Out" and "Planned In" quantities and observe the resulting "Stock Simulation" value
115 to decide if you need to procure more products for the given Period.
116 "Planned Out" will be initially based on "Warehouse Forecast" which is the sum of all outgoing stock moves already planned for the Period and Warehouse.
117 Of course you can alter this value to provide your own quantities. It is not necessary to have any forecast.
118 "Planned In" quantity is used to calculate field "Incoming Left" which is the quantity to be procured to reach the "Stock Simulation" at the end of Period.
119 You can compare "Stock Simulation" quantity to minimum stock rules visible on the form.
120 And you can plan different quantity than in Minimum Stock Rules. Calculations are done for whole Warehouse by default,
121 if you want to see values for Stock location of calculated warehouse you can check "Stock Location Only".
122
123 When you are satisfied with the "Planned Out", "Planned In" and end of period "Stock Simulation",
124 you can click on "Procure Incoming Left" to create a procurement for the "Incoming Left" quantity.
125 You can decide if procurement will go to the to Stock or Input location of the Warehouse.
126
127 If you don't want to Produce or Buy the product but just transfer the calculated quantity from another warehouse
128 you can click "Supply from Another Warehouse" (instead of "Procure Incoming Left") and the system will
129 create the appropriate picking list (stock moves).
130 You can choose to take the goods from the Stock or the Output location of the source warehouse.
131 Destination location (Stock or Input) in the destination warehouse will be taken as for the procurement case.
132
133 To see update the quantities of "Confirmed In", "Confirmed Out", "Confirmed In Before", "Planned Out Before"
134 and "Stock Simulation" you can press "Calculate Planning".
135
136 All values on the form are expressed in unit of measure selected on form.
137 You can select one of unit of measure from default category or from secondary category.
138 When you change unit of measure the editable quantities will be re-computed according to new UoM. The others will be updated after pressing "Calculate Planning".
139
140 Computation of Stock Simulation quantities
141 ------------------------------------------
142 The Stock Simulation value is the estimated stock quantity at the end of the period.
143 The calculation always starts with the real stock on hand at the beginning of the current period, then
144 adds or subtracts the computed quantities.
145 When you are in the same period (current period is the same as calculated) Stock Simulation is calculated as follows:
146
147 Stock Simulation =
148         Stock of beginning of current Period
149         - Planned Out
150         + Planned In
151
152 When you calculate period next to current:
153
154 Stock Simulation =
155         Stock of beginning of current Period
156         - Planned Out of current Period
157         + Confirmed In of current Period  (incl. Already In)
158         - Planned Out of calculated Period
159         + Planned In of calculated Period .
160
161 As you see the calculated Period is taken the same way as in previous case, but the calculation in the current
162 Period is a little bit different. First you should note that system takes for only Confirmed moves for the
163 current period. This means that you should complete the planning and procurement of the current Period before
164 going to the next one.
165
166 When you plan for future Periods:
167
168 Stock Simulation =
169         Stock of beginning of current Period
170         - Sum of Planned Out of Periods before calculated
171         + Sum of Confirmed In of Periods before calculated (incl. Already In)
172         - Planned Out of calculated Period
173         + Planned In of calculated Period.
174
175 Here "Periods before calculated" designates all periods starting with the current until the period before the one being calculated.
176
177 Remarks:
178
179  - Remember to make the proceed with the planning of each period in chronological order, otherwise the numbers will not reflect the
180    reality
181  - If you planned for future periods and find that real Confirmed Out is larger than Planned Out in some periods before,
182    you can repeat Planning and make another procurement. You should do it in the same planning line.
183    If you create another planning line the suggestions can be wrong.
184  - When you wish to work with different periods for some products, define two kinds of periods (e.g. Weekly and Monthly) and use
185    them for different products. Example: If you use always Weekly periods for Product A, and Monthly periods for Product B
186    all calculations will work correctly. You can also use different kind of periods for the same product from different warehouse
187    or companies. But you cannot use overlapping periods for the same product, warehouse and company because results
188    can be unpredictable. The same applies to Forecasts lines.
189 """,
190     "data": [
191         "security/stock_planning_security.xml",
192         "security/ir.model.access.csv",
193         "stock_planning_view.xml",
194         "wizard/stock_planning_create_periods_view.xml",
195         "wizard/stock_planning_forecast_view.xml",
196         "wizard/stock_planning_createlines_view.xml",
197     ],
198     "test": ["test/stock_planning.yml"],
199     "auto_install": False,
200     "installable": True,
201     "certificate" : "00872589676639788061",
202 }
203 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
204