From d530224b742145b723091848cdd0634c20c73970 Mon Sep 17 00:00:00 2001 From: Jagdish Panchal Date: Thu, 7 Mar 2013 11:20:56 +0530 Subject: [PATCH 01/81] [IMP] hr_recruitment: add new menu Resumes and Letters below application bzr revid: jap@tinyerp.com-20130307055056-feyvz7sw7t63zin1 --- addons/hr_recruitment/hr_recruitment_menu.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index dbd4335d730..558816a74a0 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -65,6 +65,11 @@ name="Applications" parent="base.menu_crm_case_job_req_main" id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/> + + From b400a08d08f8b85e370a7f695e1dda50382778fd Mon Sep 17 00:00:00 2001 From: Jagdish Panchal Date: Thu, 7 Mar 2013 12:52:23 +0530 Subject: [PATCH 02/81] [IMP] hr_recruitment: Add teplate for refuse and approve application bzr revid: jap@tinyerp.com-20130307072223-lwly1t29zirv9wmf --- addons/hr_recruitment/hr_recruitment_data.xml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index a0b16f042bc..5b7b0cd008b 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -216,6 +216,45 @@ + + + + For Refuse Application + ${object.user.email or ''} + We refuse your Application + ${object.email_from} + ${object.lang} + + + Dear Madam, Dear Sir,

+

We thank you for your interest in our company and for your application. + Unfortunately, your profile does not match with our needs or our recruitment campaign has reached its term.

+

If you want more details, feel free to contact us by phone.

+

Kind regards,

+
+ ${object.user_id.name} +
]]>
+
+ + + Intrested in Applicastion + ${object.user.email or ''} + {object.email_from} + We Intrested in your Application + ${object.lang} + + + Dear Applicant,

+

Congrats! Your resume's got our interest! + I will call you as soon as possible to make a 10 minutes phone interview and plan a first meeting.

+

If we can’t reach you or if you miss our call, feel free to reach me back on the number 001 312 349 3030 + If I do not answer, please let me a message with some schedules to call you back.

+

Kind regards,

+
+ ${object.user_id.name} +
]]>
+
+ 1 Male From c87b99dd5c8048224ca1c4db8c19e1d7f4439a4c Mon Sep 17 00:00:00 2001 From: Jagdish Panchal Date: Thu, 7 Mar 2013 14:11:09 +0530 Subject: [PATCH 03/81] [IMP] hr_recruitment: Improve tool tip for application menu bzr revid: jap@tinyerp.com-20130307084109-xca1qw9mwwulh7eu --- addons/hr_recruitment/hr_recruitment_menu.xml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index 558816a74a0..e86dbce6893 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -13,14 +13,12 @@

Click to add a new job applicant.

- OpenERP helps you track applicants in the recruitment - process and follow up all operations: meetings, interviews, etc. -

- If you setup the email gateway, applicants and their attached - CV are created automatically when an email is sent to - jobs@yourcompany.com. If you install the document management - modules, all resumes are indexed automatically, so that you can - easily search through their content. + OpenERP helps you track applicants in the recruitment process + and follow up all operations: meetings, interviews, etc. + Candidates and their cv's are automatically created when they + apply for a job. If you install the document management modules, + all resumes are indexed automatically, so that you can easily + search through their content in the recruitment menu.

From 5fb909627af5d27796f173cc323217a2c501d806 Mon Sep 17 00:00:00 2001 From: Jagdish Panchal Date: Thu, 14 Mar 2013 11:55:06 +0530 Subject: [PATCH 04/81] [IMP]hr_recruitment: add working address_id as company address and improve kanban view bzr revid: jap@tinyerp.com-20130314062506-3hnk22rq8gz50sdb --- addons/hr_recruitment/hr_recruitment.py | 7 ++++++- addons/hr_recruitment/hr_recruitment_view.xml | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index ff1010a45d5..e212c5c5e6b 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -346,10 +346,12 @@ class hr_applicant(base_stage, osv.Model): This override updates the document according to the email. """ if custom_values is None: custom_values = {} + val = msg.get('from').split('<')[0] desc = html2plaintext(msg.get('body')) if msg.get('body') else '' defaults = { 'name': msg.get('subject') or _("No Subject"), 'description': desc, + 'partner_name':val, 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), 'user_id': False, @@ -429,7 +431,10 @@ class hr_applicant(base_stage, osv.Model): emp_id = hr_employee.create(cr,uid,{'name': applicant.partner_name or contact_name, 'job_id': applicant.job_id.id, 'address_home_id': address_id, - 'department_id': applicant.department_id.id + 'department_id': applicant.department_id.id, + 'address_id': applicant.department_id.company_id.id, + 'work_email': applicant.department_id.company_id.email, + 'work_phone': applicant.department_id.company_id.phone, }) self.write(cr, uid, [applicant.id], {'emp_id': emp_id}, context=context) self.case_close(cr, uid, [applicant.id], context) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index b6a0bdd4ccf..6c5040045cf 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -254,15 +254,17 @@
  • Schedule Interview
    +



    - Mobile:
    -
    +
    +
    + Mobile:
    @@ -284,6 +286,7 @@ +
    From bedac40d7e9f24345da9bb8015d09a22ce549cad Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Thu, 14 Mar 2013 14:12:21 +0530 Subject: [PATCH 05/81] [IMP]Changed the address_id ,work email and phone bzr revid: dhr@tinyerp.com-20130314084221-4g6b8x3elwm5oq2j --- addons/hr_recruitment/hr_recruitment.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index e212c5c5e6b..aedd88c1a15 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -431,10 +431,10 @@ class hr_applicant(base_stage, osv.Model): emp_id = hr_employee.create(cr,uid,{'name': applicant.partner_name or contact_name, 'job_id': applicant.job_id.id, 'address_home_id': address_id, - 'department_id': applicant.department_id.id, - 'address_id': applicant.department_id.company_id.id, - 'work_email': applicant.department_id.company_id.email, - 'work_phone': applicant.department_id.company_id.phone, + 'department_id': applicant.department_id.id or False, + 'address_id': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.id or False, + 'work_email': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.email or False, + 'work_phone': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.phone or False, }) self.write(cr, uid, [applicant.id], {'emp_id': emp_id}, context=context) self.case_close(cr, uid, [applicant.id], context) From 1b8027dc9622f61fe2e30c095b708af530816253 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Thu, 14 Mar 2013 14:42:30 +0530 Subject: [PATCH 06/81] [IMP]Showing attachment in the kanban as per the image in task bzr revid: dhr@tinyerp.com-20130314091230-5nzifhvt06rkqyms --- addons/hr_recruitment/hr_recruitment.py | 12 ++++++++++++ addons/hr_recruitment/hr_recruitment_view.xml | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index aedd88c1a15..44f5e42a4e4 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -184,6 +184,16 @@ class hr_applicant(base_stage, osv.Model): duration = float(ans.days) res[issue.id][field] = abs(float(duration)) return res + + def _compute_attachments(self, cr, uid, ids, fields, args, context=None): + res = {} + attachment_pool = self.pool.get('ir.attachment') + for issue in self.browse(cr, uid, ids, context=context): + res[issue.id] = 0 + attach = attachment_pool.search(cr, uid, [('res_model','=','hr.applicant'),('res_id','=',issue.id)]) + if attach: + res[issue.id] = len(attach) + return res _columns = { 'name': fields.char('Subject', size=128, required=True), @@ -235,6 +245,8 @@ class hr_applicant(base_stage, osv.Model): multi='day_close', type="float", store=True), 'color': fields.integer('Color Index'), 'emp_id': fields.many2one('hr.employee', 'employee'), + 'attachments': fields.function(_compute_attachments, string='Attachments', \ + type="integer"), 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True), } diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index ccdaf2d7ed1..89843a3b801 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -290,6 +290,10 @@ From dbeb2cade0c632499bf6b886285b03267bd0b458 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Thu, 14 Mar 2013 14:51:10 +0530 Subject: [PATCH 07/81] [IMP]Adding manager of the applicant as default to invitation on scheduling a meeting bzr revid: dhr@tinyerp.com-20130314092110-jkaqhmsrzsjd889u --- addons/hr_recruitment/hr_recruitment.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 44f5e42a4e4..3c074b4e1ad 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -323,10 +323,15 @@ class hr_applicant(base_stage, osv.Model): @return: Dictionary value for created Meeting view """ applicant = self.browse(cr, uid, ids[0], context) + applicant_ids = [] + if applicant.partner_id: + applicant_ids.append(applicant.partner_id.id) + if applicant.department_id and applicant.department_id.manager_id and applicant.department_id.manager_id.address_id: + applicant_ids.append(applicant.department_id.manager_id.address_id.id) category = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'categ_meet_interview', context) res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'base_calendar', 'action_crm_meeting', context) res['context'] = { - 'default_partner_ids': applicant.partner_id and [applicant.partner_id.id] or False, + 'default_partner_ids': applicant_ids or False, 'default_user_id': uid, 'default_name': applicant.name, 'default_categ_ids': category and [category.id] or False, From b0623b619dd4c527770aeb8fd94efdbb1d0e617d Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Thu, 14 Mar 2013 16:11:57 +0530 Subject: [PATCH 08/81] [IMP]Improved the action for menu Resumes and Letters to show hr applicant's attachment bzr revid: dhr@tinyerp.com-20130314104157-n9x2jt1ve1jhxque --- addons/hr_recruitment/__openerp__.py | 1 + addons/hr_recruitment/hr_recruitment_menu.xml | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py index e83c546af04..d33bfed6a4d 100644 --- a/addons/hr_recruitment/__openerp__.py +++ b/addons/hr_recruitment/__openerp__.py @@ -42,6 +42,7 @@ You can define the different phases of interviews and easily rate the applicant 'base_status', 'decimal_precision', 'hr', + 'document', 'survey', 'base_calendar', 'fetchmail', diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index e86dbce6893..fb10a4f20a0 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -23,6 +23,19 @@ + + Resumes and Letters + ir.attachment + tree,form + + [('res_model','=','hr.applicant')] + +

    + Search through resumes and motivation letters. +

    +
    +
    + kanban @@ -67,7 +80,7 @@ + id="menu_crm_case_categ0_act_job02" action="hr_applicant_resumes" sequence="3"/> From 09df39578dbdab58dec156a3c171b59a731ab849 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Thu, 14 Mar 2013 17:01:16 +0530 Subject: [PATCH 09/81] [IMP]Search within the content of the resume in the search view of an applicant, bzr revid: dhr@tinyerp.com-20130314113116-lh4v21bm0mt4d9lc --- addons/hr_recruitment/hr_recruitment.py | 13 +++++++++++++ addons/hr_recruitment/hr_recruitment_view.xml | 2 ++ 2 files changed, 15 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 3c074b4e1ad..c27f97c27df 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -195,6 +195,17 @@ class hr_applicant(base_stage, osv.Model): res[issue.id] = len(attach) return res + def _get_index_content(self, cr, uid, ids, fields, args, context=None): + res = {} + attachment_pool = self.pool.get('ir.attachment') + for issue in self.browse(cr, uid, ids, context=context): + res[issue.id] = 0 + attach_id = attachment_pool.search(cr, uid, [('res_model','=','hr.applicant'),('res_id','=',issue.id)]) + if attach_id: + for attach in attachment_pool.browse(cr, uid, attach_id, context): + res[issue.id] = attach.index_content + return res + _columns = { 'name': fields.char('Subject', size=128, required=True), 'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the case without removing it."), @@ -247,6 +258,8 @@ class hr_applicant(base_stage, osv.Model): 'emp_id': fields.many2one('hr.employee', 'employee'), 'attachments': fields.function(_compute_attachments, string='Attachments', \ type="integer"), + 'index_content': fields.function(_get_index_content, string='Index Content', \ + type="char",store=True), 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True), } diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 89843a3b801..40c2e7112f2 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -58,6 +58,7 @@ + @@ -185,6 +186,7 @@ + From bb21ba4334ace1a8fbb3295fb483e98275fd6e4f Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Fri, 15 Mar 2013 10:52:37 +0530 Subject: [PATCH 10/81] [IMP]Added demo data for need action(unread email) bzr revid: dhr@tinyerp.com-20130315052237-wy854vqr64cdzh9z --- addons/hr_recruitment/hr_recruitment_demo.xml | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/addons/hr_recruitment/hr_recruitment_demo.xml b/addons/hr_recruitment/hr_recruitment_demo.xml index c15e0deb188..fb54eaab1e3 100644 --- a/addons/hr_recruitment/hr_recruitment_demo.xml +++ b/addons/hr_recruitment/hr_recruitment_demo.xml @@ -125,5 +125,28 @@ + + + hr.applicant + + Please do refer to this application for sure. + comment + + + + Regarding reference + hr.applicant + + Hello!
    + I will surely refer to this application as it is by your reference and
    + will try to conduct an interview within a very short time
    + Thanks,

    ]]>
    + comment + + +
    + - \ No newline at end of file + From e3e177d5f02cfabcd93af95f1edcf1f59d5e9c32 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Fri, 15 Mar 2013 17:56:06 +0530 Subject: [PATCH 11/81] [IMP]Changed the typo and string in templates bzr revid: dhr@tinyerp.com-20130315122606-v6arcu6dr978zk8w --- addons/hr_recruitment/hr_recruitment_data.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index 2a444bcb503..577e77592c6 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -219,9 +219,9 @@ - For Refuse Application + Refuse Application ${object.user.email or ''} - We refuse your Application + We refuse your application ${object.email_from} ${object.lang} @@ -237,10 +237,10 @@ - Intrested in Applicastion + Interested in Application ${object.user.email or ''} {object.email_from} - We Intrested in your Application + We are interested in your application ${object.lang} From 2ae7717edbb5ff9ec78a984da3623be798461e78 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Fri, 15 Mar 2013 18:07:24 +0530 Subject: [PATCH 12/81] [IMP]Changed the partner_id for manager bzr revid: dhr@tinyerp.com-20130315123724-hv05rkub1agooz6h --- addons/hr_recruitment/hr_recruitment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index c27f97c27df..38ae03fb2bf 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -339,8 +339,8 @@ class hr_applicant(base_stage, osv.Model): applicant_ids = [] if applicant.partner_id: applicant_ids.append(applicant.partner_id.id) - if applicant.department_id and applicant.department_id.manager_id and applicant.department_id.manager_id.address_id: - applicant_ids.append(applicant.department_id.manager_id.address_id.id) + if applicant.department_id and applicant.department_id.manager_id and applicant.department_id.manager_id.user_id and applicant.department_id.manager_id.user_id.partner_id: + applicant_ids.append(applicant.department_id.manager_id.user_id.partner_id.id) category = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'categ_meet_interview', context) res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'base_calendar', 'action_crm_meeting', context) res['context'] = { From 0306b355d0e6460712d7b5ccba319ae64e892c14 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (Open ERP)" Date: Mon, 18 Mar 2013 11:50:44 +0530 Subject: [PATCH 13/81] [IMP]Improved the demo data for template to send mail and now mails are sent when Refuse application or Contract signed bzr revid: dhr@tinyerp.com-20130318062044-0qmp56vibva2fcra --- addons/hr_recruitment/hr_recruitment.py | 23 ++++++++++++++++++- addons/hr_recruitment/hr_recruitment_data.xml | 6 ++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 38ae03fb2bf..0710b3e22bd 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -442,6 +442,11 @@ class hr_applicant(base_stage, osv.Model): def case_close(self, cr, uid, ids, context=None): res = super(hr_applicant, self).case_close(cr, uid, ids, context) + try: + template = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'email_template_approve_applicant') + except ValueError: + pass + self._get_mail_template(cr, uid, ids, template, context) return res def case_close_with_emp(self, cr, uid, ids, context=None): @@ -483,8 +488,24 @@ class hr_applicant(base_stage, osv.Model): """ res = super(hr_applicant, self).case_cancel(cr, uid, ids, context) self.write(cr, uid, ids, {'probability': 0.0}) + template = False + try: + template = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'email_template_refuse_applicant') + except ValueError: + pass + self._get_mail_template(cr, uid, ids, template, context) return res - + + def _get_mail_template(self, cr, uid, ids, template, context): + mail_obj = self.pool.get('mail.mail') + assert template._name == 'email.template' + for applications in self.browse(cr, uid, ids, context): + if applications.email_from: + mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, applications.id, True, context=context) + mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context) + if mail_state and mail_state['state'] == 'exception': + raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context) + def case_pending(self, cr, uid, ids, context=None): """Marks case as pending""" res = super(hr_applicant, self).case_pending(cr, uid, ids, context) diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index 577e77592c6..50e19bb7d69 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -220,7 +220,7 @@ Refuse Application - ${object.user.email or ''} + ${user.email or ''} We refuse your application ${object.email_from} ${object.lang} @@ -238,8 +238,8 @@ Interested in Application - ${object.user.email or ''} - {object.email_from} + ${user.email or ''} + ${object.email_from} We are interested in your application ${object.lang} From bdde088d085b71f59f57c246da9aab40882bb6df Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Mon, 18 Mar 2013 19:03:38 +0530 Subject: [PATCH 14/81] [FIX] re-importing the translation from a file(.csv, .xml) updates the terms in ir_translation table but does not update it in cache memory, need a server restart to take those change effect in interface. (Maintenance Case: 587178) bzr revid: rgo@tinyerp.com-20130318133338-djkx3ykbkitvbzeb --- openerp/tools/translate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py index f1efbc17f2d..d4ce543ed42 100644 --- a/openerp/tools/translate.py +++ b/openerp/tools/translate.py @@ -1000,6 +1000,7 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True, irt_cursor.push(dic) irt_cursor.finish() + trans_obj.clear_caches() if verbose: _logger.info("translation file loaded succesfully") except IOError: From 4ed53ad39e92f4f7d09e974e0f86ac9b2402a48b Mon Sep 17 00:00:00 2001 From: "Somesh Khare (OpenERP)" Date: Mon, 22 Apr 2013 18:19:43 +0530 Subject: [PATCH 15/81] [FIX]hr_holidays, hr_timesheet: XMLSyntaxError Error occurred when company name have ampersand '&' sign (Case: Ref 591630) bzr revid: skh@openerp.com-20130422124943-04zhbhbj9snvikqv --- addons/hr_holidays/report/holidays_summary_report.py | 2 +- addons/hr_timesheet/report/users_timesheet.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/report/holidays_summary_report.py b/addons/hr_holidays/report/holidays_summary_report.py index f60d7a3ee1c..f5bc6271b90 100644 --- a/addons/hr_holidays/report/holidays_summary_report.py +++ b/addons/hr_holidays/report/holidays_summary_report.py @@ -96,7 +96,7 @@ class report_custom(report_rml): res=cr.fetchone()[0] date_xml=[] date_today=time.strftime('%Y-%m-%d %H:%M:%S') - date_xml +=['' % (res,date_today)] + date_xml +=['' % (to_xml(res),date_today)] cr.execute("SELECT id, name, color_name FROM hr_holidays_status ORDER BY id") legend=cr.fetchall() diff --git a/addons/hr_timesheet/report/users_timesheet.py b/addons/hr_timesheet/report/users_timesheet.py index 4827994f2cd..a7bb81cb81f 100644 --- a/addons/hr_timesheet/report/users_timesheet.py +++ b/addons/hr_timesheet/report/users_timesheet.py @@ -27,6 +27,7 @@ from openerp import pooler from openerp.tools.translate import _ from openerp.report import report_sxw from openerp.tools import ustr +from openerp.tools import to_xml def lengthmonth(year, month): @@ -104,7 +105,7 @@ class report_custom(report_rml): %s %s - ''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name) + ''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),to_xml(pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)) xml=''' From 56afde0c844890936caaa3dc17db87b5f360779d Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Mon, 29 Apr 2013 11:32:31 +0530 Subject: [PATCH 16/81] [FIX]project: if there is no any project manager and try to schedule task its give traceback bzr revid: pna@tinyerp.com-20130429060231-epygcrs2073f23ny --- addons/project/project.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index a5e540c8be7..5b8ae2c2044 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -477,12 +477,15 @@ def Project(): def Project_%d(): start = \'%s\' working_days = %s - resource = %s """ % ( project.id, - project.date_start or time.strftime('%Y-%m-%d'), working_days, - '|'.join(['User_'+str(x) for x in puids]) - ) + project.date_start or time.strftime('%Y-%m-%d'), working_days + ) + resource = '|'.join(['User_'+str(x) for x in puids]) + if resource : + result+= """ + resource = %s +""" % ( resource, ) vacation = calendar_id and tuple(resource_pool.compute_vacation(cr, uid, calendar_id, context=context)) or False if vacation: result+= """ From 477c5a064b3037fc384671aa3a55e302df9cb217 Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Tue, 7 May 2013 16:41:02 +0530 Subject: [PATCH 17/81] [FIX] document: 'user_id' field must be declared as m2o rather than simple char field as a related field refering it in the same module. (Maintenance Case: 592256) lp bug: https://launchpad.net/bugs/1175984 fixed bzr revid: rgo@tinyerp.com-20130507111102-iq6jxwy1fy02727q --- addons/document/report/document_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/document/report/document_report.py b/addons/document/report/document_report.py index c9df78e4272..a4133f46387 100644 --- a/addons/document/report/document_report.py +++ b/addons/document/report/document_report.py @@ -31,7 +31,7 @@ class report_document_user(osv.osv): 'name': fields.char('Year', size=64,readonly=True), 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), - 'user_id':fields.integer('Owner', readonly=True), + 'user_id': fields.many2one('res.users', 'Owner', readonly=True), 'user': fields.related('user_id', 'name', type='char', size=64, readonly=True), 'directory': fields.char('Directory',size=64,readonly=True), 'datas_fname': fields.char('File Name',size=64,readonly=True), From 0c570e89934296cf5ca7f91c0581d78f7674a2b8 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Wed, 8 May 2013 10:26:21 +0530 Subject: [PATCH 18/81] [IMP]purchase : in search view warehouse filter display two times bzr revid: pna@tinyerp.com-20130508045621-00qnigii90n129y0 --- addons/purchase/report/purchase_report_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml index 909663f43bb..9acb733e882 100644 --- a/addons/purchase/report/purchase_report_view.xml +++ b/addons/purchase/report/purchase_report_view.xml @@ -74,7 +74,6 @@ - From c46526a9dc2d376c016a51390779257ac45912c2 Mon Sep 17 00:00:00 2001 From: "Jignesh Rathod (OpenERP)" Date: Fri, 7 Jun 2013 18:46:46 +0530 Subject: [PATCH 19/81] Improve Code. bzr revid: jir@tinyerp.com-20130607131646-kkeo1nuue6klbikj --- addons/document/document_view.xml | 3 +++ addons/hr_recruitment/hr_recruitment.py | 18 ++++++++++++++++++ addons/hr_recruitment/hr_recruitment_view.xml | 10 ++++++---- addons/hr_recruitment/res_config.py | 4 ---- addons/hr_recruitment/res_config_view.xml | 6 ------ .../security/hr_recruitment_security.xml | 1 - 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml index c3bd5ad3f56..8c60e232dbf 100644 --- a/addons/document/document_view.xml +++ b/addons/document/document_view.xml @@ -199,6 +199,9 @@ + + + diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 161cf71d513..39064304300 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -185,6 +185,24 @@ class hr_applicant(base_stage, osv.Model): res[issue.id][field] = abs(float(duration)) return res + + def attachment_tree_view(self, cr, uid, ids, context): + domain = ['&', ('res_model', '=', 'hr.applicant'), ('res_id', 'in', ids)] + res_id = ids and ids[0] or False + return { + 'name': _('Attachments'), + 'domain': domain, + 'res_model': 'ir.attachment', + 'type': 'ir.actions.act_window', + 'view_id': False, + 'view_mode': 'tree,form', + 'view_type': 'form', + 'limit': 80, + 'context': "{'default_res_model': '%s','default_res_id': %d}" % (self._name, res_id) + } + + + def _compute_attachments(self, cr, uid, ids, fields, args, context=None): res = {} attachment_pool = self.pool.get('ir.attachment') diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 542620ad14e..0cc6aff1496 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -89,6 +89,7 @@