跳至內容
選單
此問題已被標幟
1 回覆
3622 瀏覽次數

Hello, I have 2 Models, ModelA and ModelB. They have both a many2many relation on each other. This was to get the tag list working (it was either showing a random one default or not saving), however, it is really only a one2many.

I am looking to figure out how you can restrict ModelB from being connected to more than one ModelA via the domain named argument.


Thanks :)

頭像
捨棄

Domain on many2many field: http://bit.ly/2DarOfB

最佳答案

Return a domain via onchange function for the related field. The return domain should be like [('id', 'not in', [ids])], here ids should be the current data included in related fields.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
11月 22
80
1
6月 22
7306
2
10月 21
5120
1
7月 21
2863
1
7月 21
4334