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