[IMP]:survey
- improved the survey view. bzr revid: apa@tinyerp.com-20100205135149-6b1s7kk1bfmhisij
This commit is contained in:
+2
-13
@@ -510,12 +510,13 @@ class survey_response(osv.osv):
|
||||
'survey_id' : fields.many2one('survey', 'Survey', required=1, ondelete='cascade'),
|
||||
'date_create' : fields.datetime('Create Date', required=1),
|
||||
'user_id' : fields.many2one('res.users', 'User'),
|
||||
'response_type' : fields.selection([('manually', 'Manually'), ('link', 'Link')], 'Response Type', required=1),
|
||||
'response_type' : fields.selection([('manually', 'Manually'), ('link', 'Link')], 'Response Type', required=1, readonly=1),
|
||||
'question_ids' : fields.one2many('survey.response.line', 'response_id', 'Response Answer'),
|
||||
'state' : fields.selection([('done', 'Finished '),('skip', 'Not Finished')], 'Status', readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'state' : lambda * a: "skip",
|
||||
'response_type' : lambda * a: "manually",
|
||||
}
|
||||
def copy(self, cr, uid, id, default=None,context={}):
|
||||
raise osv.except_osv(_('Error !'),_('You cannot duplicate the resource!'))
|
||||
@@ -541,18 +542,6 @@ class survey_response_line(osv.osv):
|
||||
'state' : lambda * a: "draft",
|
||||
}
|
||||
|
||||
def response_draft(self, cr, uid, ids, arg):
|
||||
self.write(cr, uid, ids, { 'state' : 'draft' })
|
||||
return True
|
||||
|
||||
def response_done(self, cr, uid, ids, arg):
|
||||
self.write(cr, uid, ids, { 'state' : 'done' })
|
||||
return True
|
||||
|
||||
def response_skip(self, cr, uid, ids, arg):
|
||||
self.write(cr, uid, ids, { 'state' : 'skip' })
|
||||
return True
|
||||
|
||||
survey_response_line()
|
||||
|
||||
class survey_tbl_column_heading(osv.osv):
|
||||
|
||||
@@ -853,13 +853,6 @@
|
||||
<field name="response_answer_ids" colspan="4" nolabel="1"/>
|
||||
<group col="5" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="response_draft"
|
||||
string="Set to draft" states="done,skip" type="object"
|
||||
icon="gtk-new"/>
|
||||
<button name="response_done" string="Done"
|
||||
states="draft" type="object" icon="gtk-go-forward"/>
|
||||
<button name="response_skip" string="Skip"
|
||||
states="draft" type="object" icon="gtk-close"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Single Textboxes">
|
||||
@@ -1127,7 +1120,7 @@
|
||||
groups="group_survey_manager,group_survey_user" icon="STOCK_INDEX"/>
|
||||
|
||||
<menuitem action="wizard_browse_answer" id="menu_wizard_browse_answer"
|
||||
parent="main_menu_survey" type="wizard"/>
|
||||
parent="main_menu_survey" type="wizard" groups="group_survey_manager"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user