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