Skip to content

[18.0][FIX] brand_external_report_layout: avoid empty SCSS attachment when no brand exists - #330

Open
SamyShaawat wants to merge 1 commit into
OCA:18.0from
SamyShaawat:18.0-fix-brand_external_report_layout-empty-scss
Open

SamyShaawat wants to merge 1 commit into
OCA:18.0from
SamyShaawat:18.0-fix-brand_external_report_layout-empty-scss

Conversation

@SamyShaawat

Copy link
Copy Markdown

Fixes #328

When no res.brand record exists, styles_brand_report renders nothing, so the res.brand.scss attachment is empty. The assets compiler then fails with Could not get content for /brand_external_report_layout/static/src/legacy/scss/asset_styles_brand_report.scss and the Document Layout preview never loads.

_get_asset_style_b64() now falls back to a placeholder comment when the rendered SCSS is blank. Both the install-time data record and _update_asset_style() use this method, so one guard covers both.

Added test_asset_style_not_empty_without_brand; it fails without the fix and passes with it.

…no brand exists

The generated res.brand.scss attachment was empty when there was no
res.brand record, so the assets compiler failed with 'Could not get
content for ...asset_styles_brand_report.scss' and the document layout
preview never loaded. Fall back to a placeholder comment.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@OCA-git-bot OCA-git-bot added series:18.0 mod:brand_external_report_layout Module brand_external_report_layout labels Oct 17, 2026
@SamyShaawat

SamyShaawat commented Oct 17, 2026 •

Copy link
Copy Markdown
Author

Hi @sbejaoui, could you please review this fix? Thanks!

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

Labels

mod:brand_external_report_layout Module brand_external_report_layout series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants