Skip to content

Conversation

@DjodyKort
Copy link

@DjodyKort DjodyKort commented Dec 12, 2025

What does this PR do?

Add a backported feature for sending SQL export reports to partners in addition to users. This enables more flexible notification workflows by allowing partners to receive automated reports via email.

Migration Notes

This feature is backported from v18/16 to v17 so it already existed.

Testing

All pre-commit hooks passed including:

  • ✅ Ruff (Python linting)
  • ✅ Pylint-odoo (mandatory checks)
  • ✅ OCA module structure checks
  • ✅ XML validation

Unit tests:

  • ✅ test_sql_query_mail_partner (new)
  • ✅ All existing tests still pass

Manual testing performed with partner email notifications.

@OCA-git-bot
Copy link
Contributor

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

Copy link
Contributor

@Larsq1 Larsq1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

{
"name": "SQL Export Mail",
"version": "17.0.1.0.0",
"version": "17.0.1.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be 17.0.1.1.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, dont change this key in the manifest. it will be done, when merging.

Copy link
Contributor

@Larsq1 Larsq1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

if not user.email:
raise UserError(_("The user does not have any e-mail address."))
raise UserError(
self.env._("The user does not have any e-mail address.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.env._("The user does not have any e-mail address.")
_("The user does not have any e-mail address.")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and in all other places

@DjodyKort DjodyKort force-pushed the 17.0-imp-sql_export_mail-partner-notification branch from 1a2e6f3 to 85766a8 Compare December 15, 2025 09:16
Backported from Odoo 18 version into 17.0 branch.

- Add mail_partner_ids field to send SQL export reports to partners

- Include partner emails in mail template alongside user emails
@DjodyKort DjodyKort force-pushed the 17.0-imp-sql_export_mail-partner-notification branch from 85766a8 to 35167df Compare December 15, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants