[MERGE] trunk-editable_list (make SO/PO/invoice/expense lines editable)
[odoo/odoo.git] / addons / purchase / purchase_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!-- Top menu item -->
6         <menuitem name="Purchases"
7             id="base.menu_purchase_root"
8             groups="group_purchase_manager,group_purchase_user"
9             sequence="40"/>
10
11         <menuitem id="menu_procurement_management" name="Purchase"
12             parent="base.menu_purchase_root" sequence="1" />
13
14         <menuitem id="menu_purchase_config_purchase" name="Configuration"
15             groups="group_purchase_manager"
16             parent="base.menu_purchase_root" sequence="100"/>
17
18         <menuitem
19             id="menu_purchase_config_pricelist" name="Pricelists"
20             parent="menu_purchase_config_purchase" sequence="50" groups="product.group_purchase_pricelist"/>
21
22         <menuitem
23             action="product.product_pricelist_action" id="menu_product_pricelist_action_purhase"
24             parent="menu_purchase_config_pricelist" sequence="20" groups="base.group_no_one"/>
25
26         <menuitem
27             action="product.product_pricelist_action_for_purchase" id="menu_product_pricelist_action2_purchase"
28             parent="menu_purchase_config_pricelist" sequence="10" />
29
30         <menuitem
31             id="menu_product_in_config_purchase" name="Products"
32             parent="menu_purchase_config_purchase" sequence="30" groups="base.group_no_one"/>
33
34         <menuitem
35             action="product.product_category_action_form" id="menu_product_category_config_purchase"
36             parent="purchase.menu_product_in_config_purchase" sequence="1" />
37
38         <menuitem
39             id="menu_purchase_unit_measure_purchase" name="Units of Measure"
40             parent="purchase.menu_product_in_config_purchase"  sequence="20" groups="product.group_uom"/>
41
42         <menuitem
43              action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
44              parent="purchase.menu_product_in_config_purchase" sequence="5" />
45
46         <menuitem
47               action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
48               parent="purchase.menu_product_in_config_purchase" sequence="10"/>
49
50         <menuitem
51             id="menu_purchase_partner_cat" name="Address Book"
52             parent="menu_purchase_config_purchase"/>
53
54         <menuitem
55             action="base.action_partner_category_form" id="menu_partner_categories_in_form" name="Partner Categories"
56             parent="purchase.menu_purchase_partner_cat" groups="base.group_no_one"/>
57
58     <!--Supplier menu-->
59     <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
60         parent="menu_procurement_management"
61         action="base.action_partner_supplier_form" sequence="15"/>
62
63       <!--Inventory control-->
64       <menuitem id="menu_procurement_management_inventory" name="Receive Products"
65             parent="base.menu_purchase_root" sequence="4"/>
66       <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
67             name="Incoming Shipments" sequence="9"/>
68       <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
69             parent="menu_procurement_management_inventory" sequence="11"/>
70
71     <!--Invoice control-->
72     <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
73         parent="base.menu_purchase_root" sequence="6"/>
74
75     <record id="action_invoice_pending" model="ir.actions.act_window">
76         <field name="name">On Draft Invoices</field>
77         <field name="res_model">account.invoice</field>
78         <field name="view_type">form</field>
79         <field name="view_mode">tree,form,calendar,graph</field>
80         <field eval="False" name="view_id"/>
81         <field name="domain">[('type','=','in_invoice')]</field>
82         <field name="context">{'default_type':'in_invoice', 'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
83         <field name="search_view_id" ref="account.view_account_invoice_filter"/>
84         <field name="help" type="html">
85           <p class="oe_view_nocontent_create">
86             Click to create a draft invoice.
87           </p><p>
88             Use this menu to control the invoices to be received from your
89             supplier. OpenERP generates draft invoices from your purchase
90             orders or receptions, according to your settings.
91           </p><p>
92             Once you receive a supplier invoice, you can match it with the
93             draft invoice and validate it.
94           </p>
95         </field>
96     </record>
97
98      <menuitem
99           id="menu_procurement_management_pending_invoice"
100           action="action_invoice_pending"
101           parent="menu_procurement_management_invoice"
102           sequence="13"/>
103
104       <!-- Product menu-->
105       <menuitem id="menu_procurement_management_product" name="Products"
106           parent="base.menu_purchase_root" sequence="8"/>
107
108       <menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
109            parent="menu_procurement_management_product" sequence="10"/>
110
111       <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
112           parent="menu_procurement_management_product"/>
113
114         <!-- Purchase order Read/Unread actions -->
115         <record id="actions_server_purchase_order_unread" model="ir.actions.server">
116             <field name="name">Mark unread</field>
117             <field name="condition">True</field>
118             <field name="type">ir.actions.server</field>
119             <field name="model_id" ref="model_purchase_order"/>
120             <field name="state">code</field>
121             <field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
122         </record>
123         <record id="action_purchase_order_unread" model="ir.values">
124             <field name="name">action_purchase_order_unread</field>
125             <field name="action_id" ref="actions_server_purchase_order_unread"/>
126             <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_purchase_order_unread'))" />
127             <field name="key">action</field>
128             <field name="model_id" ref="model_purchase_order" />
129             <field name="model">purchase.order</field>
130             <field name="key2">client_action_multi</field>
131         </record>
132
133         <record id="actions_server_purchase_order_read" model="ir.actions.server">
134             <field name="name">Mark read</field>
135             <field name="condition">True</field>
136             <field name="type">ir.actions.server</field>
137             <field name="model_id" ref="model_purchase_order"/>
138             <field name="state">code</field>
139             <field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
140         </record>
141         <record id="action_purchase_order_read" model="ir.values">
142             <field name="name">action_purchase_order_read</field>
143             <field name="action_id" ref="actions_server_purchase_order_read"/>
144             <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_purchase_order_read'))" />
145             <field name="key">action</field>
146             <field name="model_id" ref="model_purchase_order" />
147             <field name="model">purchase.order</field>
148             <field name="key2">client_action_multi</field>
149         </record>
150
151         <record model="ir.ui.view" id="purchase_order_calendar">
152             <field name="name">purchase.order.calendar</field>
153             <field name="model">purchase.order</field>
154             <field name="priority" eval="2"/>
155             <field name="arch" type="xml">
156                 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
157                     <field name="name"/>
158                     <field name="amount_total"/>
159                     <field name="partner_id"/>
160                 </calendar>
161             </field>
162         </record>
163         <record model="ir.ui.view" id="purchase_order_graph">
164             <field name="name">purchase.order.graph</field>
165             <field name="model">purchase.order</field>
166             <field name="arch" type="xml">
167                 <graph string="Purchase Order" type="bar">
168                     <field name="partner_id"/>
169                     <field name="amount_total" operator="+"/>
170                 </graph>
171             </field>
172         </record>
173
174         <record id="purchase_order_form" model="ir.ui.view">
175             <field name="name">purchase.order.form</field>
176             <field name="model">purchase.order</field>
177             <field name="arch" type="xml">
178                 <form string="Purchase Order" version="7.0">
179                 <header>
180                     <button name="purchase_confirm" states="draft,sent" string="Confirm Order" class="oe_highlight"/>
181                     <button name="wkf_send_rfq" states="draft" string="Send RFQ" type="object" context="{'send_rfq':True}"/>
182                     <button name="wkf_send_rfq" states="confirmed" string="Resend Purchase Order" type="object" class="oe_highlight"/>
183                     <button name="action_cancel" states="except_picking,except_invoice" string="Cancel" type="object" />
184                     <button name="picking_ok" states="except_picking" string="Manually Corrected"/>
185                     <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
186                     <button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight"/>
187                     <button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/>
188                     <button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}" class="oe_highlight"/>
189                     <button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object" />
190                     <button name="purchase_cancel" states="draft,confirmed,sent" string="Cancel"/>
191                     <field name="state" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue"}' readonly="1"/>
192                 </header>
193                 <sheet>
194                     <div class="oe_title">
195                         <h1>
196                             <label string="Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
197                             <label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
198                             <field name="name" class="oe_inline" readonly="1"/>
199                         </h1>
200                     </div>
201                     <group>
202                         <group>
203                             <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1,'default_supplier':1,'default_customer':0}" domain="[('supplier','=',True)]"/>
204                             <field name="partner_ref"/>
205                             <field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist"/>
206                         </group>
207                         <group>
208                             <field name="date_order"/>
209                             <field name="origin" attr="{'invisible': [('origin','=',False)]}"/>
210                             <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
211                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
212                         </group>
213                     </group>
214                     <notebook>
215                         <page string="Purchase Order">
216                             <field name="order_line">
217                                 <tree string="Purchase Order Lines" editable="bottom">
218                                     <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,context)"/>
219                                     <field name="name"/>
220                                     <field name="date_planned"/>
221                                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
222                                     <field name="account_analytic_id" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
223                                     <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,context)"/>
224                                     <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,context)"/>
225                                     <field name="price_unit"/>
226                                     <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
227                                     <field name="price_subtotal"/>
228                                 </tree>
229                             </field>
230                             <group class="oe_subtotal_footer oe_right">
231                                 <field name="amount_untaxed"/>
232                                 <field name="amount_tax"/>
233                                 <div class="oe_subtotal_footer_separator oe_inline">
234                                     <label for="amount_total"/>
235                                     <button name="button_dummy"
236                                         states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
237                                 </div>
238                                 <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator"/>
239                             </group>
240                             <div class="oe_clear"/>
241                             <label for="notes"/>
242                             <field name="notes"/>
243                         </page>
244                         <page string="Delivery &amp; Invoicing">
245                             <group>
246                                 <group>
247                                     <field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id)"/>
248                                     <field name="minimum_planned_date"/>
249                                     <field name="location_id" groups="stock.group_locations"/>
250                                     <field name="shipped" groups="base.group_no_one"/>
251                                 </group>
252                                 <group>
253                                     <field name="invoice_method"/>
254                                     <field name="invoiced"/>
255                                     <field name="fiscal_position"/>
256                                     <!-- We do not need these fields anymore, the information is in open chatter -->
257                                     <field name="validator" groups="base.group_no_one"/>
258                                     <field name="date_approve" groups="base.group_no_one"/>
259                                 </group>
260                             </group>
261                             <separator string="Invoices"/>
262                             <field name="invoice_ids" context="{'type':'in_invoice', 'journal_type':'purchase'}"/>
263                         </page>
264                     </notebook>
265                 </sheet>
266                 <div class="oe_chatter">
267                     <field name="message_ids" widget="mail_thread"/>
268                     <field name="message_follower_ids" widget="mail_followers"/>
269                 </div>
270                 </form>
271             </field>
272         </record>
273
274        <record id="view_request_for_quotation_filter" model="ir.ui.view">
275             <field name="name">request.quotation.select</field>
276             <field name="model">purchase.order</field>
277             <field name="arch" type="xml">
278                 <search string="Search Purchase Order">
279                     <field name="name" string="Reference"/>
280                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase order which are in draft state"/>
281                     <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]" help="Approved purchase order"/>
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/>
284                     <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."/>
285                     <field name="partner_id"/>
286                     <field name="product_id"/>
287                     <field name="create_uid"/>
288                     <group expand="0" string="Group By...">
289                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
290                         <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
291                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
292                         <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
293                         <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
294                     </group>
295                 </search>
296             </field>
297         </record>
298
299         <record id="view_purchase_order_filter" model="ir.ui.view">
300             <field name="name">purchase.order.list.select</field>
301             <field name="model">purchase.order</field>
302             <field name="arch" type="xml">
303                 <search string="Search Purchase Order">
304                     <field name="name" string="Reference"/>
305                     <filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
306                     <separator/>
307                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase orders which are in draft state"/>
308                     <filter icon="terp-check" name="approved" string="Purchase Orders" domain="[('state','not in',('draft','cancel'))]" help="Approved purchase orders"/>
309                     <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase orders which are in exception state"/>
310                     <separator/>
311                     <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."/>
312                     <field name="partner_id"/>
313                     <field name="product_id"/>
314                     <field name="create_uid"/>
315                     <group expand="0" string="Group By...">
316                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
317                         <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
318                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
319                         <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
320                         <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
321                     </group>
322                 </search>
323             </field>
324         </record>
325
326         <record id="purchase_order_tree" model="ir.ui.view">
327             <field name="name">purchase.order.tree</field>
328             <field name="model">purchase.order</field>
329             <field name="arch" type="xml">
330                 <tree fonts="bold:needaction_pending==True" colors="grey:state=='cancel';blue:state in ('confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
331                     <field name="needaction_pending" invisible="1"/>
332                     <field name="name" string="Reference"/>
333                     <field name="date_order" />
334                     <field name="partner_id"/>
335                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
336                     <field name="minimum_planned_date" invisible="context.get('quotation_only', False)"/>
337                     <field name="origin"/>
338                     <field name="amount_untaxed" sum="Total Untaxed amount"/>
339                     <field name="amount_total" sum="Total amount"/>
340                     <field name="state"/>
341                 </tree>
342             </field>
343         </record>
344
345         <record id="purchase_rfq" model="ir.actions.act_window">
346             <field name="name">Quotations</field>
347             <field name="type">ir.actions.act_window</field>
348             <field name="res_model">purchase.order</field>
349             <field name="context">{'search_default_draft': 1}</field>
350             <field name="view_mode">tree,form,graph,calendar</field>
351             <field name="search_view_id" ref="view_purchase_order_filter"/>
352             <field name="help" type="html">
353               <p class="oe_view_nocontent_create">
354                 Click to create a request for quotation.
355               </p><p>
356                 The quotation contains the history of the discussion/negociation
357                 you had with your supplier. Once confirmed, a request for
358                 quotation is converted into a purchase order.
359               </p><p>
360                 Most propositions of purchase orders are created automatically
361                 by OpenERP based on inventory needs.
362               </p>
363             </field>
364         </record>
365         <menuitem action="purchase_rfq" id="menu_purchase_rfq"
366             parent="menu_procurement_management"
367             sequence="0"/>
368
369         <record id="purchase_form_action" model="ir.actions.act_window">
370             <field name="name">Purchase Orders</field>
371             <field name="type">ir.actions.act_window</field>
372             <field name="res_model">purchase.order</field>
373             <field name="view_mode">tree,form,graph,calendar</field>
374             <field name="context">{'search_default_approved': 1}</field>
375             <field name="search_view_id" ref="view_purchase_order_filter"/>
376             <field name="help" type="html">
377               <p class="oe_view_nocontent_create">
378                 Click to create a quotation that will be converted into a purchase order. 
379               </p><p>
380                 Use this menu to search within your purchase orders by
381                 references, supplier, products, etc. For each purchase order,
382                 you can track the related discussion with the supplier, control
383                 the products received and control the supplier invoices.
384               </p>
385             </field>
386         </record>
387         <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
388
389         <record id="purchase_order_line_form" model="ir.ui.view">
390             <field name="name">purchase.order.line.form</field>
391             <field name="model">purchase.order.line</field>
392             <field name="arch" type="xml">
393                 <form string="Purchase Order Line" version="7.0">
394                     <sheet>
395                         <group>
396                             <group>
397                                 <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,context)"/>
398                                 <label for="product_qty"/>
399                                 <div>
400                                     <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,context)" class="oe_inline"/>
401                                     <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,context)" class="oe_inline"/>
402                                 </div>
403                                 <field name="price_unit"/>
404                             </group>
405                             <group>
406                                 <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
407                                 <field name="date_planned" widget="date"/>
408                                 <field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
409                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
410                             </group>
411                         </group>
412                         <notebook>
413                         <page string="Notes">
414                             <field name="name"/>
415                         </page><page string="Invoices and Receptions">
416                             <field name="invoice_lines"/>
417                             <field name="move_ids"/>
418                         </page>
419                         </notebook>
420                     </sheet>
421                 </form>
422             </field>
423         </record>
424
425         <record id="purchase_order_line_tree" model="ir.ui.view">
426             <field name="name">purchase.order.line.tree</field>
427             <field name="model">purchase.order.line</field>
428             <field name="arch" type="xml">
429                 <tree string="Purchase Order Lines">
430                     <field name="order_id"/>
431                     <field name="name"/>
432                     <field name="partner_id" string="Supplier" />
433                     <field name="product_id"/>
434                     <field name="price_unit"/>
435                     <field name="product_qty"/>
436                     <field name="product_uom" groups="product.group_uom"/>
437                     <field name="price_subtotal"/>
438                     <field name="date_planned"  widget="date" width="135"/>
439                     <field name="state" invisible="1"/>
440                     <field name="invoiced" invisible="1"/>
441                 </tree>
442             </field>
443         </record>
444         <record id="purchase_order_line_form2" model="ir.ui.view">
445             <field name="name">purchase.order.line.form2</field>
446             <field name="model">purchase.order.line</field>
447             <field name="priority" eval="20"/>
448             <field name="arch" type="xml">
449                 <form string="Purchase Order Line" version="7.0">
450                     <sheet>
451                         <label for="order_id" class="oe_edit_only"/>
452                         <h1>
453                             <field name="order_id" class="oe_inline"/>
454                             <label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
455                             <field name="date_order" class="oe_inline"/>
456                         </h1>
457                         <label for="partner_id" class="oe_edit_only"/>
458                         <h2><field name="partner_id"/></h2>
459                         <group>
460                             <group>
461                                 <field name="product_id" readonly="1"/>
462                                 <label for="product_qty"/>
463                                 <div>
464                                     <field name="product_qty" readonly="1" class="oe_inline"/>
465                                     <field name="product_uom" readonly="1" groups="product.group_uom" class="oe_inline"/>
466                                 </div>
467                                 <field name="price_unit"/>
468                             </group>
469                             <group>
470                                 <field name="taxes_id" widget="many2many_tags"
471                                     domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
472                                 <field name="date_planned" widget="date" readonly="1"/>
473                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
474                                 <field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
475                                 <field name="invoiced"/>
476                             </group>
477                         </group>
478                         <field name="name"/>
479                         <separator string="Manual Invoices"/>
480                         <field name="invoice_lines"/>
481                         <separator string="Stock Moves"/>
482                         <field name="move_ids"/>
483                     </sheet>
484                 </form>
485             </field>
486         </record>
487           <record id="purchase_order_line_search" model="ir.ui.view">
488             <field name="name">purchase.order.line.search</field>
489             <field name="model">purchase.order.line</field>
490             <field name="arch" type="xml">
491                 <search string="Search Purchase Order">
492                     <field name="order_id"/>
493                     <field name="product_id"/>
494                     <field name="partner_id" string="Supplier"/>
495                     <group expand="0" string="Group By...">
496                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
497                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
498                         <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
499                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
500                     </group>
501                 </search>
502             </field>
503         </record>
504
505         <act_window
506             context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
507             id="action_purchase_line_product_tree"
508             name="Purchases"
509             res_model="purchase.order.line"
510             src_model="product.product"
511             groups="purchase.group_purchase_user"/>
512
513
514         <record id="purchase_line_form_action2" model="ir.actions.act_window">
515             <field name="name">On Purchase Order Lines</field>
516             <field name="type">ir.actions.act_window</field>
517             <field name="res_model">purchase.order.line</field>
518             <field name="domain">[('order_id.invoice_method','&lt;&gt;','picking'), ('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
519             <field name="view_type">form</field>
520             <field name="view_mode">tree,form</field>
521             <field name="search_view_id" ref="purchase_order_line_search"/>
522             <field name="help" type="html">
523               <p>
524                 Here you can track all the lines of purchase orders where the
525                 invoicing is "Based on Purchase Order Lines", and for which you
526                 have not received a supplier invoice yet. You can generate a
527                 draft supplier invoice based on the lines from this list.
528               </p>
529             </field>
530         </record>
531         <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
532             <field eval="1" name="sequence"/>
533             <field name="view_mode">tree</field>
534             <field name="view_id" ref="purchase_order_line_tree"/>
535             <field name="act_window_id" ref="purchase_line_form_action2"/>
536         </record>
537         <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
538             <field eval="2" name="sequence"/>
539             <field name="view_mode">form</field>
540             <field name="view_id" ref="purchase_order_line_form2"/>
541             <field name="act_window_id" ref="purchase_line_form_action2"/>
542         </record>
543         <menuitem
544             action="purchase_line_form_action2"
545             id="menu_purchase_line_order_draft"
546             parent="menu_procurement_management_invoice"
547             sequence="72"/>
548
549         <!-- Procurements -->
550
551         <record id="view_procurement_form_inherit" model="ir.ui.view">
552             <field name="name">procurement.order.form.inherit</field>
553             <field name="model">procurement.order</field>
554             <field name="inherit_id" ref="procurement.procurement_form_view"/>
555             <field name="arch" type="xml">
556                 <xpath expr="//field[@name='close_move']" position="before">
557                     <field name="purchase_id"/>
558                 </xpath>
559             </field>
560         </record>
561         
562         <!-- Product Suppliers-->
563         
564         <record id="view_product_supplier_inherit" model="ir.ui.view">
565             <field name="name">product.normal.supplier.form.inherit</field>
566             <field name="model">product.product</field>
567             <field name="inherit_id" ref="product.product_normal_form_view"/>
568             <field name="arch" type="xml">
569                 <group name="procurement" position="after">
570                      <separator string="Suppliers"/>
571                      <field name="seller_ids" context="{'uom_id': uom_id}"/>
572                 </group>
573             </field>
574         </record>
575     </data>
576 </openerp>