-
-
Save ray-odoo/17a1dc72c7f59314ed1592b1a3db7e0c to your computer and use it in GitHub Desktop.
This also worked for me in v16 albeit I used a different approach. Adding it below incase it might be of use to someone else. I made mine into a setting on the settings page with a color picker widget. Here is the template I made to pull from the settings.
<template id='my_navbar_web_layout' inherit_id='web.layout'> <data inherit_id="web.layout"> <xpath expr="//body" position="inside"> <t t-set="color" t-value='request.env["ir.config_parameter"].sudo().get_param("my_settings.nav_bar_color") if request else False' /> <t t-if='color'> <style>.o_main_navbar {background-color:<t t-esc='color'/>!important;border-bottom: 0px;}</style> </t> </xpath> </data> </template>
Edit... I cant get the code viewer to properly display but hopefully it would make sense if you paste it into an XML formatter
Confirmed the v16 section still works for v16.3 SaaS