1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem id="menu_stock_period_main"
6 parent="stock.menu_stock_configuration" sequence="20"/>
8 <!-- Periods tree and form section -->
10 <record id="view_stock_period_form" model="ir.ui.view">
11 <field name="name">stock.period.form</field>
12 <field name="model">stock.period</field>
13 <field name="type">form</field>
14 <field name="arch" type="xml">
17 <button name="button_open" string="Open" states="draft" type="object"/>
18 <button name="button_close" string="Close" states="open" type="object"/>
19 <field name="state" widget="statusbar" statusbar_visible="draft,open"/>
21 <sheet string="Stock Periods">
25 <field name="date_start"/>
26 <field name="date_stop"/>
33 <record id="view_stock_period_tree" model="ir.ui.view">
34 <field name="name">stock.period.tree</field>
35 <field name="model">stock.period</field>
36 <field name="type">tree</field>
37 <field name="arch" type="xml">
38 <tree string="Stock and Sales Period" editable="bottom" colors="gray:state == 'close';black:state in ('draft','open')">
40 <field name="date_start"/>
41 <field name="date_stop"/>
42 <field name="state" select="1"/>
47 <record id="view_stock_period_search" model="ir.ui.view">
48 <field name="name">stock.period.search</field>
49 <field name="model">stock.period</field>
50 <field name="type">search</field>
51 <field name="arch" type="xml">
52 <search string="Stock Periods">
53 <field name="name" string="Stock Periods"/>
54 <separator orientation="vertical"/>
55 <field name="date_start"/>
56 <field name="date_stop"/>
57 <separator orientation="vertical"/>
58 <filter string="Current" domain="[('state','in',['draft','open'])]" icon="terp-check" help="Current Periods"/>
59 <filter string="Closed" domain="[('state','=','close')]" icon="gtk-stop" help="Closed Periods"/>
64 <record id="action_stock_period_form" model="ir.actions.act_window">
65 <field name="name">Stock Periods</field>
66 <field name="res_model">stock.period</field>
67 <field name="view_type">form</field>
68 <field name="view_mode">tree,form</field>
69 <field name="search_view_id" ref="view_stock_period_search"/>
70 <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>
75 id="menu_stock_period"
76 parent="stock.menu_stock_configuration"
77 action="action_stock_period_form"
80 <record id="view_stock_sale_forecast_form" model="ir.ui.view">
81 <field name="name">stock.sale.forecast.form</field>
82 <field name="model">stock.sale.forecast</field>
83 <field name="type">form</field>
84 <field name="arch" type="xml">
87 <button name="action_validate" string="Approve" states="draft" type="object" class="oe_highlight"/>
88 <field name="state" widget="statusbar"/>
90 <sheet string="Stock and Sales Forecast" layout="auto">
91 <group colspan = "4" col = "4" class="oe_header">
92 <group colspan = "2" col="2" >
93 <field name="company_id" select="1"
94 groups="base.group_multi_company"
96 on_change="onchange_company(company_id)"/>
97 <field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
98 <field name="period_id" />
99 <field name="product_id" on_change="product_id_change(product_id)" />
100 <field name="product_uom_categ" invisible = "True"/>
101 <field name="product_uos_categ" invisible = "True"/>
102 <field name="product_uom"
103 domain = "[('category_id','in',[product_uom_categ,product_uos_categ])]"
104 on_change = "onchange_uom(product_uom, product_qty, active_uom, product_id)"/>
105 <field name="active_uom" invisible = "True" />
107 <group colspan = "2" col="2" >
108 <field name="user_id"/>
109 <field name="product_amt" on_change="product_amt_change(product_amt, product_uom, product_id)" />
110 <field name="product_qty" />
113 <separator colspan ="4" string="Sales History"/>
114 <group colspan = "4" col = "5">
115 <label string = " "/>
116 <label string = "Per User :"/>
117 <label string = "Per Department :"/>
118 <label string = "Per Warehouse :"/>
120 <label string = "Periods :"/>
121 <field name="analyzed_user_id" nolabel = "1" domain = "[('company_id','=',company_id)] "/>
122 <field name="analyzed_team_id" nolabel = "1" />
123 <field name="analyzed_warehouse_id" nolabel = "1" domain = "[('company_id','=',company_id)] " />
124 <group colspan = "1" col = "2">
125 <field name = "analyze_company"/>
127 <field name = "analyzed_period1_id" nolabel = "1" />
128 <field name = "analyzed_period1_per_user" nolabel = "1" />
129 <field name = "analyzed_period1_per_dept" nolabel = "1" />
130 <field name = "analyzed_period1_per_warehouse" nolabel = "1" />
131 <field name = "analyzed_period1_per_company" nolabel = "1"/>
132 <field name = "analyzed_period2_id" nolabel = "1" />
133 <field name = "analyzed_period2_per_user" nolabel = "1" />
134 <field name = "analyzed_period2_per_dept" nolabel = "1" />
135 <field name = "analyzed_period2_per_warehouse" nolabel = "1" />
136 <field name = "analyzed_period2_per_company" nolabel = "1" />
137 <field name = "analyzed_period3_id" nolabel = "1"/>
138 <field name = "analyzed_period3_per_user" nolabel = "1" />
139 <field name = "analyzed_period3_per_dept" nolabel = "1" />
140 <field name = "analyzed_period3_per_warehouse" nolabel = "1" />
141 <field name = "analyzed_period3_per_company" nolabel = "1" />
142 <field name = "analyzed_period4_id" nolabel = "1" />
143 <field name = "analyzed_period4_per_user" nolabel = "1" />
144 <field name = "analyzed_period4_per_dept" nolabel = "1" />
145 <field name = "analyzed_period4_per_warehouse" nolabel = "1" />
146 <field name = "analyzed_period4_per_company" nolabel = "1" />
147 <field name = "analyzed_period5_id" nolabel = "1" />
148 <field name = "analyzed_period5_per_user" nolabel = "1" />
149 <field name = "analyzed_period5_per_dept" nolabel = "1" />
150 <field name = "analyzed_period5_per_warehouse" nolabel = "1" />
151 <field name = "analyzed_period5_per_company" nolabel = "1" />
152 <button name="calculate_sales_history" icon="gtk-execute"
153 string="Calculate Sales History" type="object" colspan = "1" states="draft" />
160 <record id="view_stock_sale_forecast_tree" model="ir.ui.view">
161 <field name="name">stock.sale.forecast.tree</field>
162 <field name="model">stock.sale.forecast</field>
163 <field name="type">tree</field>
164 <field name="arch" type="xml">
165 <tree string="Sales Forecasts" colors="gray:state=='validated';black:state=='draft'">
166 <field name="period_id"/>
167 <field name="product_id" on_change="product_id_change(product_id)" />
168 <field name="product_qty"/>
169 <field name="product_uom" />
170 <field name="warehouse_id"/>
171 <field name="company_id"/>
172 <field name="state"/>
177 <record id="view_stock_sale_forecast_graph" model="ir.ui.view">
178 <field name="name">stock.sale.forecast.graph</field>
179 <field name="model">stock.sale.forecast</field>
180 <field name="type">graph</field>
181 <field name="arch" type="xml">
182 <graph string="Stock and Sales Forecast" type = "bar">
183 <field name="period_id"/>
184 <field name="product_qty"/>
185 <field name="product_id"/>
190 <!-- Forecast section -->
192 <menuitem id="menu_stock_sale_forecast" name="Sales Forecasts"
193 parent="base.menu_base_partner" sequence="5"/>
195 <record id="view_stock_sale_forecast_filter" model="ir.ui.view">
196 <field name="name">stock.sale.forecast.list.select</field>
197 <field name="model">stock.sale.forecast</field>
198 <field name="type">search</field>
199 <field name="arch" type="xml">
200 <search string="Search Sales Forecast">
201 <filter icon="terp-camera_test" string="Validated" domain="[('state','=','validated')]" />
202 <separator orientation="vertical"/>
203 <field name="company_id"/>
204 <field name="warehouse_id" />
205 <field name="period_id" />
206 <field name="product_id"/>
207 <field name="create_uid"/>
209 <group expand="0" string="Group By...">
210 <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"/>
211 <filter string="Warehouse " icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
212 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
213 <separator orientation="vertical"/>
214 <filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}" />
221 <record id="action_view_stock_sale_forecast_form" model="ir.actions.act_window">
222 <field name="name">Sales Forecast</field>
223 <field name="res_model">stock.sale.forecast</field>
224 <field name="view_type">form</field>
225 <field name="view_mode">tree,form,graph</field>
226 <field name="context">{"search_default_create_uid":uid}</field>
227 <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>
230 <menuitem id="menu_stock_sale_forecast_all"
231 name="Sales Forecasts"
232 parent="menu_stock_sale_forecast"
233 action="action_view_stock_sale_forecast_form"/>
235 <!-- Planning section -->
237 <menuitem id="menu_stock_planning_manual" name="Master Procurement Schedule" parent="procurement.menu_stock_sched" sequence="10"/>
239 <record id="view_stock_planning_form" model="ir.ui.view">
240 <field name="name">stock.planning.form</field>
241 <field name="model">stock.planning</field>
242 <field name="type">form</field>
243 <field name="priority">50</field>
244 <field name="arch" type="xml">
245 <form string="Stock Planning">
246 <group colspan="4" col="7">
247 <group colspan ="3" col="2">
248 <separator colspan ="2" string = "General Info"/>
249 <field name="company_id" select = "1" widget= "selection"
250 on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
251 <field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
252 <field name="period_id" />
253 <field name="product_id" on_change="product_id_change(product_id)" />
254 <field name="product_uom_categ" invisible = "True"/>
255 <field name="product_uos_categ" invisible = "True"/>
256 <field name="product_uom"
257 domain = "[('category_id','in',[product_uom_categ,product_uos_categ])]"
258 on_change = "onchange_uom(product_uom, product_id, active_uom, planned_outgoing, to_procure)"/>
259 <field name="active_uom" invisible = "True" />
260 <separator colspan ="2" string = "Forecasts"/>
261 <field name="warehouse_forecast"/>
262 <field name="company_forecast"/>
263 <field name="confirmed_forecasts_only"/>
265 <group colspan ="2" col="2">
266 <separator colspan ="2" string = "Current Period Situation"/>
267 <field name="stock_start"/>
268 <field name="already_out"/>
269 <field name="already_in"/>
270 <separator colspan ="2" string = "Planning and Situation for Calculated Period"/>
271 <field name="planned_outgoing"/>
272 <field name="outgoing"/>
273 <field name="outgoing_left"/>
274 <field name="to_procure"/>
275 <field name="incoming"/>
276 <field name="incoming_left"/>
277 <button name="calculate_planning" string="Calculate Planning" type="object" icon="gtk-execute" colspan="2"/>
278 <field name="stock_only"/>
280 <group colspan ="2" col="2">
281 <separator colspan ="2" string = "Minimum Stock Rule Indicators"/>
282 <field name="minimum_op"/>
283 <field name="maximum_op"/>
284 <separator colspan ="2" string = "Calculated Period Simulation"/>
285 <field name="outgoing_before"/>
286 <field name="incoming_before"/>
287 <field name="stock_simulation"/>
288 <button name="procure_incomming_left" icon="gtk-convert" string="Procure Incoming Left" type="object" colspan="2"/>
289 <field name="procure_to_stock"/>
290 <separator colspan ="2" string = "Internal Supply"/>
291 <button name="internal_supply" string="Supply from Another Warehouse" icon="gtk-convert" type="object" colspan="2"/>
292 <field name="supply_warehouse_id" domain = "[('company_id','=',company_id)] "/>
293 <field name="stock_supply_location"/>
296 <separator colspan ="4" string = "Procurement History"/>
297 <field name = "history" colspan = "2" nolabel = "1"/>
302 <record id="view_stock_planning_filter" model="ir.ui.view">
303 <field name="name">stock.planning.list.select</field>
304 <field name="model">stock.planning</field>
305 <field name="type">search</field>
306 <field name="arch" type="xml">
307 <search string="Search Stock Planning">
308 <filter icon="terp-purchase" string="No Requisition" domain="[('history','=',False)]" />
309 <separator orientation="vertical"/>
310 <field name="company_id" widget="selection"/>
311 <field name="warehouse_id" widget="selection"/>
312 <field name="period_id" widget="selection"/>
313 <field name="product_id"/>
315 <group expand="0" string="Group By...">
316 <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"/>
317 <filter string="Warehouse " icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
318 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
319 <separator orientation="vertical"/>
326 <record id="view_stock_planning_tree" model="ir.ui.view">
327 <field name="name">stock.planning.tree</field>
328 <field name="model">stock.planning</field>
329 <field name="type">tree</field>
330 <field name="arch" type="xml">
331 <tree string="Master Procurement Schedule" colors ="blue:line_time=='Past';black:line_time=='Future'">
332 <field name="period_id"/>
333 <field name="company_id" invisible="1"/>
334 <field name="product_id" on_change="product_id_change(product_id)" />
335 <field name="product_uom"/>
336 <field name="warehouse_forecast" string="Forecast"/>
337 <field name="planned_outgoing"/>
338 <field name="to_procure"/>
339 <field name="line_time" invisible="1"/>
340 <field name="stock_simulation" string="Stock"/> <!-- previously stock_start -->
341 <field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
346 <record id="action_view_stock_planning_form" model="ir.actions.act_window">
347 <field name="name">Master Procurement Schedule</field>
348 <field name="res_model">stock.planning</field>
349 <field name="type">ir.actions.act_window</field>
350 <field name="view_type">form</field>
351 <field name="view_mode">tree,form</field>
352 <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.).
353 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,
354 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>
358 id="menu_stock_planning"
359 parent="menu_stock_planning_manual"
360 action="action_view_stock_planning_form"/>