[FIX] compatibility with survey

bzr revid: rim@openerp.com-20131021145633-f61radfexcgcynw5
This commit is contained in:
Richard Mathot (OpenERP) 2013-10-21 16:56:33 +02:00
parent 8ebca9ac0f
commit ae3d3bd4d4
3 changed files with 15 additions and 15 deletions

View File

@ -7,7 +7,7 @@
<field name="res_model">hr.evaluation.interview</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="domain">[('is_evaluation' ,'=', True), ('user_id', '=', uid),('state','=','waiting_answer')]</field>
<field name="domain">[('is_evaluation' ,'=', True), ('state','=','wait')]</field>
<field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
</record>

View File

@ -304,7 +304,7 @@ class hr_evaluation_interview(osv.osv):
return res
def survey_req_waiting_answer(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, { 'state': 'waiting_answer'}, context=context)
self.write(cr, uid, ids, { 'state': 'wait'}, context=context)
return True
def survey_req_done(self, cr, uid, ids, context=None):

View File

@ -183,7 +183,7 @@
<field nolabel="1" name="survey_response_ids" attrs="{'readonly': [('state', '=', 'done')]}">
<form string="Interview Appraisal" version="7.0">
<div class="oe_right oe_button_box">
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="open" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
</div>
<group>
@ -200,7 +200,7 @@
<group col="4" string="Status" invisible="1">
<field name="state"/>
<div>
<button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" />
<button string="Done" name="survey_req_done" states="open" type="object" icon="gtk-jump-to" />
</div>
</group>
</form>
@ -288,24 +288,24 @@
<form string="Interview Appraisal" version="7.0">
<header>
<button string="Cancel Survey" name="survey_req_cancel" type="object"
states="draft,waiting_answer" class="oe_left"/>
states="draft,open" class="oe_left"/>
<button string="Print Survey" name="action_print_survey" type="object"
states="draft" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}"
attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
<button string="Send Request" name="survey_req_waiting_answer" type="object"
<button string="Send Request" name="survey_req_open" type="object"
states="draft" class="oe_highlight"/>
<button string="Answer Survey" name="%(survey.action_view_survey_question_message)d" type="action"
states="waiting_answer" class="oe_highlight"
states="open" class="oe_highlight"
context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}"
attrs="{'readonly':[('survey_id','=',False)]}"/>
<button string="Done" name="survey_req_done" type="object"
states="waiting_answer"/>
<field name="state" widget="statusbar" statusbar_visible="waiting_answer,done"/>
states="open"/>
<field name="state" widget="statusbar" statusbar_visible="open,done"/>
</header>
<sheet>
<div class="oe_right oe_button_box" name="button_box">
<button string="Send Reminder Email" name="%(mail.action_email_compose_message_wizard)d" type="action"
states="waiting_answer"
states="open"
context="{'default_body_text': 'Hello,\n\nKindly post your response for the survey interview.\n\nThanks',
'default_subject': 'Reminder to fill up Survey' }"/>
</div>
@ -336,12 +336,12 @@
<!-- <field name="user_id" string="Interviewer"/> -->
<field name="user_to_review_id"/>
<field name="response_id" readonly="1" invisible="True"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="open" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
<button name="action_print_survey" string="Print Survey" type="object" icon="gtk-print" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}" attrs="{'readonly':[('survey_id','=',False)]}"/>
<button name="%(mail.action_email_compose_message_wizard)d" string="Send Reminder Email" icon="terp-mail-message-new" type="action" states="waiting_answer"/>
<button name="%(mail.action_email_compose_message_wizard)d" string="Send Reminder Email" icon="terp-mail-message-new" type="action" states="open"/>
<field name="state"/>
<button string="Send Request" name="survey_req_waiting_answer" states="draft" type="object" icon="gtk-yes" />
<button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" />
<button string="Send Request" name="survey_req_open" states="draft" type="object" icon="gtk-yes" />
<button string="Done" name="survey_req_done" states="open" type="object" icon="gtk-jump-to" />
</tree>
</field>
</record>
@ -352,7 +352,7 @@
<field name="arch" type="xml">
<search string="Search Appraisal">
<field name="date_deadline"/>
<filter icon="terp-gtk-go-back-rtl" string="To Do" name="todo" domain="[('state','=','waiting_answer')]"/>
<filter icon="terp-gtk-go-back-rtl" string="To Do" name="todo" domain="[('state','=','open')]"/>
<field name="user_to_review_id"/>
<!-- <field name="user_id" string="Interviewer"/>-->
<group expand="0" string="Group By...">