1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem id="menu_stock_period_main"
5 name="Stock and Sales Periods"
6 parent="base.menu_base_config"/>
8 <!-- Creating periods section -->
10 <record id="view_stock_period_createlines_form" model="ir.ui.view">
11 <field name="name">stock.period.createlines.form</field>
12 <field name="model">stock.period.createlines</field>
13 <field name="type">form</field>
14 <field name="arch" type="xml">
15 <form string="Stock and Sales Periods">
16 <separator colspan="4" string="Create periods for Stock and Sales Planning"/>
17 <field name="date_start"/>
18 <field name="date_stop"/>
19 <separator colspan="4" string=""/>
20 <group col="3" colspan="4">
21 <button name="create_period" string="Create Daily Periods" type="object"/>
22 <button name="create_period_weekly" string="Create Weekly Periods" type="object"/>
23 <button name="create_period_monthly" string="Create Monthly Periods" type="object"/>
29 <record id="action_stock_period_createlines_form" model="ir.actions.act_window">
30 <field name="name">Stock and Sales Planning Periods</field>
31 <field name="res_model">stock.period.createlines</field>
32 <field name="view_type">form</field>
33 <field name="view_mode">form</field>
34 <field name="view_id" ref="view_stock_period_createlines_form"/>
35 <field name="target">new</field>
38 <menuitem id="menu_stock_period_creatlines"
39 name="Create Stock and Sales Periods"
40 parent="menu_stock_period_main"
41 action="action_stock_period_createlines_form"
44 <!-- Periods tree and form section -->
46 <record id="view_stock_period_form" model="ir.ui.view">
47 <field name="name">stock.period.form</field>
48 <field name="model">stock.period</field>
49 <field name="type">form</field>
50 <field name="arch" type="xml">
51 <form string="Stock and Sales Periods">
53 <field name="date_start"/>
54 <field name="state" select="1"/>
55 <field name="date_stop"/>
60 <record id="view_stock_period_tree" model="ir.ui.view">
61 <field name="name">stock.period.tree</field>
62 <field name="model">stock.period</field>
63 <field name="type">tree</field>
64 <field name="arch" type="xml">
65 <tree string="Stock and Sales Period" editable="bottom">
67 <field name="date_start"/>
68 <field name="date_stop"/>
69 <field name="state" select="1"/>
74 <record id="action_stock_period_form" model="ir.actions.act_window">
75 <field name="name">Stock and Sales Periods</field>
76 <field name="res_model">stock.period</field>
77 <field name="view_type">form</field>
78 <field name="view_mode">tree,form</field>
83 id="menu_stock_period"
84 parent="menu_stock_period_main"
85 action="action_stock_period_form"
88 <!-- Create Forecast section -->
90 <record id="view_stock_sale_forecast_createlines_form" model="ir.ui.view">
91 <field name="name">stock.sale.forecast.createlines</field>
92 <field name="model">stock.sale.forecast.createlines</field>
93 <field name="type">form</field>
94 <field name="arch" type="xml">
95 <form string="Stock and Sales Forecasts">
96 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
98 <field name="period_id1" widget="selection"/>
100 <field name="warehouse_id1" domain = "[('company_id','=',company_id)] "/>
102 <field name="product_categ_id1" widget="selection"/>
104 <field name="copy_forecast"/>
105 <separator colspan ="4" string="Forecast lines creation"/>
106 <label colspan ="4" string="Creates forecast lines for selected warehouse and period. Doesn't duplicate existing lines created by you."/>
108 <button icon="gtk-cancel" special="cancel" string="Cancel"/>
109 <button icon="gtk-execute" name="create_forecast" string="Create Forecasts" type="object" />
115 <record id="action_stock_sale_forecast_createlines_form" model="ir.actions.act_window">
116 <field name="name">Create Stock and Sales Forecasts</field>
117 <field name="res_model">stock.sale.forecast.createlines</field>
118 <field name="view_type">form</field>
119 <field name="view_mode">form</field>
120 <field name="view_id" ref="view_stock_sale_forecast_createlines_form"/>
121 <field name="target">new</field>
124 <menuitem id="menu_stock_sale_forecast" name="Stock and Sales Forecasts" parent="base.menu_base_partner"/>
126 <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"/>
128 <record id="view_stock_sale_forecast_form" model="ir.ui.view">
129 <field name="name">stock.sale.forecast.form</field>
130 <field name="model">stock.sale.forecast</field>
131 <field name="type">form</field>
132 <field name="arch" type="xml">
133 <form string="Stock and Sales Forecast">
134 <group colspan = "4" col = "4">
135 <group colspan = "2" col="2" >
136 <field name="company_id"
137 groups="base.group_multi_company"
139 on_change="onchange_company(company_id)"/>
140 <field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
141 <field name="period_id" />
142 <field name="product_id" on_change="product_id_change(product_id)" />
143 <field name="product_uom_categ" invisible = "True"/>
144 <field name="product_uos_categ" invisible = "True"/>
145 <field name="product_uom"
146 domain = "[('category_id','in',[product_uom_categ,product_uos_categ])]"
147 on_change = "onchange_uom(product_uom, product_qty, active_uom)"/>
148 <field name="active_uom" invisible = "True" />
150 <group colspan = "2" col="2" >
151 <field name="user_id"/>
152 <field name="product_amt" on_change="product_amt_change( product_amt, product_uom)" />
153 <field name="product_qty" />
154 <field name="state"/>
155 <button name="action_validate" string="Validate" states="draft" type="object" colspan = "2"/>
158 <separator colspan ="4" string="Sales history"/>
159 <group colspan = "4" col = "5">
160 <label string = " "/>
161 <label string = "Per User :"/>
162 <label string = "Per Department :"/>
163 <label string = "Per Warehouse :"/>
164 <label string = "Per Company :"/>
165 <label string = "Periods :"/>
166 <field name="analyzed_user_id" nolabel = "1" domain = "[('company_id','=',company_id)] "/>
167 <field name="analyzed_dept_id" nolabel = "1" domain = "[('company_id','=',company_id)] " />
168 <field name="analyzed_warehouse_id" nolabel = "1" domain = "[('company_id','=',company_id)] " />
169 <group colspan = "1" col = "2">
170 <field name = "analyze_company"/>
172 <field name = "analyzed_period1_id" nolabel = "1" />
173 <field name = "analyzed_period1_per_user" nolabel = "1" />
174 <field name = "analyzed_period1_per_dept" nolabel = "1" />
175 <field name = "analyzed_period1_per_warehouse" nolabel = "1" />
176 <field name = "analyzed_period1_per_company" nolabel = "1"/>
177 <field name = "analyzed_period2_id" nolabel = "1" />
178 <field name = "analyzed_period2_per_user" nolabel = "1" />
179 <field name = "analyzed_period2_per_dept" nolabel = "1" />
180 <field name = "analyzed_period2_per_warehouse" nolabel = "1" />
181 <field name = "analyzed_period2_per_company" nolabel = "1" />
182 <field name = "analyzed_period3_id" nolabel = "1"/>
183 <field name = "analyzed_period3_per_user" nolabel = "1" />
184 <field name = "analyzed_period3_per_dept" nolabel = "1" />
185 <field name = "analyzed_period3_per_warehouse" nolabel = "1" />
186 <field name = "analyzed_period3_per_company" nolabel = "1" />
187 <field name = "analyzed_period4_id" nolabel = "1" />
188 <field name = "analyzed_period4_per_user" nolabel = "1" />
189 <field name = "analyzed_period4_per_dept" nolabel = "1" />
190 <field name = "analyzed_period4_per_warehouse" nolabel = "1" />
191 <field name = "analyzed_period4_per_company" nolabel = "1" />
192 <field name = "analyzed_period5_id" nolabel = "1" />
193 <field name = "analyzed_period5_per_user" nolabel = "1" />
194 <field name = "analyzed_period5_per_dept" nolabel = "1" />
195 <field name = "analyzed_period5_per_warehouse" nolabel = "1" />
196 <field name = "analyzed_period5_per_company" nolabel = "1" />
197 <button name="calculate_sales_history" icon="gtk-execute"
198 string="Calculate Sales History" type="object" colspan = "1" states="draft" />
205 <record id="view_stock_sale_forecast_tree" model="ir.ui.view">
206 <field name="name">stock.sale.forecast.tree</field>
207 <field name="model">stock.sale.forecast</field>
208 <field name="type">tree</field>
209 <field name="arch" type="xml">
210 <tree string="Stock and Sales Forecasts" editable="bottom">
211 <field name="warehouse_id"/>
212 <field name="user_id"/>
213 <field name="period_id"/>
214 <field name="product_id" on_change="product_id_change(product_id)" />
215 <field name="product_qty"/>
216 <field name="product_uom" />
221 <record id="view_stock_sale_forecast_graph" model="ir.ui.view">
222 <field name="name">stock.sale.forecast.graph</field>
223 <field name="model">stock.sale.forecast</field>
224 <field name="type">graph</field>
225 <field name="arch" type="xml">
226 <graph string="Stock and Sales Forecast" type = "bar">
227 <field name="period_id"/>
228 <field name="product_qty"/>
229 <field name="product_id"/>
235 <record id="view_stock_sale_forecast_filter" model="ir.ui.view">
236 <field name="name">stock.sale.forecast.list.select</field>
237 <field name="model">stock.sale.forecast</field>
238 <field name="type">search</field>
239 <field name="arch" type="xml">
240 <search string="Search Stock and Sales Forecast">
241 <group col='10' colspan='4'>
242 <filter icon="terp-purchase" string="Validated" domain="[('state','=','validated')]" separator="1"/>
243 <field name="company_id" widget="selection"/>
244 <field name="warehouse_id" widget="selection"/>
245 <field name="period_id" widget="selection"/>
246 <field name="product_id" widget="selection"/>
247 <field name="create_uid" widget="selection">
248 <filter icon="terp-purchase" domain="[('create_uid','=',uid)]" help="My Forecasts"/>
256 <record id="action_view_stock_sale_forecast_form" model="ir.actions.act_window">
257 <field name="name">Stock and Sales Forecast</field>
258 <field name="res_model">stock.sale.forecast</field>
259 <field name="view_type">form</field>
260 <field name="view_mode">tree,form,graph</field>
261 <field name="search_view_id" ref="view_stock_sale_forecast_filter"/>
264 <menuitem id="menu_stock_sale_forecast_all"
265 name="Stock and Sales Forecasts"
266 parent="menu_stock_sale_forecast"
267 action="action_view_stock_sale_forecast_form"/>
269 <!-- Create Planning section -->
271 <menuitem id="menu_stock_planning_main" name="Stock Planning" parent="stock.menu_stock_root"/>
273 <record id="view_stock_planning_createlines_form" model="ir.ui.view">
274 <field name="name">stock.planning.createlines.form</field>
275 <field name="model">stock.planning.createlines</field>
276 <field name="type">form</field>
277 <field name="arch" type="xml">
278 <form string="Stock Planning">
279 <field name="company_id" widget= "selection" on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
281 <field name="period_id2" widget="selection"/>
283 <field name="warehouse_id2" domain = "[('company_id','=',company_id)] "/>
285 <field name="forecasted_products"/>
287 <field name="product_categ_id2" attrs="{'required':[('forecasted_products','=',0)]}" widget="selection"/>
288 <separator colspan ="4" string="Stock planning lines creation"/>
289 <label colspan ="4" string="Creates planning lines for selected period and warehouse. Doesn't duplicate existing lines created by you."/>
291 <button icon="gtk-cancel" special="cancel" string="Cancel"/>
292 <button icon="gtk-ok" name="create_planning" string="Create Stock Planning" type="object"/>
298 <record id="action_stock_planning_createlines_form" model="ir.actions.act_window">
299 <field name="name">Create Stock Planning Lines</field>
300 <field name="res_model">stock.planning.createlines</field>
301 <field name="view_type">form</field>
302 <field name="view_mode">form</field>
303 <field name="view_id" ref="view_stock_planning_createlines_form"/>
304 <field name="target">new</field>
308 id="menu_stock_planning_createlines"
309 parent="menu_stock_planning_main"
310 action="action_stock_planning_createlines_form" sequence = "5"/>
312 <!-- Planning section -->
314 <record id="view_stock_planning_form" model="ir.ui.view">
315 <field name="name">stock.planning.form</field>
316 <field name="model">stock.planning</field>
317 <field name="type">form</field>
318 <field name="priority">50</field>
319 <field name="arch" type="xml">
320 <form string="Stock Planning">
321 <group colspan="4" col="7">
322 <group colspan ="3" col="2">
323 <separator colspan ="2" string = "General Info"/>
325 <field name="company_id" widget= "selection"
326 on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
327 <field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
328 <field name="period_id" />
329 <field name="product_id" on_change="product_id_change(product_id)" />
330 <field name="product_uom_categ" invisible = "True"/>
331 <field name="product_uos_categ" invisible = "True"/>
332 <field name="product_uom"
333 domain = "[('category_id','in',[product_uom_categ,product_uos_categ])]"
334 on_change = "onchange_uom(product_uom)"/>
335 <!-- <field name="state"/> -->
336 <separator colspan ="2" string = "Forecasts"/>
337 <field name="warehouse_forecast"/>
338 <field name="company_forecast"/>
339 <field name="confirmed_forecasts_only"/>
343 <group colspan ="2" col="2">
344 <separator colspan ="2" string = "Current Period Situation"/>
345 <field name="stock_start"/>
346 <field name="already_out"/>
347 <field name="already_in"/>
348 <separator colspan ="2" string = "Planning and Situation for Calculated Period"/>
349 <field name="planned_outgoing"/>
350 <field name="outgoing"/>
351 <field name="outgoing_left"/>
352 <field name="to_procure"/>
353 <field name="incoming"/>
354 <field name="incoming_left"/>
355 <button name="calculate_planning" string="Calculate Planning" type="object" colspan="2"/>
356 <field name="stock_only"/>
358 <group colspan ="2" col="2">
359 <separator colspan ="2" string = "Minimum Stock Rule Indicators"/>
360 <field name="minimum_op"/>
361 <field name="maximum_op"/>
362 <separator colspan ="2" string = "Calculated Period Simulation"/>
363 <field name="outgoing_before"/>
364 <field name="incoming_before"/>
365 <field name="stock_simulation"/>
366 <button name="procure_incomming_left" string="Procure Incoming Left" type="object" colspan="2"/>
367 <field name="procure_to_stock"/>
368 <separator colspan ="2" string = "Internal Supply"/>
369 <button name="internal_supply" string="Supply from Another Warehouse" type="object" colspan="2"/>
370 <field name="supply_warehouse_id" domain = "[('company_id','=',company_id)] "/>
371 <field name="stock_supply_location"/>
374 <separator colspan ="4" string = "Requisition history"/>
375 <field name = "history" colspan = "2" nolabel = "1"/>
380 <record id="view_stock_planning_filter" model="ir.ui.view">
381 <field name="name">stock.planning.list.select</field>
382 <field name="model">stock.planning</field>
383 <field name="type">search</field>
384 <field name="arch" type="xml">
385 <search string="Search Stock Planning">
386 <group col='10' colspan='4'>
387 <!-- Doesn't work ! <filter icon="terp-purchase" string="Current" domain="[('line_time','=','Future')]" separator="1"/> -->
388 <filter icon="terp-purchase" string="No Requisition" domain="[('history','=',False)]" separator="1"/>
389 <field name="company_id" widget="selection"/>
390 <field name="warehouse_id" widget="selection"/>
391 <field name="period_id" widget="selection"/>
392 <field name="product_id" widget="selection"/>
399 <record id="view_stock_planning_tree" model="ir.ui.view">
400 <field name="name">stock.planning.tree</field>
401 <field name="model">stock.planning</field>
402 <field name="type">tree</field>
403 <field name="arch" type="xml">
404 <tree string="Master Procurement Schedule" colors ="blue:line_time=='Past';black:line_time=='Future'">
405 <field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
406 <field name="period_id"/>
407 <field name="product_id" on_change="product_id_change(product_id)" />
408 <field name="product_uom"/>
409 <field name="warehouse_forecast" string="Forecast"/>
410 <field name="planned_outgoing"/>
411 <field name="to_procure"/>
412 <field name="stock_simulation" string="Stock"/> <!-- previously stock_start -->
417 <record id="action_view_stock_planning_form" model="ir.actions.act_window">
418 <field name="name">Master Procurement Schedule</field>
419 <field name="res_model">stock.planning</field>
420 <field name="type">ir.actions.act_window</field>
421 <field name="view_type">form</field>
422 <field name="view_mode">tree,form</field>
423 <field name="search_view_id" ref="view_stock_planning_filter"/>
427 id="menu_stock_planning"
428 parent="menu_stock_planning_main"
429 action="action_view_stock_planning_form"/>