Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2684 Näkymät

Hello,


How can I implement a rule for a user id to see only the records that he is assigned to but also the records that are in new state but not assigned to anyone.


My code so far will :



Own complaints

['|', ('state', 'in', ['new']), ('technician', '=', user.id)]

Odoo 13 CE.


Thank you !

Avatar
Hylkää
Paras vastaus

Try this

['|', '&', ('state', 'in', ['new']), ('technician', '=', False), ('technician', '=', user.id)]
Avatar
Hylkää
Tekijä

I tried you way before but the conditions were not in the correct order and did not work.

Now it works like a charm. Thank you !

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
5
syysk. 20
12886
2
maalisk. 15
7623
0
maalisk. 15
4051
1
maalisk. 15
5373
0
maalisk. 15
4271