[IMP]survey : Added state and buttons on top bar

bzr revid: mma@tinyerp.com-20120504111629-g1dasotn3a9fl712
This commit is contained in:
Mayur Maheshwari (OpenERP)
2012-05-04 16:46:29 +05:30
parent 2997e058c1
commit 16d26ec647
+13 -7
View File
@@ -1058,18 +1058,24 @@
<field name="model">survey.request</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Survey Request">
<form layout="manual">
<div class="oe_form_topbar">
<button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object" icon="gtk-new"/>
<button name="survey_req_waiting_answer" string="Waiting Answer" states="draft" type="object" icon="gtk-new"/>
<button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
<button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,waiting_answer"/>
</div>
</div>
<sheet string="Survey Request" layout="auto">
<group class="oe_form_header">
<field name="date_deadline"/>
<field name="survey_id"/>
<field name="user_id" on_change="on_change_user(user_id)"/>
<field name="response" readonly="1"/>
<group colspan="4" col="6">
<field name="state"/>
<button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>
<button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object" icon="gtk-new"/>
<button name="survey_req_waiting_answer" string="Waiting Answer" states="draft" type="object" icon="gtk-new"/>
<button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
</group>
</sheet>
</form>
</field>
</record>