i need to filter my view using domain the filter must use parameters for the connected user
my code : [('exercice_id','=', uid.exercice_id.id)]
on user class i have field named exercice_id
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i need to filter my view using domain the filter must use parameters for the connected user
my code : [('exercice_id','=', uid.exercice_id.id)]
on user class i have field named exercice_id
For version 14, it is:
domain="[('user_id', '=', uid)]"
You can search the View XML for your version, find the V14 XML definition of the CRM "My Leads" filter at https://github.com/odoo/odoo/blob/14.0/addons/crm/views/crm_lead_views.xml#L577
You can get the current user in xml by using user.id so try to use user.exercice_id.id
Thanks CorText IT Solutuon for your response,
i got this error
Error: NameError: name 'user' is not defined
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit seRelated Posts | Odpovědi | Zobrazení | Aktivita | |
---|---|---|---|---|
|
2
dub 24
|
4117 | ||
|
6
srp 20
|
9081 | ||
|
0
dub 15
|
7887 | ||
naked domain set up
Vyřešeno
|
|
3
čvc 25
|
4109 | |
|
0
kvě 25
|
800 |