[IMP]:contract,analytic_project,analytic_hr_expense: improve whole contract view...
[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"
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="product.group_purchase_pricelist"/>
18
19         <menuitem
20             action="product.product_pricelist_action" id="menu_product_pricelist_action_purhase"
21             parent="menu_purchase_config_pricelist" sequence="20" groups="base.group_no_one"/>
22
23         <menuitem
24             action="product.product_pricelist_action_for_purchase" id="menu_product_pricelist_action2_purchase"
25             parent="menu_purchase_config_pricelist" sequence="10" />
26
27         <menuitem
28             id="menu_product_in_config_purchase" name="Products"
29             parent="menu_purchase_config_purchase" sequence="30" groups="base.group_no_one"/>
30
31         <menuitem
32             action="product.product_category_action_form" id="menu_product_category_config_purchase"
33             parent="purchase.menu_product_in_config_purchase" sequence="1" />
34
35         <menuitem
36             id="menu_purchase_unit_measure_purchase" name="Units of Measure"
37             parent="purchase.menu_product_in_config_purchase"  sequence="20" groups="product.group_uom"/>
38
39         <menuitem
40              action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
41              parent="purchase.menu_product_in_config_purchase" sequence="5" />
42
43         <menuitem
44               action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
45               parent="purchase.menu_product_in_config_purchase" sequence="10"/>
46
47         <menuitem
48             id="menu_purchase_partner_cat" name="Address Book"
49             parent="menu_purchase_config_purchase"/>
50
51         <menuitem
52             action="base.action_partner_category_form" id="menu_partner_categories_in_form" name="Partner Categories"
53             parent="purchase.menu_purchase_partner_cat" groups="base.group_no_one"/>
54
55      <!--supplier menu-->
56     <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
57             parent="menu_procurement_management"
58             action="base.action_partner_supplier_form" sequence="15"/>
59
60           <!--Inventory control-->
61       <menuitem id="menu_procurement_management_inventory" name="Receive Products"
62             parent="base.menu_purchase_root" sequence="4"/>
63       <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
64             name="Incoming Shipments" sequence="9"/>
65       <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
66             parent="menu_procurement_management_inventory" sequence="11"/>
67
68      <!--Invoice control-->
69      <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
70           parent="base.menu_purchase_root" sequence="6"/>
71
72     <record id="action_invoice_pending" model="ir.actions.act_window">
73         <field name="res_model">account.invoice</field>
74         <field name="view_type">form</field>
75         <field name="view_mode">tree,form,calendar,graph</field>
76         <field eval="False" name="view_id"/>
77         <field name="domain">[('type','=','in_invoice')]</field>
78         <field name="context">{'default_type':'in_invoice', 'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
79         <field name="search_view_id" ref="account.view_account_invoice_filter"/>
80             <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>
81     </record>
82
83      <menuitem name="Based on draft invoices"
84           id="menu_procurement_management_pending_invoice"
85           action="action_invoice_pending"
86           parent="menu_procurement_management_invoice"
87           sequence="13"/>
88
89       <!--product menu-->
90       <menuitem id="menu_procurement_management_product" name="Products"
91           parent="base.menu_purchase_root" sequence="8"/>
92
93       <menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
94            parent="menu_procurement_management_product" sequence="10"/>
95
96       <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
97           parent="menu_procurement_management_product"/>
98
99        <record model="ir.ui.view" id="purchase_order_calendar">
100             <field name="name">purchase.order.calendar</field>
101             <field name="model">purchase.order</field>
102             <field name="type">calendar</field>
103             <field name="priority" eval="2"/>
104             <field name="arch" type="xml">
105                 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
106                     <field name="name"/>
107                     <field name="amount_total"/>
108                     <field name="partner_id"/>
109                 </calendar>
110             </field>
111         </record>
112         <record model="ir.ui.view" id="purchase_order_graph">
113             <field name="name">purchase.order.graph</field>
114             <field name="model">purchase.order</field>
115             <field name="type">graph</field>
116             <field name="arch" type="xml">
117                 <graph string="Purchase Order" type="bar">
118                     <field name="partner_id"/>
119                     <field name="amount_total" operator="+"/>
120                 </graph>
121             </field>
122         </record>
123
124         <record id="purchase_order_form" model="ir.ui.view">
125             <field name="name">purchase.order.form</field>
126             <field name="model">purchase.order</field>
127             <field name="type">form</field>
128             <field name="arch" type="xml">
129                 <form string="Purchase Order" version="7.0">
130                 <header>
131                     <button name="purchase_confirm" states="draft,sent" string="Confirm Order" class="oe_form_button_hi"/>
132                     <button name="wkf_send_rfq" states="draft" string="Send RFQ" type="object" context="{'send_rfq':True}"/>
133                     <button name="wkf_send_rfq" states="confirmed" string="Resend Purchase Order" type="object"/>
134                     <button name="action_cancel" states="except_picking,except_invoice,wait" string="Cancel" type="object" />
135                     <button name="picking_ok" states="except_picking" string="Manually Corrected"/>
136                     <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
137                     <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" class="oe_form_button_hi"/>
138                     <button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_form_button_hi"/>
139                     <button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}"/>
140                     <button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}"/>
141                     <button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object"/>
142                     <button name="purchase_cancel" states="draft,confirmed,wait_auth,sent" string="Cancel"/>
143                     <field name="state" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
144                 </header>
145                 <sheet>
146                     <h1>
147                         <label string="Draft Purchase Order " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
148                         <label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
149                         <field name="name" class="oe_form_inline" readonly="1"/>
150                     </h1>
151                     <group>
152                         <group>
153                             <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1,'default_supplier':1,'default_customer':0}"  options='{"quick_create": false}'/>
154                             <field name="partner_ref"/>
155                             <field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist"/>
156                         </group>
157                         <group>
158                             <field name="date_order"/>
159                             <field name="origin" attr="{'invisible': [('origin','=',False)]}"/>
160                             <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
161                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
162                         </group>
163                     </group>
164                     <notebook>
165                         <page string="Purchase Order">
166                             <field name="order_line">
167                                 <tree string="Purchase Order Lines">
168                                     <field name="date_planned"/>
169                                     <field name="name"/>
170                                     <field name="product_qty"/>
171                                     <field name="product_uom" groups="product.group_uom"/>
172                                     <field name="price_unit"/>
173                                     <field name="price_subtotal"/>
174                                 </tree>
175                             </field>
176                             <group class="oe_form_subtotal_footer">
177                                 <field name="amount_untaxed"/>
178                                 <field name="amount_tax"/>
179                                 <field name="amount_total" class="oe_form_subtotal_footer_separator"/>
180                                 <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
181                             </group>
182                             <div class="oe_clear"/>
183                             <label for="notes"/>
184                             <field name="notes"/>
185                         </page>
186                         <page string="Delivery &amp; Invoicing">
187                             <group>
188                                 <group string="Delivery">
189                                     <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
190                                     <field name="minimum_planned_date"/>
191                                     <field name="location_id" groups="stock.group_locations"/>
192                                     <field name="shipped"/>
193                                 </group>
194                                 <group string="Invoice Control">
195                                     <field name="invoice_method"/>
196                                     <field name="fiscal_position" widget="selection"/>
197                                     <field name="invoiced"/>
198                                 </group>
199                                 <group groups="base.group_no_one" string="Purchase Control">
200                                     <field name="validator"/>
201                                     <field name="date_approve"/>
202                                 </group>
203                                 <separator string="Invoices"/>
204                                 <field name="invoice_ids" context="{'type':'in_invoice', 'journal_type':'purchase'}"/>
205                             </group>
206                         </page>
207                     </notebook>
208                 </sheet>
209                 <footer>
210                    <field name="message_ids" widget="ThreadView"/>
211                 </footer>
212                 </form>
213             </field>
214         </record>
215
216        <record id="view_request_for_quotation_filter" model="ir.ui.view">
217             <field name="name">request.quotation.select</field>
218             <field name="model">purchase.order</field>
219             <field name="type">search</field>
220             <field name="arch" type="xml">
221                 <search string="Search Purchase Order">
222                  <group>
223                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]"  help="Purchase order which are in draft state"/>
224                     <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]"  help="Approved purchase order"/>
225                     <separator orientation="vertical"/>
226                     <filter icon="terp-gtk-go-back-rtl" name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]"  help="Purchase orders that include lines not invoiced."/>
227                     <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"/>
228                     <separator orientation="vertical"/>
229                     <field name="name" string="Reference"/>
230                     <field name="partner_id"/>
231                     <field name="product_id"/>
232                     <field name="create_uid"/>
233                 </group>
234                 <newline/>
235                   <group expand="0" string="Group By...">
236                     <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
237                      <separator orientation="vertical"/>
238                     <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
239                     <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
240                      <separator orientation="vertical"/>
241                     <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
242                     <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
243
244                 </group>
245               </search>
246             </field>
247         </record>
248
249         <record id="view_purchase_order_filter" model="ir.ui.view">
250             <field name="name">purchase.order.list.select</field>
251             <field name="model">purchase.order</field>
252             <field name="type">search</field>
253             <field name="arch" type="xml">
254                 <search string="Search Purchase Order">
255                  <group>
256                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]"  help="Purchase orders which are in draft state"/>
257                     <filter icon="terp-check" name="approved" string="Purchase Orders" domain="[('state','not in',('draft','cancel'))]"  help="Approved purchase orders"/>
258                     <separator orientation="vertical"/>
259                     <filter icon="terp-gtk-go-back-rtl" name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]"  help="Purchase orders that include lines not invoiced."/>
260                     <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase orders which are in exception state"/>
261                     <separator orientation="vertical"/>
262                     <field name="name" string="Reference"/>
263                     <field name="partner_id"/>
264                     <field name="product_id"/>
265                     <field name="create_uid"/>
266                 </group>
267                 <newline/>
268                   <group expand="0" string="Group By...">
269                     <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
270                      <separator orientation="vertical"/>
271                     <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
272                     <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
273                      <separator orientation="vertical"/>
274                     <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
275                     <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
276
277                 </group>
278               </search>
279             </field>
280         </record>
281
282         <record id="purchase_order_tree" model="ir.ui.view">
283             <field name="name">purchase.order.tree</field>
284             <field name="model">purchase.order</field>
285             <field name="type">tree</field>
286             <field name="arch" type="xml">
287                 <tree fonts="bold:needaction_pending==True" colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
288                     <field name="needaction_pending" invisible="1"/>
289                     <field name="name" string="Reference"/>
290                     <field name="date_order" />
291                     <field name="partner_id"/>
292                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
293                     <field name="minimum_planned_date" invisible="context.get('quotation_only', False)"/>
294                     <field name="origin"/>
295                     <field name="invoiced_rate" widget="progressbar" invisible="context.get('quotation_only', False)"/>
296                     <field name="shipped_rate" widget="progressbar" invisible="context.get('quotation_only', False)"/>
297                     <field name="amount_untaxed" sum="Total Untaxed amount"/>
298                     <field name="amount_total" sum="Total amount"/>
299                     <field name="state"/>
300                 </tree>
301             </field>
302         </record>
303
304         <record id="purchase_rfq" model="ir.actions.act_window">
305             <field name="name">Quotations</field>
306             <field name="type">ir.actions.act_window</field>
307             <field name="res_model">purchase.order</field>
308             <field name="context">{'search_default_draft': 1}</field>
309             <field name="view_mode">tree,form,graph,calendar</field>
310             <field name="search_view_id" ref="view_purchase_order_filter"/>
311             <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>
312         </record>
313         <menuitem action="purchase_rfq" id="menu_purchase_rfq"
314             parent="menu_procurement_management"
315             sequence="0"/>
316
317         <record id="purchase_form_action" model="ir.actions.act_window">
318             <field name="name">Purchase Orders</field>
319             <field name="type">ir.actions.act_window</field>
320             <field name="res_model">purchase.order</field>
321             <field name="view_mode">tree,form,graph,calendar</field>
322             <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
323             <field name="search_view_id" ref="view_purchase_order_filter"/>
324             <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>
325         </record>
326         <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
327
328
329         <record id="purchase_order_line_form" model="ir.ui.view">
330             <field name="name">purchase.order.line.form</field>
331             <field name="model">purchase.order.line</field>
332             <field name="type">form</field>
333             <field name="arch" type="xml">
334                 <form string="Purchase Order Line" version="7.0">
335                     <sheet>
336                         <label for="name" class="oe_form_readonly_hidden"/>
337                         <h1><field name="name"/></h1>
338                         <label for="product_id" class="oe_form_readonly_hidden"/>
339                         <group>
340                             <group>
341                                 <field name="product_id" on_change="onchange_product_id(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)"/>
342                                 <label for="product_qty"/>
343                                 <div>
344                                     <field name="product_qty" on_change="onchange_product_id(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)" class="oe_form_inline"/>
345                                     <field name="product_uom" groups="product.group_uom" on_change="onchange_product_uom(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)" class="oe_form_inline"/>
346                                 </div>
347                                 <field name="price_unit"/>
348                             </group>
349                             <group>
350                                 <field name="date_planned" widget="date"/>
351                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
352                                 <field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
353                                 <field name="taxes_id" widget="many2many_tags"
354                                     domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
355                             </group>
356                             <group string="Notes" colspan="4">
357                                 <field name="notes"/>
358                             </group>
359                             <group string="Invoices" colspan="4">
360                                 <field name="invoiced"/>
361                                 <field name="invoice_lines" nolabel="1" colspan="2"/>
362                             </group>
363                             <separator string="Stock Moves"/>
364                             <field name="move_ids"/>
365                         </group>
366                     </sheet>
367                 </form>
368             </field>
369         </record>
370
371         <record id="purchase_order_line_tree" model="ir.ui.view">
372             <field name="name">purchase.order.line.tree</field>
373             <field name="model">purchase.order.line</field>
374             <field name="type">tree</field>
375             <field name="arch" type="xml">
376                 <tree string="Purchase Order Lines">
377                     <field name="order_id"/>
378                     <field name="name"/>
379                     <field name="partner_id" string="Supplier" />
380                     <field name="product_id"/>
381                     <field name="price_unit"/>
382                     <field name="product_qty"/>
383                     <field name="product_uom" groups="product.group_uom"/>
384                     <field name="price_subtotal"/>
385                     <field name="date_planned"  widget="date" width="135"/>
386                     <field name="state" invisible="1"/>
387                     <field name="invoiced" invisible="1"/>
388                 </tree>
389             </field>
390         </record>
391         <record id="purchase_order_line_form2" model="ir.ui.view">
392             <field name="name">purchase.order.line.form2</field>
393             <field name="model">purchase.order.line</field>
394             <field name="type">form</field>
395             <field name="priority" eval="20"/>
396             <field name="arch" type="xml">
397                 <form string="Purchase Order Line" version="7.0">
398                     <label for="order_id" class="oe_form_readonly_hidden"/>
399                     <h1>
400                         <field name="order_id" class="oe_form_inline"/>, 
401                         <field name="date_order" class="oe_form_inline"/>
402                     </h1>
403                     <label for="partner_id" class="oe_form_readonly_hidden"/>
404                     <h2><field name="partner_id"/></h2>
405
406                     <group>
407                         <group>
408                             <field name="name"/>
409                             <field name="product_id" readonly="1"/>
410                             <label for="product_qty"/>
411                             <div>
412                                 <field name="product_qty" readonly="1" class="oe_form_inline"/>
413                                 <field name="product_uom" readonly="1" groups="product.group_uom" class="oe_form_inline"/>
414                             </div>
415                             <field name="price_unit"/>
416                         </group>
417                         <group>
418                             <field name="date_planned" widget="date"  readonly="1"/>
419                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
420                             <field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
421                             <field name="taxes_id" widget="many2many_tags"
422                                 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
423                             <field name="invoiced"/>
424                         </group>
425                     </group>
426                     <separator string="Manual Invoices"/>
427                     <field name="invoice_lines"/>
428                     <separator string="Notes"/>
429                     <field name="notes"/>
430                     <separator string="Stock Moves"/>
431                     <field name="move_ids"/>
432                 </form>
433             </field>
434         </record>
435           <record id="purchase_order_line_search" model="ir.ui.view">
436             <field name="name">purchase.order.line.search</field>
437             <field name="model">purchase.order.line</field>
438             <field name="type">search</field>
439             <field name="arch" type="xml">
440                 <search string="Search Purchase Order">
441                     <group>
442                         <field name="order_id"/>
443                         <field name="product_id"/>
444                         <field name="partner_id"  string="Supplier"/>
445                     </group>
446                         <newline/>
447                     <group expand="0" string="Group By...">
448                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
449                         <separator orientation="vertical"/>
450                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
451                         <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
452                         <separator orientation="vertical"/>
453                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
454                     </group>
455                </search>
456             </field>
457         </record>
458
459         <act_window
460             context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
461             id="act_res_partner_2_purchase_order"
462             name="RFQs and Purchases"
463             groups="purchase.group_purchase_user"
464             res_model="purchase.order"
465             src_model="res.partner"/>
466
467         <act_window
468             context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
469             id="action_purchase_line_product_tree"
470             name="Purchases"
471             res_model="purchase.order.line"
472             src_model="product.product"
473             groups="purchase.group_purchase_user"/>
474
475
476         <record id="purchase_line_form_action2" model="ir.actions.act_window">
477             <field name="name">Based on Purchase Order lines</field>
478             <field name="type">ir.actions.act_window</field>
479             <field name="res_model">purchase.order.line</field>
480             <field name="domain">[('order_id.invoice_method','&lt;&gt;','picking'), ('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
481             <field name="view_type">form</field>
482             <field name="view_mode">tree,form</field>
483             <field name="search_view_id" ref="purchase_order_line_search"/>
484             <field name="help">If you set the Invoicing Control on a purchase order as "Based on Purchase Order lines", you can track here all the purchase order lines for which you have not yet received the supplier invoice. Once you are ready to receive a supplier invoice, you can generate a draft supplier invoice based on the lines from this menu.</field>
485         </record>
486         <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
487             <field eval="1" name="sequence"/>
488             <field name="view_mode">tree</field>
489             <field name="view_id" ref="purchase_order_line_tree"/>
490             <field name="act_window_id" ref="purchase_line_form_action2"/>
491         </record>
492         <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
493             <field eval="2" name="sequence"/>
494             <field name="view_mode">form</field>
495             <field name="view_id" ref="purchase_order_line_form2"/>
496             <field name="act_window_id" ref="purchase_line_form_action2"/>
497         </record>
498         <menuitem
499             action="purchase_line_form_action2"
500             id="menu_purchase_line_order_draft"
501             parent="menu_procurement_management_invoice"
502             sequence="72"/>
503
504         <!--
505             Procurements
506         -->
507
508         <record id="view_procurement_form_inherit" model="ir.ui.view">
509             <field name="name">procurement.order.form.inherit</field>
510             <field name="model">procurement.order</field>
511             <field name="inherit_id" ref="procurement.procurement_form_view"/>
512             <field name="type">form</field>
513             <field name="arch" type="xml">
514                 <xpath expr="//field[@name='close_move']" position="before">
515                     <field name="purchase_id"/>
516                 </xpath>
517             </field>
518         </record>
519
520     </data>
521 </openerp>