Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4768 มุมมอง

Question about dynamic views.

Inside a form view I have a tree view of a one2many field. In this tree view I'd like to hide/show the entire column (not just individual cells) depending on the contents of the parent form view.

AFAIK, the only way to hide the entire column is to use context:

<field name='my_column' invisible="not context.get('showMyColumn',False)">

My question is: How to pass context from server (back-end) to form (front-end)?

I know how to do the opposite (pass context from form to server). And I know how to pass context from button's action function to form:

return {'type': 'ir.actions.act_window', ..., 'context': ctx_updated}

But how to update form's context from the write() method of the form view's object or from it's on_change method of the object's field my column listens to?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 16
4812
3
เม.ย. 25
4466
5
พ.ย. 23
42818
Create dynamic tree view แก้ไขแล้ว
3
ก.ย. 23
9382
0
ธ.ค. 22
1978