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

hello ...

I want to hide element from odoo template  How do this 

odoo 15


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

Hi,

You can use the <t-if> to hide elements from the template

example:

<t t-if="myTimeSheet">
          <div class="timesheet_mainHead" >

                Hi Demo Div
         </div>
 </t>


In the above example whenever the "if" condition satisfies then only the <div> will be visible

Hope it helps

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

use t-if condition condition based on your requirement to hide template elements.

Ảnh đại diện
Huỷ bỏ