跳至內容
選單
此問題已被標幟
1 回覆
1987 瀏覽次數

In Odoo v14, in a setup with multiple companies to facilitate an easy identification which company we are working on is there a way to visually identify and differentiate (e.g. different colors, themes,...) the company we are operating with?

頭像
捨棄
最佳答案

Hi

You can use the following code for that

<data inherit_id="web.layout">
  <xpath expr="//body" position="inside">
<t t-if="request.httprequest.cookies.get('cids') and request.httprequest.cookies.get('cids')[0] == '1'">
      <style>.o_main_navbar {background: linear-gradient(45deg, #57596F, #57596F);
background-color: #57596F!important;border-bottom: 0px;}</style></t>
<t t-if="request.httprequest.cookies.get('cids') and request.httprequest.cookies.get('cids')[0] == '2'">
      <style>.o_main_navbar {background: linear-gradient(45deg, #6B3C3C, #6B3C3C);
background-color: #6B3C3C!important;border-bottom: 0px;}</style></t>
   </xpath>
</data>


OR 
Please refer to the OCA Module below
https://odoo-community.org/shop/web-company-color-4791#attr=18022

Hope it helps


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 25
2148