[18.0][FIX] mail_brand: typo in get_base_url (website_website_id -> website_id) - #315
Open
JulienMartinez wants to merge 1 commit into
Open
[18.0][FIX] mail_brand: typo in get_base_url (website_website_id -> website_id)#315JulienMartinez wants to merge 1 commit into
JulienMartinez wants to merge 1 commit into
Conversation
Contributor
JulienMartinez
force-pushed
the
18.0-fix-mail_brand-website_id
branch
from
July 15, 2026 14:03
9a85950 to
118ca7e
Compare
JulienMartinez
force-pushed
the
18.0-fix-mail_brand-website_id
branch
from
July 15, 2026 14:13
118ca7e to
e74f2e9
Compare
flotho
suggested changes
Jul 15, 2026
…_id) Fixes AttributeError: 'res.brand' object has no attribute 'website_website_id' when sending an email/message from a document linked to a brand. Also add a defensive check on website_id.domain: when the brand's website_id is set but the linked website has no domain configured (e.g. the brand's actual website is hosted outside Odoo, so website_id is left empty), get_base_url() now falls back to the default base URL instead of raising a TypeError (unsupported operand type(s) for +: 'bool' and 'str'). Closes OCA#287
JulienMartinez
force-pushed
the
18.0-fix-mail_brand-website_id
branch
from
July 15, 2026 14:18
e74f2e9 to
9fa7e4e
Compare
flotho
approved these changes
Jul 15, 2026
flotho
left a comment
Member
There was a problem hiding this comment.
code review,
failure from another module
LGTM
Thanks
flotho
approved these changes
Jul 15, 2026
bosd
approved these changes
Jul 20, 2026
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.
Fixes #287
The
get_base_urlmethod inmail_brandreferenced a non-existentfield
website_website_idonres.brand, causing an AttributeErrorwhen sending an email/message from a document linked to a brand.
The correct field is
website_id.