[IMP] removed icons from topbar
[odoo/odoo.git] / addons / procurement / procurement_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <!--
5         Procurement
6         -->
7
8
9         <record id="procurement_tree_view" model="ir.ui.view">
10             <field name="name">procurement.order.tree</field>
11             <field name="model">procurement.order</field>
12             <field name="type">tree</field>
13             <field name="arch" type="xml">
14                 <tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state == 'exception';black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state == 'ready'">
15                     <field name="date_planned" widget="date"/>
16                     <field name="origin"/>
17                     <field name="product_id"/>
18                     <field name="product_qty"/>
19                     <field name="product_uom" string="Unit of Measure"/>
20                     <field name="procure_method"/>
21                     <field name="state"/>
22                     <field name="message"/>
23                     <field name="name" invisible="1"/>
24                 </tree>
25             </field>
26         </record>
27          <record id="procurement_tree_view_board" model="ir.ui.view">
28             <field name="name">procurement.order.tree.board</field>
29             <field name="model">procurement.order</field>
30             <field name="type">tree</field>
31             <field eval="20" name="priority"/>
32             <field name="arch" type="xml">
33                 <tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state == 'exception';black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state == 'ready'">
34                     <field name="date_planned" widget="date"/>
35                     <field name="origin"/>
36                     <field name="product_id"/>
37                     <field name="product_qty"/>
38                     <field name="product_uom" string="Unit of Measure"/>
39                     <field name="state" invisible = "1"/>
40                     <field name="message"/>
41                 </tree>
42             </field>
43         </record>
44         <record id="procurement_form_view" model="ir.ui.view">
45             <field name="name">procurement.order.form</field>
46             <field name="model">procurement.order</field>
47             <field name="type">form</field>
48             <field name="arch" type="xml">
49                 <form layout="manual">
50                     <div class="oe_form_topbar">
51                         <button name="button_confirm" states="draft" string="Confirm"/>
52                         <button name="button_check" states="confirmed" string="Run Procurement"/>
53                         <button name="button_restart" states="exception" string="Retry"/>
54                         <button name="button_cancel" states="draft,exception,waiting" string="Cancel"/>
55                         <div class="oe_right">
56                             <field name="state" readonly="1" widget="statusbar" nolabel="1" statusbar_visible="draft,confirmed" />
57                         </div>
58                         <div class="oe_clear"/>
59                     </div>
60                 <sheet string="Procurement" layout="auto">
61                     <group col="2" colspan="2" class="oe_form_header">
62                         <separator colspan="2" string="References"/>
63                         <field name="name" string="Procurement Reason"/>
64                         <field name="origin"/>
65                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
66                     </group>
67                     <group col="2" colspan="2">
68                         <separator colspan="2" string="Planification"/>
69                         <field name="date_planned"/>
70                         <field name="procure_method"/>
71                         <field name="priority"/>
72                     </group>
73                     <notebook colspan="4">
74                     <page string="Procurement Details">
75                         <separator colspan="4" string="Product &amp; Location"/>
76                         <field name="product_id" on_change="onchange_product_id(product_id)"/>
77                         <field name="location_id" domain="[('usage','=','internal')]"/>
78                         <field name="product_qty"/>
79                         <field name="product_uom"/>
80
81                         <field name="product_uos_qty" groups="product.group_uos"/>
82                         <field name="product_uos"  groups="product.group_uos"/>
83
84                         <separator colspan="4" string="Status"/>
85                         <field colspan="4" name="message" readonly="1"/>
86                     </page>
87                     <page string="Extra Information">
88                         <separator colspan="4" string="Details"/>
89                         <field name="move_id"/>
90                         <field name="date_close"/>
91                         <field name="close_move"/>
92                     </page>
93                     <page string="Notes">
94                         <separator colspan="4" string="Note" />
95                         <field name="note" colspan="4" nolabel="1"/>
96                     </page>
97                     </notebook>
98                     </sheet>
99                 </form>
100             </field>
101         </record>
102         <record id="view_procurement_filter" model="ir.ui.view">
103             <field name="name">procurement.order.select</field>
104             <field name="model">procurement.order</field>
105             <field name="type">search</field>
106             <field name="arch" type="xml">
107                 <search string="Search Procurement">
108                     <group>
109                        <filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
110                        <filter icon="terp-emblem-important" string="To Fix" name="perm_exceptions" domain="[('state','=','exception'),('message', '!=', '')]" help="Permanent Procurement Exceptions"/>
111                        <filter icon="terp-emblem-important" string="Temporary" name="temp_exceptions" domain="[('state','=','exception'),('message', '=', '')]" help="Temporary Procurement Exceptions"/>
112                        <separator orientation="vertical"/>
113                        <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
114                            domain="['&amp;', ('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
115                            help="Procurement started late" />
116                        <separator orientation="vertical"/>
117                        <field name="origin"/>
118                        <field name="product_id" />
119                        <field name="date_planned"/>
120                        <field name="state" />
121                     </group>
122                     <newline/>
123                     <group expand="0" string="Group By">
124                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
125                         <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
126                         <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
127                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
128                     </group>
129                 </search>
130             </field>
131         </record>
132
133         <record id="procurement_action" model="ir.actions.act_window">
134             <field name="name">Procurement Orders</field>
135             <field name="type">ir.actions.act_window</field>
136             <field name="res_model">procurement.order</field>
137             <field name="view_type">form</field>
138             <field name="view_id" eval="False"/>
139             <field name="search_view_id" ref="view_procurement_filter"/>
140             <field name="context">{'search_default_current':1}</field>
141             <field name="help">A procurement order is used to record a need for a specific product at a specific location. A procurement order is usually created automatically from sales orders, a Pull Logistics rule or Minimum Stock Rules. When the procurement order is confirmed, it automatically creates the necessary operations to fullfil the need: purchase order proposition, manufacturing order, etc.</field>
142         </record>
143
144         <record id="procurement_exceptions" model="ir.actions.act_window">
145             <field name="name">Procurement Exceptions</field>
146             <field name="type">ir.actions.act_window</field>
147             <field name="res_model">procurement.order</field>
148             <field name="view_type">form</field>
149             <field name="view_mode">tree,form</field>
150             <field name="context">{'search_default_perm_exceptions':1}</field>
151             <field name="search_view_id" ref="view_procurement_filter"/>
152             <field name="help">Procurement Orders represent the need for a certain quantity of products, at a given time, in a given location. Sales Orders are one typical source of Procurement Orders (but these are distinct documents). Depending on the procurement parameters and the product configuration, the procurement engine will attempt to satisfy the need by reserving products from stock, ordering products from a supplier, or passing a manufacturing order, etc. A Procurement Exception occurs when the system cannot find a way to fulfill a procurement. Some exceptions will resolve themselves automatically, but others require manual intervention (those are identified by a specific error message).</field>
153         </record>
154
155         <record id="procurement_action5" model="ir.actions.act_window">
156             <field name="name">Procurement Exceptions</field>
157             <field name="type">ir.actions.act_window</field>
158             <field name="res_model">procurement.order</field>
159             <field name="view_type">form</field>
160             <field name="view_mode">tree,form</field>
161             <field name="domain">[('state','=','exception')]</field>
162         </record>
163
164         <!-- Order Point -->
165         <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
166             <field name="name">stock.warehouse.orderpoint.tree</field>
167             <field name="model">stock.warehouse.orderpoint</field>
168             <field name="type">tree</field>
169             <field name="arch" type="xml">
170                 <tree string="Minimum Stock Rules">
171                     <field name="name"/>
172                     <field name="warehouse_id"/>
173                     <field name="location_id" groups="stock.group_locations"/>
174                     <field name="product_id"/>
175                     <field name="product_uom"/>
176                     <field name="product_min_qty"/>
177                     <field name="product_max_qty"/>
178                 </tree>
179             </field>
180         </record>
181
182         <record model="ir.ui.view" id="warehouse_orderpoint_search">
183             <field name="name">stock.warehouse.orderpoint.search</field>
184             <field name="model">stock.warehouse.orderpoint</field>
185             <field name="type">search</field>
186             <field name="arch" type="xml">
187                 <search string="Minimum Stock Rules Search">
188                     <group>
189                         <field name="name"/>
190                         <field name="warehouse_id" widget="selection"/>
191                         <field name="location_id" groups="stock.group_locations"/>
192                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
193                         <field name="product_id"/>
194                     </group>
195                     <newline/>
196                     <group expand="0" string="Group By...">
197                         <filter string="Warehouse" icon="terp-go-home" domain="[]"  context="{'group_by':'warehouse_id'}"/>
198                         <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
199                     </group>
200                 </search>
201             </field>
202         </record>
203
204         <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
205             <field name="name">stock.warehouse.orderpoint.form</field>
206             <field name="model">stock.warehouse.orderpoint</field>
207             <field name="type">form</field>
208             <field name="arch" type="xml">
209                 <form string="Minimum Stock Rules">
210                     <group col="2" colspan="2">
211                         <separator string="General Information" colspan="2" />
212                         <field name="name" />
213                         <field name="product_id" on_change="onchange_product_id(product_id)"/>
214                         <field name="product_uom"/>
215                     </group>
216                     <group col="2" colspan="2">
217                         <separator string="Locations" colspan="2" />
218                         <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
219                         <field name="location_id" groups="stock.group_locations"/>
220                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
221                     </group>
222                     <group col="2" colspan="2">
223                         <separator string="Quantity Rules" colspan="2" />
224                         <field name="product_min_qty"/>
225                         <field name="product_max_qty"/>
226                         <field name="qty_multiple"/>
227                     </group>
228                     <group col="2" colspan="2">
229                         <separator string="Misc" colspan="2" />
230                         <field name="procurement_id" readonly="1"/>
231                         <field name="active" />
232                     </group>
233                     <group col="4" colspan="4">
234                         <separator string="Procurement Orders to Process" colspan="4" />
235                         <field name="procurement_draft_ids" colspan="4" nolabel="1"/>
236                     </group>
237                 </form>
238             </field>
239         </record>
240
241         <record id="action_orderpoint_form" model="ir.actions.act_window">
242             <field name="name">Minimum Stock Rules</field>
243             <field name="res_model">stock.warehouse.orderpoint</field>
244             <field name="type">ir.actions.act_window</field>
245             <field name="view_type">form</field>
246             <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
247             <field name="search_view_id" ref="warehouse_orderpoint_search" />
248             <field name="help">You can define your minimum stock rules, so that OpenERP will automatically create draft manufacturing orders or purchase quotations according to the stock level. Once the virtual stock of a product (= stock on hand minus all confirmed orders and reservations) is below the minimum quantity, OpenERP will generate a procurement request to increase the stock up to the maximum quantity.</field>
249         </record>
250
251         <act_window
252         context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
253         id="act_stock_warehouse_2_stock_warehouse_orderpoint"
254         name="Minimum Stock Rules"
255         res_model="stock.warehouse.orderpoint"
256         src_model="stock.warehouse"
257         groups="stock.group_stock_user"/>
258
259         <act_window
260             context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
261             id="act_procurement_2_stock_warehouse_orderpoint"
262             name="Minimum Stock Rules"
263             res_model="stock.warehouse.orderpoint"
264             src_model="procurement.order"
265             groups="stock.group_stock_user"/>
266
267         <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it.  -->
268         <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
269             <menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
270             <menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
271         <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
272             <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
273
274         <record id="product_normal_form_view" model="ir.ui.view">
275             <field name="name">product.normal.form.orderpoint.inherit</field>
276             <field name="model">product.product</field>
277             <field name="type">form</field>
278             <field name="inherit_id" ref="product.product_normal_form_view"/>
279             <field name="arch" type="xml">
280                 <group name="misc" position="after">
281                     <group colspan="4" attrs="{'invisible':[('type','=','service')]}" groups="stock.group_stock_manager">
282                         <separator string="Minimum Stock Rules" colspan="4"/>
283                         <field name="orderpoint_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
284                     </group>
285                 </group>
286             </field>
287         </record>
288
289     </data>
290 </openerp>