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