[REF] base_setup: Specify the right domain for the ir.module.category, needed by...
[odoo/odoo.git] / addons / purchase / purchase_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4        <menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases" sequence="3"
5            groups="group_purchase_manager,group_purchase_user"
6            web_icon="images/purchases.png"
7            web_icon_hover="images/purchases-hover.png"/>
8        <menuitem id="menu_procurement_management" name="Purchase Management"
9             parent="base.menu_purchase_root" sequence="1" />
10
11         <menuitem id="menu_purchase_config_purchase" name="Configuration"
12             groups="group_purchase_manager"
13             parent="base.menu_purchase_root" sequence="100"/>
14
15         <menuitem
16             id="menu_purchase_config_pricelist" name="Pricelists"
17             parent="menu_purchase_config_purchase" sequence="50"  groups="base.group_extended"/>
18
19         <menuitem
20             action="product.product_pricelist_action" id="menu_product_pricelist_action_purhase"
21             parent="menu_purchase_config_pricelist" sequence="20"/>
22
23         <menuitem
24             action="product.product_pricelist_action2" id="menu_product_pricelist_action2_purchase"
25             parent="menu_purchase_config_pricelist" sequence="10"/>
26
27         <!--<menuitem
28             action="product.product_pricelist_type_action" id="menu_purchase_product_pricelist_type"
29             parent="menu_purchase_config_pricelist" sequence="2"
30             groups="base.group_extended"/>-->
31
32         <menuitem
33             id="menu_product_in_config_purchase" name="Product"
34             parent="menu_purchase_config_purchase" sequence="30"/>
35
36         <menuitem
37             action="product.product_category_action_form" id="menu_product_category_config_purchase"
38             parent="purchase.menu_product_in_config_purchase" sequence="10"/>
39
40         <menuitem
41             id="menu_purchase_unit_measure_purchase" name="Units of Measure"
42             parent="purchase.menu_product_in_config_purchase"  sequence="20"/>
43
44         <menuitem
45              action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
46              parent="menu_purchase_unit_measure_purchase" sequence="30"/>
47
48         <menuitem
49               action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
50               parent="menu_purchase_unit_measure_purchase" sequence="30"/>
51
52         <menuitem
53             id="menu_purchase_partner_cat" name="Address Book"
54             parent="menu_purchase_config_purchase"/>
55
56         <menuitem
57             action="base.action_partner_category_form" id="menu_partner_categories_in_form" name="Partner Categories"
58             parent="purchase.menu_purchase_partner_cat"/>
59
60
61         <!--supplier addresses action-->
62         <record id="action_supplier_address_form" model="ir.actions.act_window">
63             <field name="name">Addresses</field>
64             <field name="type">ir.actions.act_window</field>
65             <field name="res_model">res.partner.address</field>
66             <field name="view_type">form</field>
67             <field name="context">{"search_default_supplier":1}</field>
68             <field name="search_view_id" ref="base.view_res_partner_address_filter"/>
69             <field name="help">Access your supplier records and maintain a good relationship with your suppliers. You can track all your interactions with them through the History tab: emails, orders, meetings, etc.</field>
70         </record>
71         <record id="action_supplier_address_form_view1" model="ir.actions.act_window.view">
72             <field eval="10" name="sequence"/>
73             <field name="view_mode">tree</field>
74             <field name="view_id" ref="base.view_partner_address_tree"/>
75             <field name="act_window_id" ref="action_supplier_address_form"/>
76         </record>
77         <record id="action_supplier_address_form_view2" model="ir.actions.act_window.view">
78             <field eval="20" name="sequence"/>
79             <field name="view_mode">form</field>
80             <field name="view_id" ref="base.view_partner_address_form1"/>
81             <field name="act_window_id" ref="action_supplier_address_form"/>
82         </record>
83
84      <!--supplier menu-->
85       <menuitem id="base.menu_procurement_management_supplier" name="Address Book"
86             parent="base.menu_purchase_root" sequence="3"/>
87       <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
88             parent="base.menu_procurement_management_supplier"
89             action="base.action_partner_supplier_form" sequence="1"/>
90
91           <!--Inventory control-->
92       <menuitem id="menu_procurement_management_inventory" name="Receive Products"
93             parent="base.menu_purchase_root" sequence="4"/>
94       <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
95             name="Incoming Shipments" sequence="9"
96             groups="base.group_extended"/>
97       <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
98             parent="menu_procurement_management_inventory" sequence="11"/>
99
100      <!--Invoice control-->
101      <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
102           parent="base.menu_purchase_root" sequence="6"/>
103
104     <record id="action_invoice_pending" model="ir.actions.act_window">
105         <field name="res_model">account.invoice</field>
106         <field name="view_type">form</field>
107         <field name="view_mode">tree,form,calendar,graph</field>
108         <field eval="False" name="view_id"/>
109         <field name="domain">[('type','=','in_invoice')]</field>
110         <field name="context">{'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
111         <field name="search_view_id" ref="account.view_account_invoice_filter"/>
112             <field name="help">Use this menu to control the invoices to be received from your supplier. OpenERP pregenerates draft invoices from your purchase orders or receptions, according to your settings. Once you receive a supplier invoice, you can match it with the draft invoice and validate it.</field>
113     </record>
114
115      <menuitem name="Supplier Invoices to Receive"
116           id="menu_procurement_management_pending_invoice"
117           action="action_invoice_pending"
118           parent="menu_procurement_management_invoice"
119           sequence="13"/>
120
121       <!--product menu-->
122       <menuitem id="menu_procurement_management_product" name="Products"
123           parent="base.menu_purchase_root" sequence="8"/>
124
125       <menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
126            parent="menu_procurement_management_product" sequence="10"/>
127
128       <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
129           parent="menu_procurement_management_product"/>
130
131        <record model="ir.ui.view" id="purchase_order_calendar">
132             <field name="name">purchase.order.calendar</field>
133             <field name="model">purchase.order</field>
134             <field name="type">calendar</field>
135             <field name="priority" eval="2"/>
136             <field name="arch" type="xml">
137                 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
138                     <field name="name"/>
139                     <field name="amount_total"/>
140                     <field name="partner_id"/>
141                 </calendar>
142             </field>
143         </record>
144         <record model="ir.ui.view" id="purchase_order_graph">
145             <field name="name">purchase.order.graph</field>
146             <field name="model">purchase.order</field>
147             <field name="type">graph</field>
148             <field name="arch" type="xml">
149                 <graph string="Purchase Order" type="bar">
150                     <field name="partner_id"/>
151                     <field name="amount_total" operator="+"/>
152                 </graph>
153             </field>
154         </record>
155
156         <record id="purchase_order_form" model="ir.ui.view">
157             <field name="name">purchase.order.form</field>
158             <field name="model">purchase.order</field>
159             <field name="type">form</field>
160             <field name="arch" type="xml">
161                 <form string="Purchase Order">
162                     <group col="6" colspan="4">
163                         <field name="name"/>
164                         <field name="date_order"/>
165                         <field name="invoiced"/>
166                         <newline/>
167                         <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
168                         <field name="partner_ref"/>
169                         <field name="shipped"/>
170                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
171                     </group>
172                     <notebook colspan="4">
173                         <page string="Purchase Order">
174                             <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1}" />
175                             <field name="partner_address_id"/>
176                             <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
177                             <field name="origin" groups="base.group_extended"/>
178                             <newline/>
179                             <field colspan="4" name="order_line" nolabel="1" mode="tree,form">
180                                 <tree string="Purchase Order Lines">
181                                     <field name="date_planned"/>
182                                     <field name="name"/>
183                                     <field name="product_qty"/>
184                                     <field name="product_uom"/>
185                                     <field name="price_unit"/>
186                                     <field name="price_subtotal"/>
187                                 </tree>
188                                 <!-- default form view -->
189                             </field>
190                             <group col="7" colspan="4">
191                                 <field name="amount_untaxed" sum="Untaxed amount"/>
192                                 <field name="amount_tax"/>
193                                 <field name="amount_total" sum="Total amount"/>
194                                 <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
195                             </group>
196                             <group col="11" colspan="4">
197                                 <field name="state" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
198                                 <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
199                                 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
200                                 <button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
201                                 <button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
202                                 <button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
203                                 <button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward"/>
204                                 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
205                                 <button name="purchase_approve" states="confirmed" string="Approved" icon="gtk-go-forward"/>
206                                 <button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
207                             </group>
208                         </page>
209                         <page string="Delivery &amp; Invoicing" groups="base.group_extended">
210                             <group colspan="2" col="2">
211                                 <separator string="Delivery" colspan="2"/>
212                                 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
213                                 <field name="minimum_planned_date"/>
214                                 <field name="location_id"/>
215                             </group>
216                             <group colspan="2" col="2">
217                                 <separator string="Invoice Control" colspan="2"/>
218                                 <field name="invoice_method"/>
219                                 <field name="fiscal_position" widget="selection"/>
220                             </group>
221                             <newline/>
222                             <separator string="Purchase Control" colspan="4"/>
223                             <field name="validator"/>
224                             <field name="date_approve"/>
225                             <separator string="Invoices" colspan="4"/>
226                             <newline/>
227                             <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type':'purchase'}"/>
228                         </page>
229                         <page string="Notes">
230                             <field colspan="4" name="notes" nolabel="1"/>
231                         </page>
232                     </notebook>
233                 </form>
234             </field>
235         </record>
236
237        <record id="view_request_for_quotation_filter" model="ir.ui.view">
238             <field name="name">request.quotation.select</field>
239             <field name="model">purchase.order</field>
240             <field name="type">search</field>
241             <field name="arch" type="xml">
242                 <search string="Search Purchase Order">
243                  <group>
244                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]"  help="Purchase order which are in draft state"/>
245                     <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]"  help="Approved purchase order"/>
246                     <separator orientation="vertical"/>
247                     <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]"  help="Purchase order which are in the exception state"/>
248                     <separator orientation="vertical"/>
249                     <filter icon="terp-gtk-go-back-rtl" string="Not invoices" domain="[('invoice_ids','=', False)]"  help="Purchase orders that include lines not invoiced." groups="base.group_extended"/>
250                     <separator orientation="vertical"/>
251                     <field name="name" string="Reference"/>
252                     <field name="partner_id"/>
253                     <field name="product_id"/>
254                     <field name="create_uid"/>
255                 </group>
256                 <newline/>
257                   <group expand="0" string="Group By..." groups="base.group_extended">
258                     <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
259                      <separator orientation="vertical"/>
260                     <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
261                     <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
262                      <separator orientation="vertical"/>
263                     <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
264                     <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
265
266                 </group>
267               </search>
268             </field>
269         </record>
270         
271         <record id="view_purchase_order_filter" model="ir.ui.view">
272             <field name="name">purchase.order.list.select</field>
273             <field name="model">purchase.order</field>
274             <field name="type">search</field>
275             <field name="arch" type="xml">
276                 <search string="Search Purchase Order">
277                  <group>
278                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]"  help="Purchase order which are in draft state"/>
279                     <filter icon="terp-gtk-jump-to-ltr" name="to_approve" string="To Approve" domain="[('state', '=', 'confirmed')]" help="Purchase order which are yet not approve"/>
280                     <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]"  help="Approved purchase order"/>
281                     <separator orientation="vertical"/>
282                     <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]"  help="Purchase order which are in the exception state"/>
283                     <separator orientation="vertical"/>
284                     <filter icon="terp-gtk-go-back-rtl" string="Not invoices" domain="[('invoice_ids','=', False)]"  help="Purchase orders that include lines not invoiced." groups="base.group_extended"/>
285                     <separator orientation="vertical"/>
286                     <field name="name" string="Reference"/>
287                     <field name="partner_id"/>
288                     <field name="product_id"/>
289                     <field name="create_uid"/>
290                 </group>
291                 <newline/>
292                   <group expand="0" string="Group By..." groups="base.group_extended">
293                     <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
294                      <separator orientation="vertical"/>
295                     <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
296                     <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
297                      <separator orientation="vertical"/>
298                     <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
299                     <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
300
301                 </group>
302               </search>
303             </field>
304         </record>
305         
306         <record id="purchase_order_tree" model="ir.ui.view">
307             <field name="name">purchase.order.tree</field>
308             <field name="model">purchase.order</field>
309             <field name="type">tree</field>
310             <field name="arch" type="xml">
311                 <tree colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
312                     <field name="name" string="Reference"/>
313                     <field name="date_order" string="Order Date"/>
314                     <field name="partner_id"/>
315                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
316                     <field name="location_id"/>
317                     <field name="minimum_planned_date"/>
318                     <field name="origin"/>
319                     <field name="invoiced_rate" widget="progressbar"/>
320                     <field name="shipped_rate" widget="progressbar"/>
321                     <field name="amount_untaxed" sum="Total Untaxed amount"/>
322                     <field name="amount_total" sum="Total amount"/>
323                     <field name="state"/>
324                 </tree>
325             </field>
326         </record>
327
328         <record id="purchase_rfq" model="ir.actions.act_window">
329             <field name="name">Requests for Quotation</field>
330             <field name="type">ir.actions.act_window</field>
331             <field name="res_model">purchase.order</field>
332             <field name="context">{'search_default_draft': 1}</field>
333             <field name="view_mode">tree,form,graph,calendar</field>
334             <field name="search_view_id" ref="view_request_for_quotation_filter"/>
335             <field name="help">You can create a request for quotation when you want to buy products to a supplier but the purchase is not confirmed yet. Use also this menu to review requests for quotation created automatically based on your logistic rules (minimum stock, MTO, etc). You can convert the request for quotation into a purchase order once the order is confirmed. If you use the extended interface (from user's preferences), you can select the way to control your supplier invoices: based on the order, based on the receptions or manual encoding.</field>
336         </record>
337         <menuitem action="purchase_rfq" id="menu_purchase_rfq"
338             parent="menu_procurement_management"
339             sequence="6"/>
340
341         <record id="purchase_form_action" model="ir.actions.act_window">
342             <field name="name">Purchase Orders</field>
343             <field name="type">ir.actions.act_window</field>
344             <field name="res_model">purchase.order</field>
345             <field name="view_mode">tree,form,graph,calendar</field>
346             <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
347             <field name="search_view_id" ref="view_purchase_order_filter"/>
348             <field name="help">Use this menu to search within your purchase orders by references, supplier, products, etc. For each purchase order, you can track the products received, and control the supplier invoices.</field>
349         </record>
350         <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" />
351
352
353         <record id="purchase_order_line_form" model="ir.ui.view">
354             <field name="name">purchase.order.line.form</field>
355             <field name="model">purchase.order.line</field>
356             <field name="type">form</field>
357             <field name="arch" type="xml">
358                 <form string="Purchase Order Line">
359                     <notebook colspan="4">
360                         <page string="Order Line">
361                             <field name="product_id" colspan="4" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_id}" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes,context)"/>
362                             <field name="product_qty" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_id}" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes,context)"/>
363                             <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
364                             <field colspan="4" name="name"/>
365                             <field name="date_planned" widget="date"/>
366                             <field name="price_unit"/>
367                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
368                             <field name="account_analytic_id" colspan="4" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
369                             <group colspan="4" col="4" groups="base.group_extended">
370                                 <separator colspan="4" string="Taxes"/>
371                                 <field colspan="4" nolabel="1" name="taxes_id"
372                                     domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
373                             </group>
374                         </page>
375                         <page string="Invoicing" groups="base.group_extended">
376                             <separator colspan="4" string="Manual Invoices"/>
377                             <field name="invoiced"/>
378                             <newline/>
379                             <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
380                         </page>
381                            <page string="Notes">
382                             <field colspan="4" name="notes" nolabel="1"/>
383                         </page>
384                         <page string="History" groups="base.group_extended">
385                                <separator colspan="4" string="Stock Moves"/>
386                                <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
387                         </page>
388                     </notebook>
389                 </form>
390             </field>
391         </record>
392
393         <record id="purchase_order_line_tree" model="ir.ui.view">
394             <field name="name">purchase.order.line.tree</field>
395             <field name="model">purchase.order.line</field>
396             <field name="type">tree</field>
397             <field name="arch" type="xml">
398                 <tree string="Purchase Order Lines">
399                     <field name="order_id"/>
400                     <field name="name"/>
401                     <field name="partner_id" string="Supplier" />
402                     <field name="product_id"/>
403                     <field name="price_unit"/>
404                     <field name="product_qty"/>
405                     <field name="product_uom"/>
406                     <field name="price_subtotal"/>
407                     <field name="date_planned"  widget="date" width="135"/>
408
409
410
411                     <field name="state" invisible="1"/>
412                     <field name="invoiced" invisible="1"/>
413                 </tree>
414             </field>
415         </record>
416         <record id="purchase_order_line_form2" model="ir.ui.view">
417             <field name="name">purchase.order.line.form2</field>
418             <field name="model">purchase.order.line</field>
419             <field name="type">form</field>
420             <field name="priority" eval="20"/>
421             <field name="arch" type="xml">
422                 <form string="Purchase Order Line">
423                     <notebook colspan="4">
424                         <page string="Order Line">
425                                <separator colspan="4" string="General Information"/>
426                              <field name="order_id"/>
427                             <field name="product_id" readonly="1" />
428                             <field name="product_qty" readonly="1" />
429                             <field name="product_uom" readonly="1"/>
430                             <field colspan="4" name="name"/>
431                             <field name="date_planned" widget="date"  readonly="1"/>
432                             <field name="price_unit"/>
433                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
434                             <field name="account_analytic_id" colspan="4" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
435                             <group colspan="4" col="4" groups="base.group_extended">
436                                 <separator colspan="4" string="Taxes"/>
437                                 <field colspan="4" nolabel="1" name="taxes_id"
438                                     domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
439                             </group>
440                         </page>
441                         <page string="Invoicing" groups="base.group_extended">
442                             <separator colspan="4" string="Manual Invoices"/>
443                             <field name="invoiced"/>
444                             <newline/>
445                             <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
446                         </page>
447                          <page string="Notes">
448                             <field colspan="4" name="notes" nolabel="1"/>
449                         </page>
450                         <page string="History" groups="base.group_extended">
451                                <separator colspan="4" string="Stock Moves"/>
452                                <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
453                         </page>
454                     </notebook>
455                 </form>
456             </field>
457         </record>
458           <record id="purchase_order_line_search" model="ir.ui.view">
459             <field name="name">purchase.order.line.search</field>
460             <field name="model">purchase.order.line</field>
461             <field name="type">search</field>
462             <field name="arch" type="xml">
463                 <search string="Search Purchase Order">
464                         <group>
465                         <field name="order_id"/>
466                         <field name="product_id"/>
467                         <field name="partner_id"  string="Supplier"/>
468                         </group>
469                         <newline/>
470                         <group expand="0" string="Group By...">
471                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
472                         <separator orientation="vertical"/>
473                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
474                         <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
475                         <separator orientation="vertical"/>
476                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
477                         </group>
478                </search>
479             </field>
480         </record>
481
482         <act_window
483             context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
484             id="act_res_partner_2_purchase_order"
485             name="Purchase Orders"
486             groups="purchase.group_purchase_user"
487             res_model="purchase.order"
488             src_model="res.partner"/>
489
490         <act_window
491             context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
492             id="action_purchase_line_product_tree"
493             name="Purchases"
494             res_model="purchase.order.line"
495             src_model="product.product"
496             groups="purchase.group_purchase_user"/>
497
498
499         <record id="purchase_line_form_action2" model="ir.actions.act_window">
500             <field name="name">On Purchase Order Line</field>
501             <field name="type">ir.actions.act_window</field>
502             <field name="res_model">purchase.order.line</field>
503             <field name="domain">[('order_id.invoice_method','&lt;&gt;','picking'), ('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
504             <field name="view_type">form</field>
505             <field name="view_mode">tree,form</field>
506             <field name="search_view_id" ref="purchase_order_line_search"/>
507             <field name="help">If you set the invoicing control on a purchase order as "Manual", you can track here all the purchase order lines for which you have not received the supplier invoice yet. Once you are ready to receive a supplier invoice, you can generate a draft supplier invoice based on the lines from this menu.</field>
508         </record>
509         <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
510             <field eval="1" name="sequence"/>
511             <field name="view_mode">tree</field>
512             <field name="view_id" ref="purchase_order_line_tree"/>
513             <field name="act_window_id" ref="purchase_line_form_action2"/>
514         </record>
515         <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
516             <field eval="2" name="sequence"/>
517             <field name="view_mode">form</field>
518             <field name="view_id" ref="purchase_order_line_form2"/>
519             <field name="act_window_id" ref="purchase_line_form_action2"/>
520         </record>
521         <menuitem
522             action="purchase_line_form_action2"
523             id="menu_purchase_line_order_draft"
524             groups="base.group_extended"
525             parent="menu_procurement_management_invoice"
526             sequence="72"/>
527
528         <!--
529             Procurements
530         -->
531
532         <record id="view_procurement_form_inherit" model="ir.ui.view">
533             <field name="name">procurement.order.form.inherit</field>
534             <field name="model">procurement.order</field>
535             <field name="inherit_id" ref="procurement.procurement_form_view"/>
536             <field name="type">form</field>
537             <field name="arch" type="xml">
538                 <xpath expr="/form/notebook/page/field[@name='close_move']" position="before">
539                     <field name="purchase_id"/>
540                 </xpath>
541             </field>
542         </record>
543
544     </data>
545 </openerp>