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