تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
7293 أدوات العرض

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
يونيو 24
745
1
أبريل 18
4184
2
يونيو 17
5399
0
ديسمبر 15
57
2
يونيو 15
5844