From 08da110bdd398fc18f57842d019af0d5fadd8dc7 Mon Sep 17 00:00:00 2001 From: Pranay Date: Wed, 25 Jun 2025 11:12:01 +0530 Subject: [PATCH 01/49] optional mail send --- .../employee_jod/models/emp_jod.py | 39 ++++++++++++++----- .../employee_jod/views/emp_jod.xml | 30 ++++++++++++++ 2 files changed, 59 insertions(+), 10 deletions(-) diff --git a/addons_extensions/employee_jod/models/emp_jod.py b/addons_extensions/employee_jod/models/emp_jod.py index 11a22bcee..e1999837f 100644 --- a/addons_extensions/employee_jod/models/emp_jod.py +++ b/addons_extensions/employee_jod/models/emp_jod.py @@ -2,16 +2,21 @@ from odoo import fields, api, models, _ from odoo.exceptions import UserError +class HRApplicant(models.Model): + _inherit = 'hr.applicant' + + joining_form_link = fields.Char() + + class HREmployee(models.Model): _inherit = 'hr.employee' - applicant_id = fields.Many2one("hr.applicant") def send_jod_form_to_employee(self): for rec in self: if not rec.applicant_id: - application = self.env['hr.applicant'].sudo().search([('employee_id','=',rec.id)],limit=1) + application = self.env['hr.applicant'].sudo().search([('employee_id', '=', rec.id)], limit=1) if not application: candidate = self.env['hr.candidate'].sudo().create({ 'partner_name': rec.name, @@ -30,11 +35,11 @@ class HREmployee(models.Model): return rec.sudo().applicant_id.send_post_onboarding_form_to_candidate() - - class PostOnboardingAttachmentWizard(models.TransientModel): _inherit = 'post.onboarding.attachment.wizard' + send_mail = fields.Boolean(default=False) + @api.onchange('template_id') def _onchange_template_id(self): """ Update the email body and recipients based on the selected template. """ @@ -65,7 +70,6 @@ class PostOnboardingAttachmentWizard(models.TransientModel): self.email_body = email_template.body_html # Assign the rendered email bodyc self.email_subject = email_template.subject - def action_confirm(self): for rec in self: self.ensure_one() @@ -89,7 +93,6 @@ class PostOnboardingAttachmentWizard(models.TransientModel): lambda a: a.attachment_type == 'previous_employer').mapped('name') other_docs = rec.req_attachment_ids.filtered(lambda a: a.attachment_type == 'others').mapped('name') - # Prepare context for the template email_context = { 'personal_docs': personal_docs, @@ -106,14 +109,30 @@ class PostOnboardingAttachmentWizard(models.TransientModel): } # Use 'with_context' to override the email template fields dynamically - template.sudo().with_context(default_body_html=rec.email_body, - **email_context).send_mail(applicant.id, email_values=email_values, - force_send=True) - + if rec.send_mail: + template.sudo().with_context(default_body_html=rec.email_body, + **email_context).send_mail(applicant.id, email_values=email_values, + force_send=True) + base_url = self.get_base_url() if rec.is_pre_onboarding_attachment_request: applicant.doc_requests_form_status = 'email_sent_to_candidate' else: applicant.post_onboarding_form_status = 'email_sent_to_candidate' + applicant.joining_form_link = '%s/FTPROTECH/JoiningForm/%s'%(base_url,applicant.id) return {'type': 'ir.actions.act_window_close'} + + + def get_base_url(self): + """ Return rooturl for a specific record. + + By default, it returns the ir.config.parameter of base_url + but it can be overridden by model. + + :return: the base url for this record + :rtype: str + """ + if len(self) > 1: + raise ValueError("Expected singleton or no record: %s" % self) + return self.env['ir.config_parameter'].sudo().get_param('web.base.url') diff --git a/addons_extensions/employee_jod/views/emp_jod.xml b/addons_extensions/employee_jod/views/emp_jod.xml index 35b71cd2f..b8aa8eb6e 100644 --- a/addons_extensions/employee_jod/views/emp_jod.xml +++ b/addons_extensions/employee_jod/views/emp_jod.xml @@ -11,4 +11,34 @@ + + + post.onboarding.attachment.wizard.form.inherit + post.onboarding.attachment.wizard + + + + + + + not send_mail + + + Send + + + + + + + hr.applicant.view.form.extend + hr.applicant + + + + + + + + \ No newline at end of file From b7e71c776c7f1176277399ea23d3135a2a058a76 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 02/49] Initial commit From 34771a0d2b73cec5b881229b8ca66cc6973234ad Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 03/49] Initial commit From eb3566ba4f22872da6ea4aec3706a7abe43da4bf Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 04/49] Initial commit From 22897efe79029239fa2a062bace847876a0edfb0 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 05/49] Initial commit From 69083b1db000112a6db05f9ff2bd858539b9c5c8 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 06/49] Initial commit From a84a61e92da9e276e39e8b6b6ba7c4e12a0866aa Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 07/49] Initial commit From 0b391a158142099f15b6e7c231a3b5f5cea5b6b3 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 08/49] Initial commit From 4288b7fb2ecc1dd6cb0a64bb98f6cef8a9bf5a16 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 09/49] Initial commit From 977cdd9710fb30ef509bbce34974f2ccb9819f8d Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 10/49] Initial commit From cdb71a3888179b754e4cb3b90de09da9b98d2373 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 11/49] Initial commit From e5ce24f848633c311f8af2a55aaa3d1fc187faa6 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 12/49] Initial commit From 5c822d8aa5c645c0898ca7209ac7bc5329bcff92 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 13/49] Initial commit From 4e25a40911acc57f19fcb76460a6f68f4842abe7 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 14/49] Initial commit From 3ebaf06394915750f12f41cbddd024ec6aa261e9 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 15/49] Initial commit From 99ae7f3aa7413e2dc6807bf753f28854ce1e418f Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 16/49] Initial commit From 1b7f7fcbdbf09edfa623f7ac6158107ff9ecabb5 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 17/49] Initial commit From 954db096713e805c830fdb864665c3ae07c9fd50 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 18/49] Initial commit From 01d062072be3ccce2ebf5f856bb37f503a2b7d10 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 19/49] Initial commit From 375b7fd83ed9adbfe294e9bec97711b1b491393b Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 20/49] Initial commit From 2666b5abf95bf68ab72e9bf2b3124fb6657e5af4 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 21/49] Initial commit From 974098c6a65b3df467e13cd0990bf20b3fedcc30 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 24 Mar 2025 11:35:35 +0530 Subject: [PATCH 22/49] update whatsapp code --- addons_extensions/whatsapp/models/discuss_channel.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons_extensions/whatsapp/models/discuss_channel.py b/addons_extensions/whatsapp/models/discuss_channel.py index e2989c112..7fb18c9cf 100644 --- a/addons_extensions/whatsapp/models/discuss_channel.py +++ b/addons_extensions/whatsapp/models/discuss_channel.py @@ -201,8 +201,7 @@ class DiscussChannel(models.Model): subtype_xmlid='mail.mt_note', ) if partners_to_notify == channel.whatsapp_partner_id and wa_account_id.notify_user_ids.partner_id: - partners_to_notify += wa_account_id.notify_user_ids.partner_id - partners_to_notify = self.env['res.partner'].browse(list(set(partners_to_notify.ids))) + partners_to_notify |= wa_account_id.notify_user_ids.partner_id channel.channel_member_ids = [Command.clear()] + [Command.create({'partner_id': partner.id}) for partner in partners_to_notify] channel._broadcast(partners_to_notify.ids) return channel From 1531db9b342cd40a369e7721effc6d00b1a6eb53 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 24 Mar 2025 12:54:38 +0530 Subject: [PATCH 23/49] fix whatsapp --- addons_extensions/whatsapp/models/discuss_channel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons_extensions/whatsapp/models/discuss_channel.py b/addons_extensions/whatsapp/models/discuss_channel.py index 7fb18c9cf..e2989c112 100644 --- a/addons_extensions/whatsapp/models/discuss_channel.py +++ b/addons_extensions/whatsapp/models/discuss_channel.py @@ -201,7 +201,8 @@ class DiscussChannel(models.Model): subtype_xmlid='mail.mt_note', ) if partners_to_notify == channel.whatsapp_partner_id and wa_account_id.notify_user_ids.partner_id: - partners_to_notify |= wa_account_id.notify_user_ids.partner_id + partners_to_notify += wa_account_id.notify_user_ids.partner_id + partners_to_notify = self.env['res.partner'].browse(list(set(partners_to_notify.ids))) channel.channel_member_ids = [Command.clear()] + [Command.create({'partner_id': partner.id}) for partner in partners_to_notify] channel._broadcast(partners_to_notify.ids) return channel From 8b40f4a9eda6e9ae5ad383c793175d7969359db3 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 24 Mar 2025 13:10:34 +0530 Subject: [PATCH 24/49] Recruitment Changes --- .../hr_recruitment_extended/models/hr_job_recruitment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons_extensions/hr_recruitment_extended/models/hr_job_recruitment.py b/addons_extensions/hr_recruitment_extended/models/hr_job_recruitment.py index 97b114a76..d546a3cde 100644 --- a/addons_extensions/hr_recruitment_extended/models/hr_job_recruitment.py +++ b/addons_extensions/hr_recruitment_extended/models/hr_job_recruitment.py @@ -256,6 +256,8 @@ class HRJobRecruitment(models.Model): rec.submission_status = 'zero' + experience = fields.Many2one('candidate.experience', string="Experience") + @api.depends('application_ids.submitted_to_client') def _compute_no_of_submissions(self): counts = dict(self.env['hr.applicant']._read_group( From 1dcdc9c69e3f7980102d18ee2f5cc439e2306bf5 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 7 Apr 2025 16:08:02 +0530 Subject: [PATCH 25/49] time-off FIX --- addons_extensions/hr_timeoff_extended/models/hr_timeoff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py b/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py index 593c2a541..fea92e9e5 100644 --- a/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py +++ b/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py @@ -1,3 +1,4 @@ +from asyncore import write from calendar import month from dateutil.utils import today From 7b2d2e12f90606a08fb80cbfedbb764b98ba00c3 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 7 Apr 2025 16:34:42 +0530 Subject: [PATCH 26/49] TimeOff Fix --- addons_extensions/hr_timeoff_extended/models/hr_timeoff.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py b/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py index fea92e9e5..593c2a541 100644 --- a/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py +++ b/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py @@ -1,4 +1,3 @@ -from asyncore import write from calendar import month from dateutil.utils import today From 4b586a47edf0ab20fa5f3dad85c777b560cc1782 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 27/49] Initial commit From 0a77c8252507509ea03ac68b68a9fcd3faf91e99 Mon Sep 17 00:00:00 2001 From: administrator Date: Mon, 2 Jun 2025 15:19:52 +0530 Subject: [PATCH 28/49] pull commit --- addons_extensions/hr_employee_extended/__manifest__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons_extensions/hr_employee_extended/__manifest__.py b/addons_extensions/hr_employee_extended/__manifest__.py index ec27233ec..ee072e92c 100644 --- a/addons_extensions/hr_employee_extended/__manifest__.py +++ b/addons_extensions/hr_employee_extended/__manifest__.py @@ -18,8 +18,12 @@ 'version': '0.1', # any module necessary for this one to work correctly + 'depends': ['base','hr','account','mail','hr_skills', 'hr_contract'], + + + # always loaded 'data': [ 'security/security.xml', From 4f51bc1df845280821134269a8e414dd79d942ff Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 29/49] Initial commit From 9e656161bdf572231d883de2bf2cc5937c3d45ba Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 30/49] Initial commit From cb0c3c3c0e1219c981431c37148dc245ccb7b316 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 31/49] Initial commit From f553bb6e04f0424c466f43c3edfba299d4aa28b8 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 32/49] Initial commit From c05fb6fc2f211062aafcabdd864525a7ffb5d2b8 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 33/49] Initial commit From 2a580c55524d2083c320cce9b887d1e4355cc92a Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 34/49] Initial commit From 1bc56b347221cf8f4355c2e0fd47f14895094c28 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 35/49] Initial commit From b35769dedf6a5dee94503e00d4b5f69239dacf40 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 36/49] Initial commit From 46f9a01cf01f120c488f11d3d112afcbc677e803 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 37/49] Initial commit From ca95a980ee8408c7769c34e96fc275af500b39dc Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 38/49] Initial commit From ee680869b5bc6815c5ac521b0af969cf813c5abc Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 39/49] Initial commit From 3c8a9603cae0a136107ef624a3a2d8018c82094b Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 40/49] Initial commit From d03353a7ce71d376147106a2f89030034f110c0d Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 41/49] Initial commit From 89f91e7a12f41c19a885fd1115f98f3a98c5f41b Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 42/49] Initial commit From 7748d34d9affc429997f32e9af2ded33eae32a9d Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 43/49] Initial commit From 09c8093d39be068276ad04848b20bc74267602a6 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 44/49] Initial commit From 9f4832b673259a87f34d72408d8e847b956335cb Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 45/49] Initial commit From d07668d3195c93fce8a4006c9d5a5aeca6a8b7f9 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 46/49] Initial commit From cf69d64dfa646c51ff682710b940306bfc80d591 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 47/49] Initial commit From 94d788ff9d9dd5a019eefb8e9fcf4e574479b99d Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 48/49] Initial commit From d63c8f9095a1270abe71c77008c5e0aa17cb3301 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 49/49] Initial commit