[IMP] survery : the button Test survey shouldn't be available before saving the survey
authorVir (Open ERP) <vir@tinyerp.com>
Wed, 29 Sep 2010 06:23:16 +0000 (11:53 +0530)
committerVir (Open ERP) <vir@tinyerp.com>
Wed, 29 Sep 2010 06:23:16 +0000 (11:53 +0530)
bzr revid: vir@tinyerp.com-20100929062316-a8nq1ps498pytof1

addons/survey/survey_view.xml

index 6c9027a..40288a6 100644 (file)
                     <field name="title" select="1"/>
                     <group col="6" colspan="6">
                         <field name="responsible_id"/>
+                        <field name="id" invisible="1"/>
                         <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
                             string="Test Survey" type="action" icon="gtk-new"
-                            context="{'active':True,'survey_id': active_id}"/>
+                            context="{'active':True,'survey_id': active_id}" attrs="{'invisible':[('id','=',0)]}"/>
                         <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
                             string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
                         <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"