コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
7471 ビュー

I want to change SCSS color variables dynamically when a user sets custom colors for the backend. With a http controller I can generate the SCSS variables. My problem is when reloading the webpage, the SCSS variable cannot be found. Has anyone an idea to get it to work?

Inherit web.assets_backend:

<link rel="stylesheet" href="/theme/static/src/scss/colors.gen.scss"/>
<link rel="stylesheet" href="/theme/static/src/scss/style.scss"/>

For example:


/static/src/scss/colors.gen.scss generates:

$brand-primary:#008DCA;
$brand-secondary:#5EC269;


アバター
破棄
著作者

Update: when the user logs out, the http controller http://localhost:8069/theme/static/src/scss/colors.gen.scss gives 404 error. Maybe the problem is that Odoo cannot fetch the URL locally?

著作者

And if it works afterwards, multiple databases will give also a problem I think.

関連投稿 返信 ビュー 活動
0
6月 24
828
1
4月 18
4343
2
6月 17
5551
0
12月 15
57
2
6月 15
5955