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

« back to all changes in this revision

Viewing changes to delete_button/view/sale_view.xml

  • Committer: chloups208
  • Date: 2011-09-07 12:58:12 UTC
  • mto: (307.2.1 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 311.
  • Revision ID: chloups208@chloups208-laptop-20110907125812-dsb1jt93ae6bgfe2
[UF-390]pro forma invoice + shipment object refactoring + pack family object refactoring

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
 
    <!-- SALE ORDER -->
5
 
        <record id="view_order_form" model="ir.ui.view">
6
 
            <field name="name">sale.order.form</field>
7
 
            <field name="model">sale.order</field>
8
 
            <field name="type">form</field>
9
 
            <field name="priority">300</field>
10
 
            <field name="inherit_id" ref="sale.view_order_form" />
11
 
            <field name="arch" type="xml">
12
 
                <data>
13
 
                    <xpath expr="/form" position="attributes">
14
 
                        <attribute name='hide_delete_button'>1</attribute>
15
 
                    </xpath>
16
 
                </data>
17
 
            </field>
18
 
        </record>
19
 
        
20
 
        
21
 
        <record id="view_order_tree" model="ir.ui.view">
22
 
            <field name="name">sale.order.tree</field>
23
 
            <field name="model">sale.order</field>
24
 
            <field name="type">tree</field>
25
 
            <field name="priority">300</field>
26
 
            <field name="inherit_id" ref="sale.view_order_tree" />
27
 
            <field name="arch" type="xml">
28
 
                <data>
29
 
                    <xpath expr="/tree" position="attributes">
30
 
                        <attribute name='hide_delete_button'>1</attribute>
31
 
                    </xpath>
32
 
                    <xpath expr="/tree/field[@name='state_hidden_sale_order']" position="after">
33
 
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
34
 
                        attrs="{'invisible' : [('state','!=','draft')]}" confirm='Do you really want to delete selected record(s) ?'/>
35
 
                    </xpath>
36
 
                </data>
37
 
            </field>
38
 
        </record>
39
 
        
40
 
        <record id="view_sales_tree" model="ir.ui.view">
41
 
            <field name="name">sale.order.tree</field>
42
 
            <field name="model">sale.order</field>
43
 
            <field name="type">tree</field>
44
 
            <field name="priority">300</field>
45
 
            <field name="inherit_id" ref="useability_dashboard_and_menu.view_sales_tree" />
46
 
            <field name="arch" type="xml">
47
 
                <data>
48
 
                    <xpath expr="/tree" position="attributes">
49
 
                        <attribute name='hide_delete_button'>1</attribute>
50
 
                    </xpath>
51
 
                    <xpath expr="/tree/field[@name='state']" position="after">
52
 
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
53
 
                        states = 'draft' confirm='Do you really want to delete selected record(s) ?'/>
54
 
                    </xpath>
55
 
                </data>
56
 
            </field>
57
 
        </record>
58
 
        
59
 
    <!-- INTERNAL REQUEST -->
60
 
        <record id="procurement_request_form_view" model="ir.ui.view">
61
 
            <field name="name">procurement.request.form.view</field>
62
 
            <field name="model">sale.order</field>
63
 
            <field name="type">form</field>
64
 
            <field name="priority">300</field>
65
 
            <field name="inherit_id" ref="procurement_request.procurement_request_form_view" />
66
 
            <field name="arch" type="xml">
67
 
                <data>
68
 
                    <xpath expr="/form" position="attributes">
69
 
                        <attribute name='hide_delete_button'>1</attribute>
70
 
                    </xpath>
71
 
                </data>
72
 
            </field>
73
 
        </record>
74
 
        
75
 
        
76
 
        <record id="procurement_request_tree_view" model="ir.ui.view">
77
 
            <field name="name">procurement.request.tree.view</field>
78
 
            <field name="model">sale.order</field>
79
 
            <field name="type">tree</field>
80
 
            <field name="priority">300</field>
81
 
            <field name="inherit_id" ref="procurement_request.procurement_request_tree_view" />
82
 
            <field name="arch" type="xml">
83
 
                <data>
84
 
                    <xpath expr="/tree" position="attributes">
85
 
                        <attribute name='hide_delete_button'>1</attribute>
86
 
                    </xpath>
87
 
                    <xpath expr="/tree/field[@name='state']" position="after">
88
 
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
89
 
                        states='draft' confirm='Do you really want to delete selected record(s) ?' />
90
 
                    </xpath>
91
 
                </data>
92
 
            </field>
93
 
        </record>
94
 
    </data>
95
 
</openerp>
 
 
b'\\ No newline at end of file'