Skip to content

[18.0][FIX] mail_brand: typo in get_base_url (website_website_id -> website_id) - #315

Open
JulienMartinez wants to merge 1 commit into
OCA:18.0from
JulienMartinez:18.0-fix-mail_brand-website_id
Open

[18.0][FIX] mail_brand: typo in get_base_url (website_website_id -> website_id)#315
JulienMartinez wants to merge 1 commit into
OCA:18.0from
JulienMartinez:18.0-fix-mail_brand-website_id

Conversation

@JulienMartinez

Copy link
Copy Markdown

Fixes #287

The get_base_url method in mail_brand referenced a non-existent
field website_website_id on res.brand, causing an AttributeError
when sending an email/message from a document linked to a brand.

The correct field is website_id.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@JulienMartinez
JulienMartinez force-pushed the 18.0-fix-mail_brand-website_id branch from 9a85950 to 118ca7e Compare July 15, 2026 14:03
@pedrobaeza pedrobaeza added this to the 18.0 milestone Jul 15, 2026
@JulienMartinez
JulienMartinez force-pushed the 18.0-fix-mail_brand-website_id branch from 118ca7e to e74f2e9 Compare July 15, 2026 14:13
Comment thread mail_brand/__manifest__.py Outdated
…_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
JulienMartinez force-pushed the 18.0-fix-mail_brand-website_id branch from e74f2e9 to 9fa7e4e Compare July 15, 2026 14:18

@flotho flotho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code review,
failure from another module
LGTM
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[18.0] mail_brand: AttributeError in get_base_url (typo website_website_id)

5 participants