[FIX] donation_base: use default_res_ids instead of deprecated default_res_id#152
Open
dbruehlmeier wants to merge 1 commit intoOCA:18.0from
Open
[FIX] donation_base: use default_res_ids instead of deprecated default_res_id#152dbruehlmeier wants to merge 1 commit intoOCA:18.0from
dbruehlmeier wants to merge 1 commit intoOCA:18.0from
Conversation
Contributor
|
Hi @alexis-via, |
Two issues prevented sending tax receipt confirmation emails:
1. Used deprecated 'default_res_id' context key instead of 'default_res_ids'.
In Odoo 18.0, mail.compose.message.default_get() raises a ValueError
when 'default_res_id' is used.
2. Set 'default_email_layout_xmlid' to the mail template XML ID
('donation_base.tax_receipt_email_template') instead of an ir.ui.view
email layout. This caused an AssertionError in ir.ui.view._get_view_id.
Changed to 'mail.mail_notification_light' which is the standard light
email notification layout.
57d03c4 to
7f11dd6
Compare
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
Fixes two bugs in
action_send_tax_receiptthat prevent sending tax receipt confirmation emails in Odoo 18.0.Bug 1: Deprecated
default_res_idcontext keymail.compose.message.default_get()raises aValueErrorwhendefault_res_idis passed in context, as it has been replaced bydefault_res_idsin Odoo 18.0.Bug 2: Wrong XML ID for
default_email_layout_xmliddefault_email_layout_xmlidwas set todonation_base.tax_receipt_email_template, which is amail.templaterecord. This context key expects anir.ui.viewQWeb email layout, causing anAssertionErrorinir.ui.view._get_view_id.Fix