[IMP]project: put a attrs on stage field when project and stage is not there
authorMayur Maheshwari (OpenERP) <mma@tinyerp.com>
Wed, 2 May 2012 11:31:35 +0000 (17:01 +0530)
committerMayur Maheshwari (OpenERP) <mma@tinyerp.com>
Wed, 2 May 2012 11:31:35 +0000 (17:01 +0530)
bzr revid: mma@tinyerp.com-20120502113135-7wquldksmtmvxbx0

addons/project/project_view.xml

index fe64e67..56e106c 100644 (file)
                             <separator string="Miscelleanous" colspan="4"/>
                             <field name="partner_id" />
                             <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
-                            <group col="4" colspan="2">
+                            <group col="4" colspan="2" attrs="{'invisible': ['|', ('project_id','=', False), ('type_id','=', False)]}">
                                 <field name="type_id" widget="selection" readonly="1"/>
                                 <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
                                 <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
                         string="Change Stage"
                         type="object"
                         icon="gtk-go-forward"
-                        help="Change Type"/>
+                        help="Change Type" attrs="{'invisible': [('type_id','=', False)]}"/>
                     <field name="date_start" invisible="1" groups="base.group_no_one"/>
                     <field name="date_end" invisible="1" groups="base.group_no_one"/>
                     <field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>