跳至内容
菜单
此问题已终结
1 回复
1657 查看

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!

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
7月 21
2648
1
2月 20
3564
1
12月 16
17392
3
3月 25
2745
1
10月 24
1690