[IMP] change statename cancelled to draft in appraisal form
bzr revid: fka@tinyerp.com-20120918124155-4uy3d2z3f787tzav
This commit is contained in:
parent
9f22af90b0
commit
2d8aed7846
|
@ -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'), ('cancel', 'Cancelled'),('close', 'Closed') ], 'Status', readonly=True),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'Open'), ('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),
|
||||
|
@ -87,8 +87,8 @@ class survey(osv.osv):
|
|||
self.write(cr, uid, ids, {'state': 'close', 'date_close': strftime("%Y-%m-%d %H:%M:%S") })
|
||||
return True
|
||||
|
||||
def survey_cancel(self, cr, uid, ids, arg):
|
||||
self.write(cr, uid, ids, {'state': 'cancel' })
|
||||
def survey_draft(self, cr, uid, ids, arg):
|
||||
self.write(cr, uid, ids, {'state': 'draft' })
|
||||
return True
|
||||
|
||||
def copy(self, cr, uid, ids, default=None, context=None):
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Survey" version="7.0">
|
||||
<header>
|
||||
<button name="survey_open" string="Open" states="cancel,close" type="object"/>
|
||||
<button name="survey_open" string="Open" states="draft,close" type="object"/>
|
||||
<button name="survey_close" string="Close" states="open" type="object" class="oe_highlight"/>
|
||||
<button name="survey_cancel" string="Cancel" states="open" type="object"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="open,close"/>
|
||||
<button name="survey_draft" string="Set to Draft" states="open" type="object"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,open,close"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box oe_right">
|
||||
|
|
Loading…
Reference in New Issue