I need change tree view column name with something calculated from the record value. Anybody knows how I can do that?
When I follow the link http://elico-corp.com.sg/2015/10/01/how-to-tech-dynamically-modify-your-view/, I found in the old version odoo can pass context parameter in the fields_view_get function. However in Odoo 13, the context parameter is the function is removed. Does anyone know why?
@api.model
def fields_view_get(self, view_id=None, view_type=’tree’, context=None, toolbar=False,submenu=False):
However in Odoo 13, the context parameter is the function is removed. Does anyone know why?
Any help would be appreciated!
context is now available as self._context or self.env.context. It is not removed, but it is moved to environment. You can pass context as self.with_context(my_special=True). Have a look at - https://www.odoo.com/documentation/13.0/reference/orm.html#altering-the-environment