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

« back to all changes in this revision

Viewing changes to purchase_override/purchase_view.xml

  • Committer: chloups208
  • Date: 2011-08-23 06:36:05 UTC
  • mto: This revision was merged to the branch mainline in revision 253.
  • Revision ID: chloups208@chloups208-laptop-20110823063605-g92qqcpmnnb74iok
[UF-368]first commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8" ?>
2
 
<openerp>
3
 
    <data>
4
 
    
5
 
        <record id="purchase_order_type_form_view" model="ir.ui.view">
6
 
            <field name="name">purchase.order.type.form.view</field>
7
 
            <field name="model">purchase.order</field>
8
 
            <field name="type">form</field>
9
 
            <field name="inherit_id" ref="purchase.purchase_order_form" />
10
 
            <field name="arch" type="xml">
11
 
                <data>
12
 
                    <!-- <xpath expr="/form/notebook/page[@string='Purchase Order']/field[@name='partner_id']" position="replace">
13
 
                        <field name="partner_id" on_change="onchange_partner_id(partner_id, order_type)" context="{'search_default_supplier':1}" />
14
 
                    </xpath> -->
15
 
                    
16
 
                    <xpath expr="/form/group/field[@name='company_id']" position="before">
17
 
                        <field name="order_type" on_change="onchange_internal_type(order_type, partner_id)" />
18
 
                        <field name="priority" />
19
 
                        <newline />
20
 
                        <field name="categ" />
21
 
                        <field name="loan_duration" attrs="{'invisible': [('order_type', '!=', 'loan')], 'required': [('order_type', '=', 'loan')]}" />
22
 
                        <field name="details" />
23
 
                    </xpath>
24
 
                    <xpath expr="/form/notebook/page[@string='Delivery &amp; Invoicing']//field[@name='invoice_method']" position="replace">
25
 
                        <field name="invoice_method" attrs="{'readonly':[('state','in', ['confirmed','approved','done'] )] , 'invisible': [('order_type', 'in', ['donation_exp', 'donation_st', 'in_kind', 'loan'])]}" />
26
 
                    </xpath>
27
 
                </data>
28
 
            </field>
29
 
        </record>
30
 
        
31
 
        <record id="purchase_order_type_tree_view" model="ir.ui.view">
32
 
            <field name="name">purchase.order.type.tree.view</field>
33
 
            <field name="model">purchase.order</field>
34
 
            <field name="type">tree</field>
35
 
            <field name="inherit_id" ref="purchase.purchase_order_tree" />
36
 
            <field name="arch" type="xml">
37
 
                <data>
38
 
                    <xpath expr="/tree/field[@name='date_order']" position="before">
39
 
                        <field name="order_type" />
40
 
                    </xpath>
41
 
                </data>
42
 
            </field>
43
 
        </record>
44
 
        
45
 
        <record id="purchase_order_type_search_view" model="ir.ui.view">
46
 
            <field name="name">purchase.order.type.search.view</field>
47
 
            <field name="model">purchase.order</field>
48
 
            <field name="type">search</field>
49
 
            <field name="inherit_id" ref="purchase.view_purchase_order_filter" />
50
 
            <field name="arch" type="xml">
51
 
                <data>
52
 
                    <field name="product_id" position="after">
53
 
                        <field name="origin" />
54
 
                    </field>
55
 
                    <filter name="draft" position="replace">
56
 
                        <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state', 'in', ('draft',))]" separator="1" help="Purchase order which are in draft state"/>
57
 
                    </filter>
58
 
                    <xpath expr="/search/group/field[@name='create_uid']" position="after">
59
 
                    <newline />
60
 
                    <group string="Type" expand="0">
61
 
                                <filter icon="terp-check" string="Regular" domain="[('order_type','=','regular')]" />
62
 
                                <filter icon="terp-stage" string="Donation before expiry" domain="[('order_type','=','donation_exp')]" />
63
 
                                <filter icon="terp-gtk-jump-to-ltr" string="Standard Donation" domain="[('order_type','=','donation_st')]" />
64
 
                                <filter icon="terp-partner" string="Loan" domain="[('order_type','=','loan')]" />
65
 
                                <filter icon="terp-gtk-jump-to-rtl" string="In-Kind donation" domain="[('order_type','=','in_kind')]" />
66
 
                                <filter icon="terp-purchase" string="Purchase List" domain="[('order_type','=','purchase_list')]" />
67
 
                                <filter icon="terp-crm" string="Direct PO" domain="[('order_type','=','direct')]" />
68
 
                            </group>
69
 
                            <newline />
70
 
                            <group string="Priority" expand="0">
71
 
                            <filter icon="gtk-dialog-warning" string="Emergency" domain="[('priority','=','emergency')]"/>
72
 
                            <filter icon="gtk-yes" string="Normal" domain="[('priority','=','normal')]"/>
73
 
                            <filter icon="gtk-info" string="Medium" domain="[('priority','=','priority')]"/>
74
 
                            </group>
75
 
                            <newline />
76
 
                            <group string="Category" expand="0">
77
 
                            <filter icon="gtk-color-picker" string="Medical" domain="[('categ','=','medical')]"/>
78
 
                            <filter icon="terp-stock" string="Logistic" domain="[('categ','=','log')]"/>
79
 
                            <filter icon="terp-accessories-archiver" string="Food" domain="[('categ','=','food')]"/>
80
 
                            <filter icon="terp-purchase" string="Service" domain="[('categ','=','service')]"/>
81
 
                            <filter icon="gtk-network" string="Asset" domain="[('categ','=','asset')]"/>
82
 
                            <filter icon="terp-stock_symbol-selection" string="Mixed" domain="[('categ','=','mixed')]"/>
83
 
                            <filter icon="gtk-harddisk" string="Other" domain="[('categ','=','other')]"/>                            
84
 
                            </group>
85
 
                        <newline />
86
 
                    </xpath>
87
 
                    <xpath expr="/search/group[2]/filter[@string='Supplier']" position="before">
88
 
                        <filter string="Order Type" icon="terp-rating-rated" domain="[]" context="{'group_by':'order_type'}"/>
89
 
                        <separator orientation="vertical"/>
90
 
                        <filter string="Priority" icon="terp-project" domain="[]" context="{'group_by':'priority'}"/>
91
 
                        <separator orientation="vertical"/>
92
 
                        <filter string="Category" icon="terp-translate" domain="[]" context="{'group_by':'categ'}"/>
93
 
                        <separator orientation="vertical"/>
94
 
                    </xpath>
95
 
                </data>
96
 
            </field>
97
 
        </record>
98
 
        
99
 
        <record id="purchase.purchase_form_action" model="ir.actions.act_window">
100
 
            <field name="name">Purchase Orders</field>
101
 
            <field name="type">ir.actions.act_window</field>
102
 
            <field name="res_model">purchase.order</field>
103
 
            <field name="view_mode">tree,form,graph,calendar</field>
104
 
            <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
105
 
            <field name="domain">[('tender_id', '=', False),]</field>
106
 
            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
107
 
            <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>
108
 
        </record>
109
 
    
110
 
    </data>
111
 
</openerp>