From 4f14cb1dae0563985ec635ed638cc4d6e433007a Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 20 Nov 2012 12:09:39 +0530 Subject: [PATCH 01/14] [Add]hr_holidays:subtype added for leaves bzr revid: kbh@tinyerp.com-20121120063939-nn4bkjdpagt2uhit --- addons/hr_holidays/hr_holidays_data.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml index 5af0c60fc44..fe288169fd3 100644 --- a/addons/hr_holidays/hr_holidays_data.xml +++ b/addons/hr_holidays/hr_holidays_data.xml @@ -44,5 +44,19 @@ True brown + + + + To Approve + + + + Approved + + + + Refused + + From a56728dbc7338a2edc9f8a44401146087ac8f59c Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 20 Nov 2012 12:49:11 +0530 Subject: [PATCH 02/14] [Add]hr_holidays:improved code of subtype bzr revid: kbh@tinyerp.com-20121120071911-z6saaldgglcr1bz2 --- addons/hr_holidays/hr_holidays.py | 6 +++--- addons/hr_holidays/hr_holidays_data.xml | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 92b1d57ce15..ebba92f814c 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -431,7 +431,7 @@ class hr_holidays(osv.osv): def holidays_confirm_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_post(cr, uid, [obj.id], - _("Request submitted, waiting for validation by the manager."), context=context) + _("Request submitted, waiting for validation by the manager."), subtype="hr_holidays.mt_approve", context=context) def holidays_first_validate_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): @@ -445,12 +445,12 @@ class hr_holidays(osv.osv): _("Request validated."), context=context) else: self.message_post(cr, uid, [obj.id], - _("The request has been approved."), context=context) + _("The request has been approved."), subtype="hr_holidays.mt_approved", context=context) def holidays_refuse_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_post(cr, uid, [obj.id], - _("Request refused"), context=context) + _("Request refused"), subtype="hr_holidays.mt_refused", context=context) class resource_calendar_leaves(osv.osv): diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml index fe288169fd3..ad15f170e56 100644 --- a/addons/hr_holidays/hr_holidays_data.xml +++ b/addons/hr_holidays/hr_holidays_data.xml @@ -48,14 +48,20 @@ To Approve + hr.holidays + Approved + hr.holidays + Refused + hr.holidays + From a1cd2de42a386a71c087568ae9f538240128215a Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 20 Nov 2012 13:36:20 +0530 Subject: [PATCH 03/14] [Add]hr_expense:subtypeadded for expense bzr revid: kbh@tinyerp.com-20121120080620-s8r0ery17ochs0pz --- addons/hr_expense/hr_expense.py | 18 ++++++++++++++++++ addons/hr_expense/hr_expense_data.xml | 21 ++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index ccb8af68e21..dea1f558b0f 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -127,6 +127,7 @@ class hr_expense_expense(osv.osv): for expense in self.browse(cr, uid, ids): if expense.employee_id and expense.employee_id.parent_id.user_id: self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id]) + self.expense_approve_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'confirm', 'date_confirm': time.strftime('%Y-%m-%d') @@ -134,6 +135,7 @@ class hr_expense_expense(osv.osv): return True def expense_accept(self, cr, uid, ids, *args): + self.expense_approved_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'accepted', 'date_valid':time.strftime('%Y-%m-%d'), @@ -142,6 +144,7 @@ class hr_expense_expense(osv.osv): return True def expense_canceled(self, cr, uid, ids, *args): + self.expense_cancel_notificate(cr, uid, ids) self.write(cr, uid, ids, {'state':'cancelled'}) return True @@ -234,6 +237,21 @@ class hr_expense_expense(osv.osv): } return result + def expense_approve_notificate(self, cr, uid, ids, context=None): + for obj in self.browse(cr, uid, ids, context=context): + self.message_post(cr, uid, [obj.id], + _("Request waiting for approved"), subtype="hr_expense_expense.mt_expense_approve", context=context) + + def expense_approved_notificate(self, cr, uid, ids, context=None): + for obj in self.browse(cr, uid, ids, context=context): + self.message_post(cr, uid, [obj.id], + _("Request approved"), subtype="hr_expense_expense.mt_expense_approved", context=context) + + def expense_cancel_notificate(self, cr, uid, ids, context=None): + for obj in self.browse(cr, uid, ids, context=context): + self.message_post(cr, uid, [obj.id], + _("Request cancelled"), subtype="hr_expense_expense.mt_expense_refused", context=context) + hr_expense_expense() class product_product(osv.osv): diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml index f54156ac5ec..b388757a963 100644 --- a/addons/hr_expense/hr_expense_data.xml +++ b/addons/hr_expense/hr_expense_data.xml @@ -1,6 +1,6 @@ - + mail.group @@ -17,5 +17,24 @@ Expenses + + + + To Approve + hr.expense.expense + + + + + Approved + hr.expense.expense + + + + + Refused + hr.expense.expense + + From 2a3c631f865998e4b6d9b2e7ab8444f0b32fa7a9 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 20 Nov 2012 14:16:05 +0530 Subject: [PATCH 04/14] [Add]hr_recruitement:subtypeadded for appicants bzr revid: kbh@tinyerp.com-20121120084605-ddhshc2szgrj3pyu --- addons/hr_expense/hr_expense_data.xml | 2 +- addons/hr_recruitment/hr_recruitment.py | 6 +++--- addons/hr_recruitment/hr_recruitment_data.xml | 12 ++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml index b388757a963..01b839582e3 100644 --- a/addons/hr_expense/hr_expense_data.xml +++ b/addons/hr_expense/hr_expense_data.xml @@ -1,6 +1,6 @@ - + mail.group diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 155f20daf4d..1d076b25ed3 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -472,7 +472,7 @@ class hr_applicant(base_stage, osv.Model): """ Override of the (void) default notification method. """ if not stage_id: return True stage_name = self.pool.get('hr.recruitment.stage').name_get(cr, uid, [stage_id], context=context)[0][1] - return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), context=context) + return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), subtype="hr_recruitment.mt_stage_changed", context=context) def case_get_note_msg_prefix(self, cr, uid, id, context=None): return 'Applicant' @@ -492,12 +492,12 @@ class hr_applicant(base_stage, osv.Model): self.message_post(cr, uid, [applicant.id], body=message, context=context) else: message = _("Applicant has been hired.") - self.message_post(cr, uid, [applicant.id], body=message, context=context) + self.message_post(cr, uid, [applicant.id], body=message, subtype="hr_recruitment.mt_applicant_hired", context=context) return True def case_cancel_send_note(self, cr, uid, ids, context=None): msg = 'Applicant refused.' - return self.message_post(cr, uid, ids, body=msg, context=context) + return self.message_post(cr, uid, ids, body=msg, subtype="hr_recruitment.mt_applicant_refused",context=context) def case_reset_send_note(self, cr, uid, ids, context=None): message =_("Applicant has been set as new.") diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index adaeed81205..e7d060d6ea9 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -470,5 +470,17 @@ New Applicant hr.job + + Stage changed + hr.applicant + + + Applicant Hired + hr.applicant + + + Applicant Refused + hr.applicant + From aa85a5d42afb20f088756497bebc8494fbe5135f Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 20 Nov 2012 14:17:29 +0530 Subject: [PATCH 05/14] [Add]hr_recruitement:defaut false added bzr revid: kbh@tinyerp.com-20121120084729-1f8gsjt89awexe6y --- addons/hr_recruitment/hr_recruitment_data.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index e7d060d6ea9..5afd2cd1cca 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -473,14 +473,17 @@ Stage changed hr.applicant + Applicant Hired hr.applicant + Applicant Refused hr.applicant + From 194ae10812613da58e81f4f585b46fec09641b9d Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 20 Nov 2012 14:45:03 +0530 Subject: [PATCH 06/14] [Add]hr:subtype added for job position bzr revid: kbh@tinyerp.com-20121120091503-h6vqpwze37a59q18 --- addons/hr/hr_data.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/addons/hr/hr_data.xml b/addons/hr/hr_data.xml index 25c882f2201..029b77fd999 100644 --- a/addons/hr/hr_data.xml +++ b/addons/hr/hr_data.xml @@ -18,5 +18,26 @@ Leave Management (keep track of employee leaves), Expense Management (manage emp + + New Applicant + hr.job + + + + Stage changed + hr.job + + + + Applicant Hired + hr.job + + + + Applicant Refused + hr.job + + + From da5eb4055ff86eb988ec4c5303503556d89bbea4 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 20 Nov 2012 14:48:10 +0530 Subject: [PATCH 07/14] [REM]hr_expense:remove code of expense bzr revid: kbh@tinyerp.com-20121120091810-mgg9y239j8kbindi --- addons/hr_expense/hr_expense.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index dea1f558b0f..ccb8af68e21 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -127,7 +127,6 @@ class hr_expense_expense(osv.osv): for expense in self.browse(cr, uid, ids): if expense.employee_id and expense.employee_id.parent_id.user_id: self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id]) - self.expense_approve_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'confirm', 'date_confirm': time.strftime('%Y-%m-%d') @@ -135,7 +134,6 @@ class hr_expense_expense(osv.osv): return True def expense_accept(self, cr, uid, ids, *args): - self.expense_approved_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'accepted', 'date_valid':time.strftime('%Y-%m-%d'), @@ -144,7 +142,6 @@ class hr_expense_expense(osv.osv): return True def expense_canceled(self, cr, uid, ids, *args): - self.expense_cancel_notificate(cr, uid, ids) self.write(cr, uid, ids, {'state':'cancelled'}) return True @@ -237,21 +234,6 @@ class hr_expense_expense(osv.osv): } return result - def expense_approve_notificate(self, cr, uid, ids, context=None): - for obj in self.browse(cr, uid, ids, context=context): - self.message_post(cr, uid, [obj.id], - _("Request waiting for approved"), subtype="hr_expense_expense.mt_expense_approve", context=context) - - def expense_approved_notificate(self, cr, uid, ids, context=None): - for obj in self.browse(cr, uid, ids, context=context): - self.message_post(cr, uid, [obj.id], - _("Request approved"), subtype="hr_expense_expense.mt_expense_approved", context=context) - - def expense_cancel_notificate(self, cr, uid, ids, context=None): - for obj in self.browse(cr, uid, ids, context=context): - self.message_post(cr, uid, [obj.id], - _("Request cancelled"), subtype="hr_expense_expense.mt_expense_refused", context=context) - hr_expense_expense() class product_product(osv.osv): From 17ecd10a35054d97b3d81b01764cc398bd55e680 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 21 Nov 2012 11:09:54 +0530 Subject: [PATCH 08/14] [ADD/IMP]hr_expense:added method for message in expense bzr revid: kbh@tinyerp.com-20121121053954-6japxu5y7tjilw9y --- addons/hr_expense/hr_expense.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index ccb8af68e21..949bfb2caa8 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -127,6 +127,7 @@ class hr_expense_expense(osv.osv): for expense in self.browse(cr, uid, ids): if expense.employee_id and expense.employee_id.parent_id.user_id: self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id]) + self.expense_toapprove_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'confirm', 'date_confirm': time.strftime('%Y-%m-%d') @@ -134,6 +135,7 @@ class hr_expense_expense(osv.osv): return True def expense_accept(self, cr, uid, ids, *args): + self.expense_approve_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'accepted', 'date_valid':time.strftime('%Y-%m-%d'), @@ -142,6 +144,7 @@ class hr_expense_expense(osv.osv): return True def expense_canceled(self, cr, uid, ids, *args): + self.expense_refuse_notificate(cr, uid, ids) self.write(cr, uid, ids, {'state':'cancelled'}) return True @@ -234,6 +237,21 @@ class hr_expense_expense(osv.osv): } return result + def expense_toapprove_notificate(self, cr, uid, ids, context=None): + for obj in self.browse(cr, uid, ids): + self.message_post(cr, uid, [obj.id], + _("Request to approve"), subtype="hr_expense.mt_expense_approve", context=context) + + def expense_approve_notificate(self, cr, uid, ids, context=None): + for obj in self.browse(cr, uid, ids): + self.message_post(cr, uid, [obj.id], + _("Request approved"), subtype="hr_expense.mt_expense_approved", context=context) + + def expense_refuse_notificate(self, cr, uid, ids, context=None): + for obj in self.browse(cr, uid, ids): + self.message_post(cr, uid, [obj.id], + _("Request refused"), subtype="hr_expense.mt_expense_refused", context=context) + hr_expense_expense() class product_product(osv.osv): From f42cee3e9498c485c5ba60a1b10c7dac83525c2c Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 21 Nov 2012 14:11:39 +0530 Subject: [PATCH 09/14] [IMP]hr_expense:code improved bzr revid: kbh@tinyerp.com-20121121084139-2phwt6sxbgt0sp5r --- addons/hr_expense/hr_expense.py | 16 ++++++++-------- .../project_issue_sheet_view.xml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 949bfb2caa8..a580feff399 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -123,19 +123,19 @@ class hr_expense_expense(osv.osv): company_id = employee.company_id.id return {'value': {'department_id': department_id, 'company_id': company_id}} - def expense_confirm(self, cr, uid, ids, *args): + def expense_confirm(self, cr, uid, ids, context=None): for expense in self.browse(cr, uid, ids): if expense.employee_id and expense.employee_id.parent_id.user_id: self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id]) - self.expense_toapprove_notificate(cr, uid, ids) + self.expense_toapprove_notificate(cr, uid, ids, context=context) self.write(cr, uid, ids, { 'state':'confirm', 'date_confirm': time.strftime('%Y-%m-%d') }) return True - def expense_accept(self, cr, uid, ids, *args): - self.expense_approve_notificate(cr, uid, ids) + def expense_accept(self, cr, uid, ids, context=None): + self.expense_approve_notificate(cr, uid, ids, context=context) self.write(cr, uid, ids, { 'state':'accepted', 'date_valid':time.strftime('%Y-%m-%d'), @@ -143,8 +143,8 @@ class hr_expense_expense(osv.osv): }) return True - def expense_canceled(self, cr, uid, ids, *args): - self.expense_refuse_notificate(cr, uid, ids) + def expense_canceled(self, cr, uid, ids, context=None): + self.expense_refuse_notificate(cr, uid, ids , context=context) self.write(cr, uid, ids, {'state':'cancelled'}) return True @@ -240,12 +240,12 @@ class hr_expense_expense(osv.osv): def expense_toapprove_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_post(cr, uid, [obj.id], - _("Request to approve"), subtype="hr_expense.mt_expense_approve", context=context) + _("The request is waiting for Approval"), subtype="hr_expense.mt_expense_approve", context=context) def expense_approve_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): self.message_post(cr, uid, [obj.id], - _("Request approved"), subtype="hr_expense.mt_expense_approved", context=context) + _("The request has been approved"), subtype="hr_expense.mt_expense_approved", context=context) def expense_refuse_notificate(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids): diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml index 4fc12ab0747..2a55a229f76 100644 --- a/addons/project_issue_sheet/project_issue_sheet_view.xml +++ b/addons/project_issue_sheet/project_issue_sheet_view.xml @@ -23,7 +23,7 @@ - + From 0fcc816994ef41eb81f3eb06f52788b1e5718af9 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 21 Nov 2012 14:34:39 +0530 Subject: [PATCH 10/14] [REM]removd unnecesary code bzr revid: kbh@tinyerp.com-20121121090439-ifwfuod0se991qfv --- addons/project_issue_sheet/project_issue_sheet_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml index 2a55a229f76..4fc12ab0747 100644 --- a/addons/project_issue_sheet/project_issue_sheet_view.xml +++ b/addons/project_issue_sheet/project_issue_sheet_view.xml @@ -23,7 +23,7 @@ - + From a5afea27d5af1e04d4e2d99dfa444df4eab9d65f Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 21 Nov 2012 14:43:58 +0530 Subject: [PATCH 11/14] [IMP]hr_expense:code improved bzr revid: kbh@tinyerp.com-20121121091358-33g7oonfo819ry1f --- addons/hr_expense/hr_expense.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index a580feff399..3327312ef9d 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -123,19 +123,19 @@ class hr_expense_expense(osv.osv): company_id = employee.company_id.id return {'value': {'department_id': department_id, 'company_id': company_id}} - def expense_confirm(self, cr, uid, ids, context=None): + def expense_confirm(self, cr, uid, ids, *args): for expense in self.browse(cr, uid, ids): if expense.employee_id and expense.employee_id.parent_id.user_id: self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id]) - self.expense_toapprove_notificate(cr, uid, ids, context=context) + self.expense_toapprove_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'confirm', 'date_confirm': time.strftime('%Y-%m-%d') }) return True - def expense_accept(self, cr, uid, ids, context=None): - self.expense_approve_notificate(cr, uid, ids, context=context) + def expense_accept(self, cr, uid, ids, *args): + self.expense_approve_notificate(cr, uid, ids) self.write(cr, uid, ids, { 'state':'accepted', 'date_valid':time.strftime('%Y-%m-%d'), @@ -143,8 +143,8 @@ class hr_expense_expense(osv.osv): }) return True - def expense_canceled(self, cr, uid, ids, context=None): - self.expense_refuse_notificate(cr, uid, ids , context=context) + def expense_canceled(self, cr, uid, ids, *args): + self.expense_refuse_notificate(cr, uid, ids) self.write(cr, uid, ids, {'state':'cancelled'}) return True From c6a88089c9e5a1ce2a61d9cb545d885de47961b2 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 21 Nov 2012 15:27:28 +0530 Subject: [PATCH 12/14] [REM]hr_recruitment:code removed for stage changed bzr revid: kbh@tinyerp.com-20121121095728-651ta4nl2162xr56 --- addons/hr_recruitment/hr_recruitment.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 1d076b25ed3..9ae8a045393 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -468,12 +468,6 @@ class hr_applicant(base_stage, osv.Model): # OpenChatter methods and notifications # ------------------------------------------------------- - def stage_set_send_note(self, cr, uid, ids, stage_id, context=None): - """ Override of the (void) default notification method. """ - if not stage_id: return True - stage_name = self.pool.get('hr.recruitment.stage').name_get(cr, uid, [stage_id], context=context)[0][1] - return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), subtype="hr_recruitment.mt_stage_changed", context=context) - def case_get_note_msg_prefix(self, cr, uid, id, context=None): return 'Applicant' From 366dd537acfbe672cc0419b53d5af91ce27a9584 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 21 Nov 2012 18:22:09 +0530 Subject: [PATCH 13/14] [REM]hr_recruitment:unnecessary subtype removed bzr revid: kbh@tinyerp.com-20121121125209-votyj0ro8i6b9z5q --- addons/hr_recruitment/hr_recruitment.py | 2 +- addons/hr_recruitment/hr_recruitment_data.xml | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 9ae8a045393..b5e441bde15 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -480,7 +480,7 @@ class hr_applicant(base_stage, osv.Model): context = {} for applicant in self.browse(cr, uid, ids, context=context): if applicant.job_id: - self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('New employee joined the company %s.')%(applicant.name,), subtype="hr_recruitment.mt_hired", context=context) + self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('New employee joined the company %s.')%(applicant.name,), context=context) if applicant.emp_id: message = _("Applicant has been hired and created as an employee.") self.message_post(cr, uid, [applicant.id], body=message, context=context) diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index 5afd2cd1cca..ef8b7adfca8 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -462,10 +462,6 @@ - - Employee Hired - hr.job - New Applicant hr.job From 4fa2d6b95e6108b17373198296eb807e606686cd Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 21 Nov 2012 18:57:56 +0530 Subject: [PATCH 14/14] [IMP]code improve bzr revid: kbh@tinyerp.com-20121121132756-r4rrdioo6tife1ve --- addons/hr/hr_data.xml | 21 ------------------- addons/hr_recruitment/hr_recruitment_data.xml | 15 +++++++++++++ 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/addons/hr/hr_data.xml b/addons/hr/hr_data.xml index 029b77fd999..25c882f2201 100644 --- a/addons/hr/hr_data.xml +++ b/addons/hr/hr_data.xml @@ -18,26 +18,5 @@ Leave Management (keep track of employee leaves), Expense Management (manage emp - - New Applicant - hr.job - - - - Stage changed - hr.job - - - - Applicant Hired - hr.job - - - - Applicant Refused - hr.job - - - diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index ef8b7adfca8..1cfd99801a4 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -466,6 +466,21 @@ New Applicant hr.job + + Stage changed + hr.job + + + + Applicant Hired + hr.job + + + + Applicant Refused + hr.job + + Stage changed hr.applicant