[IMP] hr_recruitment, project: better access rules for categories
[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
36       your Sales and Stock forecasts and planning
37     - Sales Forecast - the quantity of products you plan to sell during the
38       related Stock Period.
39     - Stock Planning - the quantity of products you plan to purchase or produce
40       for the related Stock Period.
41
42 To avoid confusion with the terms used by the ``sale_forecast`` module,
43 ("Sales Forecast" and "Planning" are amounts) we use terms "Stock and Sales
44 Forecast" and "Stock Planning" to emphasize that we use quantity values.
45
46 Where to begin:
47 ---------------
48 Using this module is done in three steps:
49     * Create Stock Periods via the Warehouse>Configuration>Stock Periods menu
50       (Mandatory step)
51     * Create Sale Forecasts fill them with forecast quantities, via the
52       Sales > Sales Forecast menu. (Optional step but useful for further planning)
53     * Create the actual MPS plan, check the balance and trigger the procurements
54       as required. The actual procurement is the final step for the Stock Period.
55
56 Stock Period configuration:
57 ---------------------------
58 You have two menu items for Periods in "Warehouse > Configuration > Stock Periods".
59 There are:
60     * "Create Stock Periods" - can automatically creating daily, weekly or
61       monthly periods.
62     * "Stock Periods" - allows to create any type of periods, change the dates
63       and change the state of period.
64
65 Creating periods is the first step. You can create custom periods using the "New"
66 button in "Stock Periods", but it is recommended to use the automatic assistant
67 "Create Stock Periods".
68
69 Remarks:
70     - These periods (Stock Periods) are completely distinct from Financial or
71       other periods in the system.
72     - Periods are not assigned to companies (when you use multicompany). Module
73       suppose that you use the same periods across companies. If you wish to use
74       different periods for different companies define them as you wish (they can
75       overlap). Later on in this text will be indications how to use such periods.
76     - When periods are created automatically their start and finish dates are with
77       start hour 00:00:00 and end hour 23:59:00. When you create daily periods they
78       will have start date 31.01.2010 00:00:00 and end date 31.01.2010 23:59:00.
79       It works only in automatic creation of periods. When you create periods
80       manually you have to take care about hours because you can have incorrect
81       values form sales or stock.
82     - If you use overlapping periods for the same product, warehouse and company
83       results can be unpredictable.
84     - If current date doesn't belong to any period or you have holes between
85       periods results can be unpredictable.
86
87 Sales Forecasts configuration:
88 ------------------------------
89 You have few menus for Sales forecast in "Sales > Sales Forecasts":
90     - "Create Sales Forecasts" - can automatically create forecast lines
91       according to your needs
92     - "Sales Forecasts" - for managing the Sales forecasts
93
94 Menu "Create Sales Forecasts" creates Forecasts for products from selected
95 Category, for selected Period and for selected Warehouse.
96 It is also possible to copy the previous forecast.
97
98 Remarks:
99     - This tool doesn't duplicate lines if you already have an entry for the same
100       Product, Period, Warehouse, created or validated by the same user. If you
101       wish to create another forecast, if relevant lines exists you have to do it
102       manually as described below.
103     - When created lines are validated by someone else you can use this tool to
104       create another line for the same Period, Product and Warehouse.
105     - When you choose "Copy Last Forecast", created line take quantity and other
106       settings from your (validated by you or created by you if not validated yet)
107       forecast which is for last period before period of created forecast.
108
109 On "Sales Forecast" form mainly you have to enter a forecast quantity in
110 "Product Quantity". Further calculation can work for draft forecasts. But
111 validation can save your data against any accidental changes. You can click
112 "Validate" button but it is not mandatory.
113
114 Instead of forecast quantity you may enter the amount of forecast sales via the
115 "Product Amount" field. The system will count quantity from amount according to
116 Sale price of the Product.
117
118 All values on the form are expressed in unit of measure selected on form. You can
119 select a unit of measure from the default category or from secondary category.
120 When you change unit of measure the forecast product quantity will be re-computed
121 according to new UoM.
122
123 To work out your Sale Forecast you can use the "Sales History" of the product.
124 You have to enter parameters to the top and left of this table and system will
125 count sale quantities according to these parameters. So you can get results for
126 a given sales team or period.
127
128
129 MPS or Procurement Planning:
130 ----------------------------
131 An MPS planning consists in Stock Planning lines, used to analyze and possibly
132 drive the procurement of products for each relevant Stock Period and Warehouse.
133 The menu is located in "Warehouse > Schedulers > Master Procurement Schedule":
134
135     - "Create Stock Planning Lines" - a wizard to help automatically create many
136       planning lines
137     - "Master Procurement Schedule" - management of your planning lines
138
139 Similarly to the way Sales forecast serves to define your sales planning, the MPS
140 lets you plan your procurements (Purchase/Manufacturing).You can quickly populate
141 the MPS with the "Create Stock Planning Lines" wizard, and then proceed to review
142 them via the "Master Procurement Schedule" menu.
143
144 The "Create Stock Planning Lines" wizard lets you to quickly create all MPS lines
145 for a given Product Category, and a given Period and Warehouse.When you enable
146 the "All Products with Forecast" option of the wizard, the system creates lines
147 for all products having sales forecast for selected Period and Warehouse (the
148 selected Category will be ignored in this case).
149
150 Under menu "Master Procurement Schedule" you will usually change the "Planned Out"
151 and "Planned In" quantities and observe the resulting "Stock Simulation" value
152 to decide if you need to procure more products for the given Period. "Planned Out"
153 will be initially based on "Warehouse Forecast" which is the sum of all outgoing
154 stock moves already planned for the Period and Warehouse. Of course you can alter
155 this value to provide your own quantities. It is not necessary to have any forecast.
156 "Planned In" quantity is used to calculate field "Incoming Left" which is the
157 quantity to be procured to reach the "Stock Simulation" at the end of Period. You
158 can compare "Stock Simulation" quantity to minimum stock rules visible on the form.
159 And you can plan different quantity than in Minimum Stock Rules. Calculations are
160 done for whole Warehouse by default, if you want to see values for Stock location
161 of calculated warehouse you can check "Stock Location Only".
162
163 When you are satisfied with the "Planned Out", "Planned In" and end of period
164 "Stock Simulation", you can click on "Procure Incoming Left" to create a
165 procurement for the "Incoming Left" quantity. You can decide if procurement will
166 go to the to Stock or Input location of the Warehouse.
167
168 If you don't want to Produce or Buy the product but just transfer the calculated
169 quantity from another warehouse you can click "Supply from Another Warehouse"
170 (instead of "Procure Incoming Left") and the system will create the appropriate
171 picking list (stock moves). You can choose to take the goods from the Stock or
172 the Output location of the source warehouse. Destination location (Stock or Input)
173 in the destination warehouse will be taken as for the procurement case.
174
175 To see update the quantities of "Confirmed In", "Confirmed Out", "Confirmed In
176 Before", "Planned Out Before" and "Stock Simulation" you can press "Calculate
177 Planning".
178
179 All values on the form are expressed in unit of measure selected on form. You can
180 select one of unit of measure from default category or from secondary category.
181 When you change unit of measure the editable quantities will be re-computed
182 according to new UoM. The others will be updated after pressing "Calculate Planning".
183
184 Computation of Stock Simulation quantities:
185 -------------------------------------------
186 The Stock Simulation value is the estimated stock quantity at the end of the
187 period. The calculation always starts with the real stock on hand at the beginning
188 of the current period, then adds or subtracts the computed quantities.
189 When you are in the same period (current period is the same as calculated) Stock
190 Simulation is calculated as follows:
191
192 Stock Simulation = Stock of beginning of current Period - Planned Out + Planned In
193
194 When you calculate period next to current:
195
196 Stock Simulation = Stock of beginning of current Period - Planned Out of current Period
197     + Confirmed In of current Period  (incl. Already In) - Planned Out of calculated Period
198     + Planned In of calculated Period .
199
200 As you see the calculated Period is taken the same way as in previous case, but
201 the calculation in the current Period is a little bit different. First you should
202 note that system takes for only Confirmed moves for the current period. This means
203 that you should complete the planning and procurement of the current Period before
204 going to the next one.
205
206 When you plan for future Periods:
207
208 Stock Simulation = Stock of beginning of current Period
209     - Sum of Planned Out of Periods before calculated
210     + Sum of Confirmed In of Periods before calculated (incl. Already In) 
211     - Planned Out of calculated Period
212     + Planned In of calculated Period.
213
214 Here "Periods before calculated" designates all periods starting with the current
215 until the period before the one being calculated.
216
217 Remarks:
218
219     - Remember to make the proceed with the planning of each period in chronological
220       order, otherwise the numbers will not reflect the reality
221     - If you planned for future periods and find that real Confirmed Out is larger
222       than Planned Out in some periods before, you can repeat Planning and make
223       another procurement. You should do it in the same planning line. If you
224       create another planning line the suggestions can be wrong.
225     - When you wish to work with different periods for some products, define two
226       kinds of periods (e.g. Weekly and Monthly) and use them for different
227       products. Example: If you use always Weekly periods for Product A, and
228       Monthly periods for Product B all calculations will work correctly. You
229       can also use different kind of periods for the same product from different
230       warehouse or companies. But you cannot use overlapping periods for the same
231       product, warehouse and company because results can be unpredictable. The
232       same applies to Forecasts lines.
233 """,
234     "data": [
235         "security/stock_planning_security.xml",
236         "security/ir.model.access.csv",
237         "stock_planning_view.xml",
238         "wizard/stock_planning_create_periods_view.xml",
239         "wizard/stock_planning_forecast_view.xml",
240         "wizard/stock_planning_createlines_view.xml",
241     ],
242     "test": ["test/stock_planning.yml"],
243     "auto_install": False,
244     "installable": True,
245     "certificate" : "00872589676639788061",
246 }
247 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
248