Skip to content

[IMP] hr_appraisal_oca: add configurable email notifications#1583

Open
ebauza wants to merge 1 commit into
OCA:18.0from
Esment:18.0-hr_appraisal_oca-optional-mail_notification
Open

[IMP] hr_appraisal_oca: add configurable email notifications#1583
ebauza wants to merge 1 commit into
OCA:18.0from
Esment:18.0-hr_appraisal_oca-optional-mail_notification

Conversation

@ebauza
Copy link
Copy Markdown
Contributor

@ebauza ebauza commented Jun 2, 2026

Description

This PR adds a configurable option to disable email notifications
in the appraisal workflow.

A new boolean field "Send email notifications" allows managers
to control whether automatic emails are sent during appraisal
confirmation and completion.

Functional behavior

  • By default, email notifications are enabled.
  • When disabled, no emails are sent during confirmation or completion.
  • All other workflow behavior remains unchanged (state transitions,
    activities, etc.).
  • This configuration is only visible to managers.

Technical details

  • Added field send_email_notifications on hr.appraisal
  • Introduced helper method _can_send_appraisal_email
  • Updated _send_email to respect the configuration and context override

Testing

  • Added tests to validate:
    • notifications enabled → emails are sent
    • notifications disabled → no emails are sent
    • context override behavior
  • Existing tests remain unchanged and passing

Rationale

This improvement provides flexibility to avoid sending automatic
emails in specific appraisal cases without altering the standard workflow.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @pedrobaeza,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:hr_appraisal_oca Module hr_appraisal_oca labels Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants