Hi,
can anyone explain what exactly happens in fields_view_get method and also show me an example on how to use it in Odoo V12?
Thanks,
Sameer
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
can anyone explain what exactly happens in fields_view_get method and also show me an example on how to use it in Odoo V12?
Thanks,
Sameer
Hello
You Check Below Code
@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False,
submenu=False):
res = super(TestProject, self).fields_view_get(
view_id=view_id, view_type=view_type, toolbar=toolbar,
submenu=submenu)
project_login = self.env['project.project'].search([])
managers_list = self.env.ref('project.group_project_manager')
for record in project_login:
if (record.user_id.id == self.env.context.get('uid')) or (
self.env.context.get('uid') in managers_list.users.ids):
record.project_m_user = True
else:
record.project_m_user = False
return res
Thanks
Call to super method was missing in my code. Thanks for the answer Manish
Welcome Sameer
hiii
how can we remove the loading issue this search is work in every search ,kanban,form,tree view so how can we remove that loading issue
You can pass particular view neethu
Hiii
i want to implement a record rule with hierarchy level so i write a compute function so i want all view but it takes time is there any method other than field view get when we click the sale we get the records
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
May 23
|
3657 | ||
|
3
Oct 22
|
7965 | ||
|
0
Jul 22
|
4706 | ||
|
0
Jul 21
|
5957 | ||
|
3
Aug 19
|
5200 |