[MERGE]:lp:~openerp-dev/openobject-addons/trunk-survey-topbar-tpa

bzr revid: apa@tinyerp.com-20120427121338-z8fger97ep0ftgul
This commit is contained in:
Amit Patel (OpenERP) 2012-04-27 17:43:38 +05:30
commit a57cf7ef19
2 changed files with 12 additions and 12 deletions

View File

@ -59,7 +59,7 @@ class survey(osv.osv):
help="Set to one if survey is answerable only once"),
'response_user': fields.integer('Maximum Answer per User',
help="Set to one if you require only one Answer per user"),
'state': fields.selection([('open', 'Open'), ('close', 'Closed'), ('cancel', 'Cancelled')], 'Status', readonly=True),
'state': fields.selection([('open', 'Open'), ('cancel', 'Cancelled'),('close', 'Closed') ], 'Status', readonly=True),
'responsible_id': fields.many2one('res.users', 'Responsible', help="User responsible for survey"),
'tot_start_survey': fields.integer("Total Started Survey", readonly=1),
'tot_comp_survey': fields.integer("Total Completed Survey", readonly=1),

View File

@ -18,7 +18,16 @@
<field name="model">survey</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Survey">
<form layout="manual">
<div class="oe_form_topbar">
<button name="survey_open" string="Open" states="cancel,close" type="object" icon="gtk-go-forward"/>
<button name="survey_close" string="Close" states="open" type="object" icon="gtk-close"/>
<button name="survey_cancel" string="Cancel" states="open" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,close"/>
</div>
</div>
<sheet string="Survey" layout="auto">
<field name="title" select="1"/>
<group col="6" colspan="6">
<field name="responsible_id"/>
@ -180,16 +189,6 @@
</field>
</form>
</field>
<group col="9" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="open,close"/>
<button name="survey_cancel"
string="Cancel" states="open" type="object" icon="gtk-cancel"/>
<button name="survey_open"
string="Open" states="cancel,close" type="object"
icon="gtk-go-forward"/>
<button name="survey_close"
string="Close" states="open" type="object" icon="gtk-close"/>
</group>
</page>
<page string="Other">
<group colspan="6" col='4'>
@ -223,6 +222,7 @@
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>