~unifield-team/unifield-wm/us-826

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
    
        <record id="purchase_order_form" model="ir.ui.view">
            <field name="name">purchase.order.form</field>
            <field name="model">purchase.order</field>
            <field name="type">form</field>
            <field name="priority">301</field>
            <field name="inherit_id" ref="purchase.purchase_order_form" />
            <field name="arch" type="xml">
                <data>
                    <xpath expr="/form/group/field[@name='invoiced']" position="attributes" >
                        <attribute name="attrs">{'invisible':[('state', 'in', ('draft','confirmed'))]}</attribute>
                    </xpath>
                    <xpath expr="/form/group/field[@name='shipped']" position="attributes" >
                        <attribute name="attrs">{'invisible':[('state', 'in', ('draft','confirmed'))]}</attribute>
                    </xpath>
                </data>
            </field>
        </record>
        
        
        <!-- We remove the default user who was the current user id -->
        <record id="purchase.purchase_form_action" model="ir.actions.act_window">
            <field name="name">Purchase Orders</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">purchase.order</field>
            <field name="view_mode">tree,form,graph,calendar</field>
            <!-- WAS
            <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
             -->
            <field name="context">{'search_default_approved': 1, 'purchase_order': True}</field>
            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
            <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>
        </record>
        
        
    </data>
</openerp>