[IMP] Addons: added invisible field for message_is_follower; note: reidented view...
[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" groups="purchase.group_purchase_manager"/>
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="Reception &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_is_follower" invisible="1"/>
268                     <field name="message_ids" widget="mail_thread"/>
269                     <field name="message_follower_ids" widget="mail_followers"/>
270                 </div>
271                 </form>
272             </field>
273         </record>
274
275        <record id="view_request_for_quotation_filter" model="ir.ui.view">
276             <field name="name">request.quotation.select</field>
277             <field name="model">purchase.order</field>
278             <field name="arch" type="xml">
279                 <search string="Search Purchase Order">
280                     <field name="name" string="Reference"/>
281                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase order which are in draft state"/>
282                     <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]" help="Approved purchase order"/>
283                     <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"/>
284                     <separator/>
285                     <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."/>
286                     <field name="partner_id"/>
287                     <field name="product_id"/>
288                     <field name="create_uid"/>
289                     <group expand="0" string="Group By...">
290                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
291                         <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
292                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
293                         <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
294                         <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
295                     </group>
296                 </search>
297             </field>
298         </record>
299
300         <record id="view_purchase_order_filter" model="ir.ui.view">
301             <field name="name">purchase.order.list.select</field>
302             <field name="model">purchase.order</field>
303             <field name="arch" type="xml">
304                 <search string="Search Purchase Order">
305                     <field name="name" string="Reference"/>
306                     <filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
307                     <separator/>
308                     <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase orders which are in draft state"/>
309                     <filter icon="terp-check" name="approved" string="Purchase Orders" domain="[('state','not in',('draft','cancel'))]" help="Approved purchase orders"/>
310                     <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase orders which are in exception state"/>
311                     <separator/>
312                     <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."/>
313                     <field name="partner_id"/>
314                     <field name="product_id"/>
315                     <field name="create_uid"/>
316                     <group expand="0" string="Group By...">
317                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
318                         <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
319                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
320                         <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
321                         <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
322                     </group>
323                 </search>
324             </field>
325         </record>
326
327         <record id="purchase_order_tree" model="ir.ui.view">
328             <field name="name">purchase.order.tree</field>
329             <field name="model">purchase.order</field>
330             <field name="arch" type="xml">
331                 <tree fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
332                     <field name="message_unread" invisible="1"/>
333                     <field name="name" string="Reference"/>
334                     <field name="date_order" />
335                     <field name="partner_id"/>
336                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
337                     <field name="minimum_planned_date" invisible="context.get('quotation_only', False)"/>
338                     <field name="origin"/>
339                     <field name="amount_untaxed" sum="Total Untaxed amount"/>
340                     <field name="amount_total" sum="Total amount"/>
341                     <field name="state"/>
342                 </tree>
343             </field>
344         </record>
345
346         <record id="purchase_rfq" model="ir.actions.act_window">
347             <field name="name">Quotations</field>
348             <field name="type">ir.actions.act_window</field>
349             <field name="res_model">purchase.order</field>
350             <field name="context">{'search_default_draft': 1}</field>
351             <field name="domain">[('state','in',('draft','sent','confirmed'))]</field>
352             <field name="view_mode">tree,form,graph,calendar</field>
353             <field name="search_view_id" ref="view_purchase_order_filter"/>
354             <field name="help" type="html">
355               <p class="oe_view_nocontent_create">
356                 Click to create a request for quotation.
357               </p><p>
358                 The quotation contains the history of the discussion/negociation
359                 you had with your supplier. Once confirmed, a request for
360                 quotation is converted into a purchase order.
361               </p><p>
362                 Most propositions of purchase orders are created automatically
363                 by OpenERP based on inventory needs.
364               </p>
365             </field>
366         </record>
367         <menuitem action="purchase_rfq" id="menu_purchase_rfq"
368             parent="menu_procurement_management"
369             sequence="0"/>
370
371         <record id="purchase_form_action" model="ir.actions.act_window">
372             <field name="name">Purchase Orders</field>
373             <field name="type">ir.actions.act_window</field>
374             <field name="res_model">purchase.order</field>
375             <field name="view_mode">tree,form,graph,calendar</field>
376             <field name="context">{}</field>
377             <field name="domain">[('state','not in',('draft','sent','confirmed'))]</field>
378             <field name="search_view_id" ref="view_purchase_order_filter"/>
379             <field name="help" type="html">
380               <p class="oe_view_nocontent_create">
381                 Click to create a quotation that will be converted into a purchase order. 
382               </p><p>
383                 Use this menu to search within your purchase orders by
384                 references, supplier, products, etc. For each purchase order,
385                 you can track the related discussion with the supplier, control
386                 the products received and control the supplier invoices.
387               </p>
388             </field>
389         </record>
390         <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
391
392         <record id="purchase_order_line_form" model="ir.ui.view">
393             <field name="name">purchase.order.line.form</field>
394             <field name="model">purchase.order.line</field>
395             <field name="arch" type="xml">
396                 <form string="Purchase Order Line" version="7.0">
397                     <sheet>
398                         <group>
399                             <group>
400                                 <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)"/>
401                                 <label for="product_qty"/>
402                                 <div>
403                                     <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"/>
404                                     <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"/>
405                                 </div>
406                                 <field name="price_unit"/>
407                             </group>
408                             <group>
409                                 <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
410                                 <field name="date_planned" widget="date"/>
411                                 <field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
412                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
413                             </group>
414                         </group>
415                         <notebook>
416                         <page string="Notes">
417                             <field name="name"/>
418                         </page><page string="Invoices and Receptions">
419                             <field name="invoice_lines"/>
420                             <field name="move_ids"/>
421                         </page>
422                         </notebook>
423                     </sheet>
424                 </form>
425             </field>
426         </record>
427
428         <record id="purchase_order_line_tree" model="ir.ui.view">
429             <field name="name">purchase.order.line.tree</field>
430             <field name="model">purchase.order.line</field>
431             <field name="arch" type="xml">
432                 <tree string="Purchase Order Lines">
433                     <field name="order_id"/>
434                     <field name="name"/>
435                     <field name="partner_id" string="Supplier" />
436                     <field name="product_id"/>
437                     <field name="price_unit"/>
438                     <field name="product_qty"/>
439                     <field name="product_uom" groups="product.group_uom"/>
440                     <field name="price_subtotal"/>
441                     <field name="date_planned"  widget="date" width="135"/>
442                     <field name="state" invisible="1"/>
443                     <field name="invoiced" invisible="1"/>
444                 </tree>
445             </field>
446         </record>
447         <record id="purchase_order_line_form2" model="ir.ui.view">
448             <field name="name">purchase.order.line.form2</field>
449             <field name="model">purchase.order.line</field>
450             <field name="priority" eval="20"/>
451             <field name="arch" type="xml">
452                 <form string="Purchase Order Line" version="7.0">
453                     <sheet>
454                         <label for="order_id" class="oe_edit_only"/>
455                         <h1>
456                             <field name="order_id" class="oe_inline"/>
457                             <label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
458                             <field name="date_order" class="oe_inline"/>
459                         </h1>
460                         <label for="partner_id" class="oe_edit_only"/>
461                         <h2><field name="partner_id"/></h2>
462                         <group>
463                             <group>
464                                 <field name="product_id" readonly="1"/>
465                                 <label for="product_qty"/>
466                                 <div>
467                                     <field name="product_qty" readonly="1" class="oe_inline"/>
468                                     <field name="product_uom" readonly="1" groups="product.group_uom" class="oe_inline"/>
469                                 </div>
470                                 <field name="price_unit"/>
471                             </group>
472                             <group>
473                                 <field name="taxes_id" widget="many2many_tags"
474                                     domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
475                                 <field name="date_planned" widget="date" readonly="1"/>
476                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
477                                 <field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
478                                 <field name="invoiced"/>
479                             </group>
480                         </group>
481                         <field name="name"/>
482                         <separator string="Manual Invoices"/>
483                         <field name="invoice_lines"/>
484                         <separator string="Stock Moves"/>
485                         <field name="move_ids"/>
486                     </sheet>
487                 </form>
488             </field>
489         </record>
490           <record id="purchase_order_line_search" model="ir.ui.view">
491             <field name="name">purchase.order.line.search</field>
492             <field name="model">purchase.order.line</field>
493             <field name="arch" type="xml">
494                 <search string="Search Purchase Order">
495                     <field name="order_id"/>
496                     <field name="product_id"/>
497                     <field name="partner_id" string="Supplier"/>
498                     <group expand="0" string="Group By...">
499                         <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
500                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
501                         <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
502                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
503                     </group>
504                 </search>
505             </field>
506         </record>
507
508         <act_window
509             context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
510             id="action_purchase_line_product_tree"
511             name="Purchases"
512             res_model="purchase.order.line"
513             src_model="product.product"
514             groups="purchase.group_purchase_user"/>
515
516
517         <record id="purchase_line_form_action2" model="ir.actions.act_window">
518             <field name="name">On Purchase Order Lines</field>
519             <field name="type">ir.actions.act_window</field>
520             <field name="res_model">purchase.order.line</field>
521             <field name="domain">[('order_id.invoice_method','&lt;&gt;','picking'), ('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
522             <field name="view_type">form</field>
523             <field name="view_mode">tree,form</field>
524             <field name="search_view_id" ref="purchase_order_line_search"/>
525             <field name="help" type="html">
526               <p>
527                 Here you can track all the lines of purchase orders where the
528                 invoicing is "Based on Purchase Order Lines", and for which you
529                 have not received a supplier invoice yet. You can generate a
530                 draft supplier invoice based on the lines from this list.
531               </p>
532             </field>
533         </record>
534         <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
535             <field eval="1" name="sequence"/>
536             <field name="view_mode">tree</field>
537             <field name="view_id" ref="purchase_order_line_tree"/>
538             <field name="act_window_id" ref="purchase_line_form_action2"/>
539         </record>
540         <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
541             <field eval="2" name="sequence"/>
542             <field name="view_mode">form</field>
543             <field name="view_id" ref="purchase_order_line_form2"/>
544             <field name="act_window_id" ref="purchase_line_form_action2"/>
545         </record>
546         <menuitem
547             action="purchase_line_form_action2"
548             id="menu_purchase_line_order_draft"
549             parent="menu_procurement_management_invoice"
550             sequence="72"/>
551
552         <!-- Procurements -->
553
554         <record id="view_procurement_form_inherit" model="ir.ui.view">
555             <field name="name">procurement.order.form.inherit</field>
556             <field name="model">procurement.order</field>
557             <field name="inherit_id" ref="procurement.procurement_form_view"/>
558             <field name="arch" type="xml">
559                 <xpath expr="//field[@name='close_move']" position="before">
560                     <field name="purchase_id"/>
561                 </xpath>
562             </field>
563         </record>
564         
565         <!-- Product Suppliers-->
566         
567         <record id="view_product_supplier_inherit" model="ir.ui.view">
568             <field name="name">product.normal.supplier.form.inherit</field>
569             <field name="model">product.product</field>
570             <field name="inherit_id" ref="product.product_normal_form_view"/>
571             <field name="arch" type="xml">
572                 <group name="procurement" position="after">
573                      <separator string="Suppliers"/>
574                      <field name="seller_ids" context="{'uom_id': uom_id}"/>
575                 </group>
576             </field>
577         </record>
578     </data>
579 </openerp>