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

I am trying to hide two fields based on a condition, the code nearly does it because it hides correctly the values of the fields but the label or header is still there. Is it possible to hide those fields completely?:



id="invoice_form_custom" model="ir.ui.view">
name="model">account.move
name="inherit_id" ref="account.view_move_form"/>
name="arch" type="xml">
expr="//field[@name='product_id']" position="after">

name="clasification" invisible="1"/>

name="verified"
attrs="{'invisible':[('classification', '!=', 'TEKNIA')]}"/>

name="repaired"
attrs="{'invisible':[('classification', '!=', 'ARTESTATIVES')]}"/>



expr="//field[@name='line_ids']/tree/field[@name='account_id']" position="after">
name="verified" invisible="1"/>
name="repaired" invisible="1"/>





Thank you for your attention



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

Hello,
Since the list view displays several records, you can only conceal the value of a field there. because records will exist with the attrs conditions that are both true and false.

Tác giả Câu trả lời hay nhất

So it can't be done, thank you so much for your response! 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 24
1376
2
thg 7 23
2851
1
thg 5 23
2204
2
thg 7 22
4700
3
thg 12 21
4506