[MERGE] Merge changes of hr_recruitment

bzr revid: sbh@tinyerp.com-20120522105752-qz7imq33q8ppvqhd
This commit is contained in:
Sbh (Openerp) 2012-05-22 16:27:52 +05:30
commit 4950a91a7c
7 changed files with 36 additions and 41 deletions

View File

@ -140,7 +140,7 @@ class hr_applicant(crm.crm_case, osv.osv):
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_cc': fields.text('Watchers Emails', size=252, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'probability': fields.float('Probability'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'partner_id': fields.many2one('res.partner', 'Contact Name'),
'create_date': fields.datetime('Creation Date', readonly=True, select=True),
'write_date': fields.datetime('Update Date', readonly=True),
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage'),
@ -172,7 +172,7 @@ class hr_applicant(crm.crm_case, osv.osv):
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'survey': fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
'response': fields.integer("Response"),
'reference': fields.char('Refered By', size=128),
'reference': fields.char('Referred By', size=128),
'source_id': fields.many2one('hr.recruitment.source', 'Source'),
'day_open': fields.function(_compute_day, string='Days to Open', \
multi='day_open', type="float", store=True),

View File

@ -95,41 +95,35 @@
</div>
</div>
<sheet string="Jobs - Recruitment Form" layout="auto">
<group colspan="4" col="4">
<field name="name" string="Subject"/>
<group colspan="2" col="4">
<field name="partner_name"/>
<button name="action_makeMeeting" type="object" string="Meeting" icon="gtk-index"/>
<button string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
</group>
<field name="user_id"/>
<field name="job_id" on_change="onchange_job(job_id)"/>
<field name="department_id" widget="selection" on_change="onchange_department_id(department_id)"/>
<group colspan="2" col="4">
<field name="name" string="Subject"/>
<field name="partner_name"/>
<field name="job_id" on_change="onchange_job(job_id)"/>
<field name="department_id" widget="selection" on_change="onchange_department_id(department_id)"/>
<group col="11" colspan="4">
<field name="user_id"/>
<field name="title_action"/>
<field name="date_action"/>
<field name="survey" invisible="1"/>
<button name="action_makeMeeting" type="object" string="Meeting" icon="gtk-index" help="Create meeting"/>
<button name="action_print_survey" string="Print Interview" type="object" icon="gtk-print" attrs="{'invisible':[('survey','=',False)]}" help="Print interview report"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant'}" attrs="{'invisible':[('survey','=',False)]}" help="Answer related job question"/>
<field name="response" invisible="1"/>
</group>
<group colspan="2" col="4">
<field name="stage_id" domain="['|',('department_id','=',department_id),('department_id','=',False)]"/>
<button name="stage_previous" string="" type="object" icon="gtk-go-back"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<field name="date_action"/>
<group colspan="2" col="8">
<field name="title_action"/>
<field name="survey" invisible="1"/>
<button name="action_print_survey" string="Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant'}" attrs="{'readonly':[('survey','=',False)]}"/>
<field name="response" invisible="1"/>
</group>
<newline/>
</group>
<notebook colspan="4">
<page string="Job Info">
<group col="3" colspan="2">
<separator colspan="3" string="Contact"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<button string="Create Partner"
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" colspan="2"/>
<button string="Create Contact"
name="%(action_hr_recruitment_partner_create)d"
icon="gtk-index" type="action" attrs="{'readonly':[('partner_id','!=',False)]}" groups="base.group_partner_manager"/>
<newline/>
<field name="email_from" colspan="3"/>
icon="gtk-index" type="action" attrs="{'invisible':[('partner_id','!=',False)]}"/>
<field name="email_from" colspan="2"/>
<button string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action" attrs="{'invisible':[('email_from','=',False)]}"/>
<field name="partner_phone" colspan="3"/>
<field name="partner_mobile" colspan="3"/>
</group>

View File

@ -145,7 +145,7 @@ msgstr ""
#. module: hr_recruitment
#: view:hr.applicant:0 view:hr.recruitment.partner.create:0
#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_partner_create
msgid "Create Partner"
msgid "Create Contact"
msgstr ""
#. module: hr_recruitment
@ -155,7 +155,7 @@ msgstr ""
#. module: hr_recruitment
#: field:hr.applicant,reference:0
msgid "Refered By"
msgid "Referred By"
msgstr ""
#. module: hr_recruitment
@ -344,7 +344,7 @@ msgstr ""
#. module: hr_recruitment
#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:39
#, python-format
msgid "A partner is already defined on this job request."
msgid "A contact is already defined on this job request."
msgstr ""
#. module: hr_recruitment
@ -511,6 +511,7 @@ msgstr ""
#. module: hr_recruitment
#: view:hr.applicant:0
#: field:hr.applicant,partner_id:0 view:hr.recruitment.report:0
msgid "Contact"
msgstr ""
@ -525,7 +526,6 @@ msgid "Qualification"
msgstr ""
#. module: hr_recruitment
#: field:hr.applicant,partner_id:0 view:hr.recruitment.report:0
#: field:hr.recruitment.report,partner_id:0
msgid "Partner"
msgstr ""
@ -871,7 +871,7 @@ msgstr ""
#. module: hr_recruitment
#: view:hr.recruitment.partner.create:0
msgid "Are you sure you want to create a partner based on this job request ?"
msgid "Are you sure you want to create a contact based on this job request ?"
msgstr ""
#. module: hr_recruitment
@ -959,7 +959,7 @@ msgstr ""
#. module: hr_recruitment
#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:57
#, python-format
msgid "A partner is already existing with the same name."
msgid "A contact is already existing with the same name."
msgstr ""
#. module: hr_recruitment

View File

@ -36,7 +36,7 @@ class hr_recruitment_partner_create(osv.osv_memory):
for case in case_obj.browse(cr, uid, context['active_ids'], context=context):
if case.partner_id:
raise osv.except_osv(_('Error !'),
_('A partner is already defined on this job request.'))
_('A contact is already defined on this job request.'))
pass
def make_order(self, cr, uid, ids, context=None):
@ -53,7 +53,7 @@ class hr_recruitment_partner_create(osv.osv_memory):
for case in case_obj.browse(cr, uid, context['active_ids'], context=context):
partner_id = partner_obj.search(cr, uid, [('name', '=', case.partner_name or case.name)], context=context)
if partner_id:
raise osv.except_osv(_('Error !'),_('A partner is already existing with the same name.'))
raise osv.except_osv(_('Error !'),_('A contact is already existing with the same name.'))
partner_id = partner_obj.create(cr, uid, {
'name': case.partner_name or case.name,
'user_id': case.user_id.id,

View File

@ -9,19 +9,19 @@
<field name="arch" type="xml">
<form string="Convert To Partner">
<group col="4" colspan="6">
<label string="Are you sure you want to create a partner based on this job request ?"/>
<label string="Are you sure you want to create a contact based on this job request ?"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="make_order" string="Create Partner" colspan="1" type="object" icon="gtk-execute" groups="base.group_partner_manager"/>
<button name="make_order" string="Create Contact" colspan="1" type="object" icon="gtk-execute" groups="base.group_partner_manager"/>
</group>
</form>
</field>
</record>
<record id="action_hr_recruitment_partner_create" model="ir.actions.act_window">
<field name="name">Create Partner</field>
<field name="name">Create Contact</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.recruitment.partner.create</field>
<field name="view_type">form</field>

View File

@ -450,6 +450,7 @@ class survey_question_wiz(osv.osv_memory):
# hr.applicant: if survey answered directly in system: attach report to applicant
if context.get('active_model') == 'hr.applicant':
self.pool.get('hr.applicant').write(cr,uid,[context.get('active_ids')[0]],{'response':context.get('response_id')})
result = base64.b64encode(result)
file_name = file_name + '.pdf'
ir_attachment = self.pool.get('ir.attachment').create(cr, uid,

View File

@ -7,7 +7,7 @@
-->
<record id="view_survey_question_message" model="ir.ui.view">
<field name="name">Survey Question</field>
<field name="name">Answer Survey</field>
<field name="model">survey.question.wiz</field>
<field name="type">form</field>
<field name="arch" type="xml">
@ -29,7 +29,7 @@
</record>
<record id="action_view_survey_question_message" model="ir.actions.act_window">
<field name="name">Survey Question</field>
<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>