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

I am trying to add pages to a notebook in the Python code.  What is the correct method to override that has access to the active record and the structure of the view ?


I can see the fields in 'default_get' but there is no access to the view and I can change the structure of the view in 'get_view' but there is no acccess to the active record.  I need a method that can change the view based on the information in the active record. Which  method has access to both ?



Notes

For those searching for information on

fields_view_get 


in v17, it's changed to 


@api.model
def get_view(self, view_id=None, view_type='form', **options):
result = super().get_view(view_id, view_type, **options)
​ return result


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
พ.ค. 24
3299
1
ก.พ. 24
1863
3
ม.ค. 20
3633
3
มี.ค. 16
4325
1
ก.ย. 24
1702