Files
odoo_source/addons/hr_recruitment/wizard
Nasreddin Boulif (bon) 89e98471fa [FIX] hr_recruitment: Don't use archived email server
Steps to reproduce:

  - Install Recruitment module
  - Set a valid outgoing mail server and archive it
  - Go to Recruitment > Applications > All Applications
  - Create a new application
  - Set a Subject and email, then save
  - Click on button 'Refuse'
  - Select any reason (ensure "send email" is checked)

Issue:

  The email is sent to the applicant through the archived email server.

Cause:

  The current action have 'active_test' set to 'False' in the context
  (useful when archiving an applicant though action menu, since it
  trigger action 'action_refuse_reason_apply' and current applicant
  will be archived at that point).
  Therefore, the archived email server will be used (in case it's the
  only one, or if it has more priority than any other one).

Solution:

  Set 'active_test' to 'True' in the context when sending mail.

opw-2845545

closes odoo/odoo#91161

X-original-commit: c4f6bd121d242dca6eefa697dba23fd6f055bbe0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-05-12 13:43:13 +02:00
..