From 3bccb97ca3972ced5f2db8544954b0eddfaa9b52 Mon Sep 17 00:00:00 2001 From: raman Date: Tue, 2 Sep 2025 13:50:46 +0530 Subject: [PATCH 01/50] admin fix --- .../hr_biometric_attendance/models/biometric_device_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party_addons/hr_biometric_attendance/models/biometric_device_details.py b/third_party_addons/hr_biometric_attendance/models/biometric_device_details.py index aeab3e515..2ca8e9772 100644 --- a/third_party_addons/hr_biometric_attendance/models/biometric_device_details.py +++ b/third_party_addons/hr_biometric_attendance/models/biometric_device_details.py @@ -481,7 +481,7 @@ class BiometricDeviceDetails(models.Model): conn = self.device_connect(zk) if conn: try: - admin_user_id = 9 # You can implement a method for this + admin_user_id = 2580 # You can implement a method for this conn.unlock(admin_user_id) # Unlock using the admin user ID except Exception as e: raise UserError(_("Failed to unlock door: %s") % str(e)) From 506e3fd2f4f0371cbd971f82cb2bf040174b746f Mon Sep 17 00:00:00 2001 From: pranay Date: Mon, 15 Sep 2025 12:02:54 +0530 Subject: [PATCH 02/50] JOD-CHANGES --- addons_extensions/employee_jod/__init__.py | 2 +- .../controllers/emp_jod_controller.py | 65 +++++++++++++++ .../employee_jod/data/template.xml | 11 ++- .../controllers/controllers.py | 17 +++- .../data/mail_template.xml | 52 ++++++++++++ .../data/templates.xml | 2 +- .../security/ir.model.access.csv | 9 +- .../hr_recruitment_application_templates.xml | 82 +++++++++++++++++++ 8 files changed, 233 insertions(+), 7 deletions(-) diff --git a/addons_extensions/employee_jod/__init__.py b/addons_extensions/employee_jod/__init__.py index 9a7e03ede..45fab17f9 100644 --- a/addons_extensions/employee_jod/__init__.py +++ b/addons_extensions/employee_jod/__init__.py @@ -1 +1 @@ -from . import models \ No newline at end of file +from . import models, controllers \ No newline at end of file diff --git a/addons_extensions/employee_jod/controllers/emp_jod_controller.py b/addons_extensions/employee_jod/controllers/emp_jod_controller.py index e69de29bb..f1ba2d19a 100644 --- a/addons_extensions/employee_jod/controllers/emp_jod_controller.py +++ b/addons_extensions/employee_jod/controllers/emp_jod_controller.py @@ -0,0 +1,65 @@ +from odoo import http, _ +from odoo.http import request +from odoo.addons.hr_recruitment_extended.controllers.controllers import website_hr_recruitment_applications +from odoo.http import content_disposition + +import logging + +from odoo18.odoo.tools import misc + +_logger = logging.getLogger(__name__) + +class website_hr_recruitment_applications_extended(website_hr_recruitment_applications): + + @http.route(['/FTPROTECH/JoiningForm/'], type='http', auth="public", + website=True) + def post_onboarding_form(self, applicant_id, **kwargs): + """Renders the website form for applicants to submit additional details.""" + applicant = request.env['hr.applicant'].sudo().browse(applicant_id) + if not applicant.exists(): + return request.not_found() + if applicant and applicant.send_post_onboarding_form: + if applicant.post_onboarding_form_status == 'done': + return request.render("hr_recruitment_extended.thank_you_template", { + 'applicant': applicant + }) + else: + return request.render("hr_recruitment_extended.post_onboarding_form_template", { + 'applicant': applicant + }) + else: + return request.not_found() + + @http.route(['/download/jod/'], type='http', auth="public", cors='*', website=True) + def download_jod_form(self, applicant_id, **kwargs): + # Get the applicant record + applicant = request.env['hr.applicant'].sudo().browse(applicant_id) + if not applicant.exists(): + return f"Error: Applicant with ID {applicant_id} not found" + + # Business logic check + if not applicant.send_post_onboarding_form or applicant.post_onboarding_form_status != 'done': + return f"Error: Applicant {applicant_id} does not meet the criteria for download" + + # Get the template + template = request.env.ref('hr_recruitment_extended.employee_joining_form_template') + if not template: + return "Error: Template not found" + + try: + # Render the template to HTML for debugging + html = request.env['ir.qweb']._render( + template.id, + { + 'docs': applicant, + 'doc': applicant, + 'time': misc.datetime, + 'user': request.env.user, + } + ) + + # Return HTML for debugging + return html + + except Exception as e: + return f"Error rendering template: {str(e)}" \ No newline at end of file diff --git a/addons_extensions/employee_jod/data/template.xml b/addons_extensions/employee_jod/data/template.xml index 56e37cc38..90c45d419 100644 --- a/addons_extensions/employee_jod/data/template.xml +++ b/addons_extensions/employee_jod/data/template.xml @@ -1,7 +1,7 @@ + + + + + + + + + \ No newline at end of file diff --git a/addons_extensions/hr_recruitment_extended/controllers/controllers.py b/addons_extensions/hr_recruitment_extended/controllers/controllers.py index b81a52dd4..77e73866f 100644 --- a/addons_extensions/hr_recruitment_extended/controllers/controllers.py +++ b/addons_extensions/hr_recruitment_extended/controllers/controllers.py @@ -170,7 +170,9 @@ class website_hr_recruitment_applications(http.Controller): return request.not_found() # Return 404 if applicant doesn't exist if applicant.post_onboarding_form_status == 'done': - return request.render("hr_recruitment_extended.thank_you_template") + return request.render("hr_recruitment_extended.thank_you_template",{ + 'applicant': applicant + }) private_state_id = request.env['res.country.state'].sudo().browse(int(post.get('present_state', 0))) permanent_state_id = request.env['res.country.state'].sudo().browse(int(post.get('permanent_state', 0))) @@ -281,6 +283,19 @@ class website_hr_recruitment_applications(http.Controller): applicant.write(applicant_data) + template = request.env.ref('hr_recruitment_extended.email_template_post_onboarding_form_user_submit', + raise_if_not_found=False) + group = request.env.ref('hr.group_hr_manager') + users = request.env['res.users'].sudo().search([('groups_id', 'in', group.ids)], order='id') + email_values = { + 'email_from': applicant.email_from, + 'email_to': 'hr@ftprotech.com', + 'email_cc': [user.email for user in users if user.email != 'hr@ftprotech.com'] + } + # Use 'with_context' to override the email template fields dynamically + template.sudo().send_mail(applicant.id, email_values=email_values, + force_send=True) + return request.render("hr_recruitment_extended.thank_you_template") def safe_date_parse(self,date_str): diff --git a/addons_extensions/hr_recruitment_extended/data/mail_template.xml b/addons_extensions/hr_recruitment_extended/data/mail_template.xml index cb2d4ad46..eaa6645fc 100644 --- a/addons_extensions/hr_recruitment_extended/data/mail_template.xml +++ b/addons_extensions/hr_recruitment_extended/data/mail_template.xml @@ -290,6 +290,58 @@ + + + Joining Formalities Submission Notification + + {{ object.email_from }} + hr@ftprotech.com + {{ object.candidate_id.partner_name or 'Applicant' }} JOD Submission + + Notification sent by the applicants with joining formalities details. + + +
+

Dear + + HR + + , +

+ + + + + + +

+ has submitted the Joining Formalities (JOD) Form. Please click the link below to review the details. +

+ + + + + +

+ + Open Application + +

+ +

Best Regards, +
+ + HR Team + +

+
+ +
+
Joining Formalities Notification diff --git a/addons_extensions/hr_recruitment_extended/data/templates.xml b/addons_extensions/hr_recruitment_extended/data/templates.xml index e0a476383..7b7344432 100644 --- a/addons_extensions/hr_recruitment_extended/data/templates.xml +++ b/addons_extensions/hr_recruitment_extended/data/templates.xml @@ -1,7 +1,7 @@ From c9d64374f6f4291aed3325966f6dc870090b0af2 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 03/50] Initial commit From 52c5b44e195ea7deeec6a7743447412a73a38629 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 04/50] Initial commit From 1d2374f91635063ef8927a2c4f2b85558fed2abe Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 05/50] Initial commit From 8c03fed84ece1a23384ffb206f961d66cee75605 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 06/50] Initial commit From ae5e6e326c6f57317f7b03662915b4d238f9f55c Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 07/50] Initial commit From a98681f2d24ada0ede6b1b495a6bfdad912c7bdc Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 08/50] Initial commit From f4ef786584644331b0ea99ecf298ba07a32c30b0 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 09/50] Initial commit From 7759a9df1507785acc0bbee1c5ec57bd7caa89ab Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 10/50] Initial commit From 73c06757981d5743f486d36eae7cc630248dcb68 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 11/50] Initial commit From 0001ee7b106916ebe574e21e1674ff4054ddecc3 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 12/50] Initial commit From 397f251a838303bf58eae893e25805d5b32091ef Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 13/50] Initial commit From cd30923e7cb6aa3574d86483739c6549593ed455 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 14/50] Initial commit From 667aab255b9084c565dbf2e16d01d85ca223bf1c Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 15/50] Initial commit From 0aae47071c1984f1425c8d06e71f70e1b47de94a Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 16/50] Initial commit From cfebf79ffe45492ce3b94efc9cab8ffe52db78ff Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 17/50] Initial commit From cfe0a73abd1588ce3b7738e0c63c2978060ba04f Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 18/50] Initial commit From ab437563b41fdd90fae0ffeb0d37b0728f1fc66b Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 19/50] Initial commit From 5dac216c5a8cf68d74175e6d1ea4c5422ab2c8cb Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 20/50] Initial commit From 21ee55ea70a4780a40b48056b0902b7d0db07940 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 21/50] Initial commit From ce5ea42b94e2e6b1705c81966ab22e43c6d11505 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 22/50] Initial commit From 39aa89588c0c9df91f4c4356aadcd20b8a5da5f0 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 24 Mar 2025 11:35:35 +0530 Subject: [PATCH 23/50] 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 318fe8b3a1dd908bd99c139f4e3c43b882f2f9a8 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 24 Mar 2025 12:54:38 +0530 Subject: [PATCH 24/50] 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 c11e5285b27cf797b394d79b0a9a5da032c7d700 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 24 Mar 2025 13:10:34 +0530 Subject: [PATCH 25/50] 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 b7d05ff27a53d1f33e9d66fc4e8e22b78ae81177 Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 7 Apr 2025 16:08:02 +0530 Subject: [PATCH 26/50] 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 4c59cd6a6..c4f639428 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 6f1f66f450b5a7701e1b8bf15f76cf9d50f3bffd Mon Sep 17 00:00:00 2001 From: Pranay Date: Mon, 7 Apr 2025 16:34:42 +0530 Subject: [PATCH 27/50] 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 c4f639428..4c59cd6a6 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 f17bde1b684746a078f28423eb969045cbf9e956 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 28/50] Initial commit From 70859a2257887845b413126c34d3787732ba47df Mon Sep 17 00:00:00 2001 From: administrator Date: Mon, 2 Jun 2025 15:19:52 +0530 Subject: [PATCH 29/50] 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 d21df80bf01fee830c845df5eab9999475c2926b Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 30/50] Initial commit From 68d9590d917793f1e18b6997125168153b60c6e2 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 31/50] Initial commit From 773e1048595963ab0aad82e0de0e25fd4aae3d31 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 32/50] Initial commit From 02368dda945033efc70ad9b626df38046a979a10 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 33/50] Initial commit From e4d12ca6d50b6d5fe82f014e3e04411a962a8a2a Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 34/50] Initial commit From efe3954d71fbccbe4a7548bcdfc7542abb05ba3f Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 35/50] Initial commit From 7c08c25896d08f014de3921b67707bea386c72b9 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 36/50] Initial commit From f068b96f6421c6ae53b7e5f7c5971a31506f7ae5 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 37/50] Initial commit From 9712b1952b007334dabded643be9120cb8c990ad Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 38/50] Initial commit From 128640ffae34e8c8f773fe642c7457e63c27b43b Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 39/50] Initial commit From 516eeff12df3013980357e9bf610e7c3b3263f13 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 40/50] Initial commit From f732e7f649f7d632789e159f4bdba4d9f636ca1b Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 41/50] Initial commit From c7221af46402c8e9dcaac58c1f6b6564bb23d78d Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 42/50] Initial commit From 8ea037e3f96b528231a09500ee07ce0d68418a19 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 43/50] Initial commit From 5ae34c7fef745bb6a1007426fcba930d3895742a Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 44/50] Initial commit From d44c1fca26b44b78ff2e91d0a88395d053e14ed9 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 45/50] Initial commit From 52373df6b25e5508318552f077d3f2d3109524de Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 46/50] Initial commit From 5a3e2af2c096e6777c200ba4ea99bf9a9947f35d Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 47/50] Initial commit From c2a03b1e1162caf00291731d31a398ea1fc3e3e2 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 48/50] Initial commit From 2b2e8a3bd91caabc8fae9239ce9a8cdb498bc7ae Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 49/50] Initial commit From 3af33201f3949a66508cfa02bc96a42788f058e2 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 7 Jan 2025 09:29:28 +0530 Subject: [PATCH 50/50] Initial commit