Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1868 Vizualizări

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


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
3
mai 24
3319
1
feb. 24
1891
3
ian. 20
3649
3
mar. 16
4350
1
sept. 24
1715