Skip to Content
Menú
This question has been flagged
1 Respondre
1615 Vistes

Hi. I created a model called PC that has a Many2One field called  x_studio_pc_owner which lets you define who owns the PC. My customer model has a custom One2Many relationship which shows which PCs it owns.

In my invoice, I want to choose a PC, only if my customer owns it.


I tried setting up a domain rule in the Invoice Many2One field but it does not work.

I tried this: [('x_studio_pc_owner','=','parent.partner_id')] to see if it would filter my results but it returns nothing.


Please help!

Avatar
Descartar
Best Answer

Hi,

You need to mention the id of partner in your domain, instead of that you mentioned your record, do as like this

[('x_studio_pc_owner','=','parent.partner_id.id')] 

Regards

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de jul. 21
2614
1
de febr. 20
3516
1
de des. 16
17330
3
de març 25
2641
1
d’oct. 24
1568