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

I was updating my addons from ODOO15 to ODOO16, It shows 

AttributeError: type object 'XXXX' has no attribute 'fields_view_get'


I search on github and find "Method `fields_view_get` is deprecated, use `get_view` instead',

But get_view also give error

AttributeError: type object 'XXXX' has no attribute 'get_view'

how to use fields_view_get in ODOO16?
Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

fields_view_get renamed to get_view in Odoo 16. you can check this commit.

You need to rewrite your code and use get_view rather than fields_view_get.  In the changed files, you can see an example of crm_lead model which replaces fields_view_get with get_view

Imagine profil
Abandonează