Skip to content

TA#83757 [14.0][IMP] delivery_custom_notification : make delivery contact selection fully dynamic#248

Merged
qtiplb merged 2 commits into
14.0from
14.0-refactor-delivery_custom_notification-dynamic-contacts
Jul 16, 2026
Merged

TA#83757 [14.0][IMP] delivery_custom_notification : make delivery contact selection fully dynamic#248
qtiplb merged 2 commits into
14.0from
14.0-refactor-delivery_custom_notification-dynamic-contacts

Conversation

@qtiplb

@qtiplb qtiplb commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR refactors the delivery_custom_notification module to remove the manual contact typing system and make delivery contact selection fully dynamic.

Key Changes:

  • Removed the type selection extension for "Delivery Contact" type
  • Added delivery_contact_for_partner_ids One2many reverse relation field
  • Updated form view domain to allow selection of any child contact (no type restriction)
  • Updated search filter to dynamically show partners currently used as delivery contacts
  • Updated documentation to reflect the new dynamic approach

Benefits:

  • Simplified user experience - no manual tagging required
  • More flexible - any partner can be selected as delivery contact
  • Dynamic search filter automatically adapts based on actual usage
  • Cleaner data model

Test Plan

  • Install/upgrade the module successfully
  • Open a partner form and verify the Delivery Contact field shows all child contacts
  • Assign a delivery contact to a partner
  • Use the "Delivery Contacts" search filter and verify it shows the assigned contact
  • Create a delivery order with a carrier configured for custom notifications
  • Validate the delivery and verify the notification is sent to the delivery contact
  • Verify email appears in the picking's chatter

…ction fully dynamic

Remove manual contact typing system in favor of dynamic selection. Any partner can now be selected as a delivery contact without requiring special type tagging. The 'Delivery Contacts' search filter now dynamically shows all partners currently used as delivery contacts across the system.

- Remove type selection extension for 'delivery_contact' type
- Add delivery_contact_for_partner_ids One2many reverse relation field
- Update form view domain to allow selection of any child contact
- Update search filter to use dynamic domain based on reverse relation
- Update documentation to reflect new dynamic approach
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@qtiplb qtiplb changed the title [14.0][REF] delivery_custom_notification : make delivery contact selection fully dynamic TA#83757 [14.0][IMP] delivery_custom_notification : make delivery contact selection fully dynamic Jul 16, 2026
…s to super()

Remove over-filtering before calling super()._send_confirmation_email().
The filtered() call that restricted to 'outgoing' pickings was preventing
other picking types from being processed by parent methods, which could
break compatibility with other modules or future Odoo updates.

In Odoo development, recordsets should not be filtered before passing
to super() unless there is a strong reason to do so.
@qtiplb
qtiplb merged commit 18d32a0 into 14.0 Jul 16, 2026
2 of 4 checks passed
@qtiplb
qtiplb deleted the 14.0-refactor-delivery_custom_notification-dynamic-contacts branch July 16, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant