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

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
أبريل 25
1208