Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
7443 มุมมอง

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 24
803
How to add quantity in Asset Management? แก้ไขแล้ว
1
เม.ย. 18
4335
2
มิ.ย. 17
5548
0
ธ.ค. 15
57
2
มิ.ย. 15
5955