[IMP] website: increase priority of user custom assets

This commit moves the custom user css assets to a higher priority
so their custom css have ascendancy over the other rules.

Part of #44633
task-2168391
This commit is contained in:
Thanh Dodeur
2020-02-28 13:48:25 +00:00
committed by qsm-odoo
parent 456f8a7e70
commit da46ba7bc1
+13 -5
View File
@@ -50,11 +50,15 @@
</template>
<template id="_assets_frontend_helpers" inherit_id="portal._assets_frontend_helpers">
<xpath expr="//link" position="before">
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/bootstrap_overridden.scss"/>
</xpath>
</template>
<template id="_assets_frontend_helpers_user_custom" inherit_id="web._assets_frontend_helpers" priority="99">
<xpath expr="//link" position="before">
<!-- Custom empty file for user custom bootstrap override -->
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/user_custom_bootstrap_overridden.scss"/>
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/bootstrap_overridden.scss"/>
</xpath>
</template>
@@ -62,9 +66,6 @@
<xpath expr="//link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/website.scss"/>
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/website.ui.scss"/>
<!-- Custom empty file for user custom rules -->
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/user_custom_rules.scss"/>
</xpath>
<xpath expr="//script[@src='/web/static/src/js/public/public_root_instance.js']" position="replace">
<script type="text/javascript" src="/website/static/src/js/content/website_root_instance.js"/>
@@ -89,6 +90,13 @@
</xpath>
</template>
<template id="assets_frontend_user_custom" inherit_id="web.assets_frontend" name="Website Assets user custom" priority="99">
<xpath expr="//link[last()]" position="after">
<!-- Custom empty file for user custom rules -->
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/user_custom_rules.scss"/>
</xpath>
</template>
<template id="assets_frontend_compatibility_for_12_0" inherit_id="website.assets_frontend" active="False">
<xpath expr="//link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/compatibility/bs3_for_12_0.scss"/>