Skip to Content
Menu
This question has been flagged
1 Reply
8042 Views

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?
Avatar
Discard
Best Answer

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

Avatar
Discard