Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2857 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
3205
0
thg 10 25
2