~unifield-team/unifield-wm/us-927

« back to all changes in this revision

Viewing changes to delete_button/view/kit_view.xml

  • Committer: matthieu.choplin at msf
  • Date: 2012-08-17 14:50:02 UTC
  • mto: This revision was merged to the branch mainline in revision 1116.
  • Revision ID: matthieu.choplin@geneva.msf.org-20120817145002-kuhewnsw7njvjapd
uf-1346: hide the delete button when the doc are not in draft state and remove the method allow_cancel of picking because the method was already done by PMA. The delete button is now a button of type 'object' for the modified doc.

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
    <!-- KIT -->
 
5
        <record id="view_composition_kit_form" model="ir.ui.view">
 
6
            <field name="name">composition.kit.form</field>
 
7
            <field name="model">composition.kit</field>
 
8
            <field name="type">form</field>
 
9
            <field name="priority">300</field>
 
10
            <field name="inherit_id" ref="kit.view_composition_kit_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_composition_kit_tree" model="ir.ui.view">
 
22
            <field name="name">composition.kit.tree</field>
 
23
            <field name="model">composition.kit</field>
 
24
            <field name="type">tree</field>
 
25
            <field name="priority">300</field>
 
26
            <field name="inherit_id" ref="kit.view_composition_kit_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']" position="after">
 
33
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
 
34
                        states='draft' />
 
35
                    </xpath>
 
36
                </data>
 
37
            </field>
 
38
        </record>
 
39
    </data>
 
40
</openerp>
 
 
b'\\ No newline at end of file'