feature/odoo18 #2

Merged
administrator merged 43 commits from feature/odoo18 into develop 2025-05-22 16:16:43 +05:30
1 changed files with 10 additions and 9 deletions
Showing only changes of commit 312059666d - Show all commits

View File

@ -45,15 +45,16 @@ class ClientSubmissionsMailTemplateWizard(models.TransientModel):
record_id = self.env.context.get('active_id')
for rec in self:
record = self.env[self.template_id.model].browse(record_id)
template = self.env.ref('hr_recruitment_extended.application_client_submission_email_template')
values = {
'email_from': rec.email_from,
'email_to': rec.email_to,
'email_cc': rec.email_cc,
}
render_ctx = dict(client_name=record.hr_job_recruitment.requested_by.name)
# Use 'with_context' to override the email template fields dynamically
template.sudo().with_context(default_body_html=self.email_body, default_subject=self.email_subject,**render_ctx).send_mail(self.env.context.get('active_id'),email_values=values, force_send=True)
if rec.send_email_from_odoo:
template = self.env.ref('hr_recruitment_extended.application_client_submission_email_template')
values = {
'email_from': rec.email_from,
'email_to': rec.email_to,
'email_cc': rec.email_cc,
}
render_ctx = dict(client_name=record.hr_job_recruitment.requested_by.name)
# Use 'with_context' to override the email template fields dynamically
template.sudo().with_context(default_body_html=self.email_body, default_subject=self.email_subject,**render_ctx).send_mail(self.env.context.get('active_id'),email_values=values, force_send=True)
record.sudo().write({
'submitted_to_client': True,
'client_submission_date': rec.submit_date,