improve surveys layout
bzr revid: vba@tinyerp.com-20120703114047-bjd78b5x55wq9mai
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 55 KiB |
|
@ -23,6 +23,14 @@
|
|||
<button name="survey_open" string="Open" states="cancel,close" type="object"/>
|
||||
<button name="survey_close" string="Close" states="open" type="object"/>
|
||||
<button name="survey_cancel" string="Cancel" states="open" type="object"/>
|
||||
<button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
|
||||
string="Test Survey" icon="gtk-new" type="action"
|
||||
context="{'active':True,'survey_id': active_id}" attrs="{'invisible':[('id','=',0)]}"/>
|
||||
<button name="%(action_view_survey_question_message)d" states="open,draft"
|
||||
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"
|
||||
string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="open,close"/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
@ -30,13 +38,6 @@
|
|||
<field name="title" select="1"/>
|
||||
<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}" 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"
|
||||
string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Survey">
|
||||
|
@ -238,15 +239,13 @@
|
|||
<field name="tot_start_survey" string="Started"/>
|
||||
<field name="tot_comp_survey" string="Completed"/>
|
||||
<field name="state" select="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}"/>
|
||||
<button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
|
||||
<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}"/>
|
||||
<button name="%(action_view_survey_question_message)d" states="open,draft"
|
||||
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"
|
||||
string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
|
||||
<button name="action_print_survey" states="open,draft,close,cancel"
|
||||
string="Print Answer" type="object" icon="gtk-print"/>
|
||||
string="Print Answer" type="object" icon="gtk-print"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -146,7 +146,7 @@ class survey_question_wiz(osv.osv_memory):
|
|||
pre_button = True
|
||||
if flag:
|
||||
pag_rec = page_obj.browse(cr, uid, p_id, context=context)
|
||||
xml_form = etree.Element('form', {'string': tools.ustr(pag_rec.title)})
|
||||
xml_form = etree.Element('form', {'string': tools.ustr(sur_rec.title)})
|
||||
xml_header = etree.SubElement(xml_form, 'header', {'col': '6', 'colspan': '4'})
|
||||
xml_header_title = etree.SubElement(xml_header, 'group', {'col': '6', 'colspan': '6'})
|
||||
|
||||
|
@ -156,8 +156,9 @@ class survey_question_wiz(osv.osv_memory):
|
|||
#fields['progress_bar_' + tools.ustr(page_number)] = {'type':'float', 'string':"Progress", 'views':{}}
|
||||
# etree.SubElement(xml_group, 'label', {'string': tools.ustr(tools.ustr(pag_rec.note)), 'align':"0.0"})
|
||||
|
||||
etree.SubElement(xml_header_title, 'label', {'string': tools.ustr(pag_rec.title) ,'colspan': '2' })
|
||||
etree.SubElement(xml_header_title, 'label', {'string': tools.ustr(pag_rec.title) ,'colspan': '2' ,'class':'oe_horizontal_separator'})
|
||||
xml_header_group = etree.SubElement(xml_header_title, 'group', {'col': '4', 'colspan': '2'})
|
||||
#xml_header_page = etree.SubElement(xml_header_title, 'group', {'col': '1', 'colspan': '1'})
|
||||
xml_group = etree.SubElement(xml_form, 'group', {'col': '8', 'colspan': '4'})
|
||||
|
||||
etree.SubElement(xml_header_group, 'label', {'string': tools.ustr(page_number+ 1) + "/" + tools.ustr(total_pages), 'class':"oe_right"})
|
||||
|
@ -175,7 +176,8 @@ class survey_question_wiz(osv.osv_memory):
|
|||
etree.SubElement(xml_header_group, 'button', {'special': "cancel", 'string' : 'Done', 'context' : tools.ustr(context), 'class':"oe_right"})
|
||||
else:
|
||||
etree.SubElement(xml_header_group, 'button', {'name':"action_next",'string': tools.ustr(but_string) ,'type':"object",'context' : tools.ustr(context), 'class':"oe_right"})
|
||||
|
||||
# etree.SubElement(xml_header_page, 'label', {'string': tools.ustr(page_number+ 1) + "/" + tools.ustr(total_pages), 'class':"oe_right"})
|
||||
|
||||
############# PAGE HEADER : END ###################
|
||||
|
||||
if context.has_key('active') and context.get('active',False) and context.has_key('edit'):
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
</record>
|
||||
|
||||
<record id="action_view_survey_question_message" model="ir.actions.act_window">
|
||||
<field name="name">Answer Survey</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">survey.question.wiz</field>
|
||||
<field name="view_type">form</field>
|
||||
|
|