TA#83757 [14.0][FIX] delivery_custom_notification : multiple fixes#245
Merged
Conversation
* Use native type field instead of custom boolean (is_delivery_contact) * Add 'delivery_contact' as new partner type option * Position delivery_contact_id field after property_delivery_carrier_id * Add separator before filter to create distinct section * Add French translations (i18n/fr.po) * Fix PICK operations triggering super() call unnecessarily * Update domain and context to use type='delivery_contact' * Remove custom field view, now uses standard Odoo type selector * Update README to reflect type system usage
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes 4 issues reported after initial deployment of the delivery_custom_notification module.
✅ Fix 1: Use Native Contact Type System
Problem: Custom boolean field
is_delivery_contactwas inconsistent with Odoo's standard contact typing system.Solution:
is_delivery_contactboolean fieldtypeselection field with new "Delivery Contact" option[('type', '=', 'delivery_contact')]Benefits:
✅ Fix 2: Field Positioning
Problem:
delivery_contact_idfield was in the Misc section, far from related delivery fields.Solution:
property_delivery_carrier_id(Delivery Method)Benefits:
✅ Fix 3: Filter Positioning
Problem: "Delivery Contacts" filter was inside the Customer/Supplier/Invoice section.
Solution:
<separator/>before the filterBenefits:
✅ Fix 4: PICK Operations Triggering Notifications
Problem: PICK operations with manually added carriers triggered
super()._send_confirmation_email(), causing unwanted chatter messages.Solution:
lambda p: p.picking_type_id.code == 'outgoing'Benefits:
🇫🇷 Bonus: French Translations
i18n/fr.pofileTechnical Changes
Modified Files:
models/res_partner.py: Replaced boolean with Selection extensionviews/res_partner_views.xml: Updated field positioning and filter sectionmodels/stock_picking.py: Added filtering for super() calli18n/fr.po: New French translation file (NEW)README.rst: Updated documentationStats: 5 files changed, 132 insertions(+), 41 deletions(-)
📝 Note on Email Recipients
The module uses
message_post_with_template()withpartner_idsparameter.Important: Email templates should have recipient fields empty (To, CC, Partner IDs). The module sets recipients programmatically. If templates have preconfigured recipients, duplicates may occur.
This is documented in README with⚠️ CRITICAL warnings.