跳至內容
選單
此問題已被標幟
3233 瀏覽次數

class Model1(models.Model):
_name = "module.model1"

m1_field1 = fields.One2many(
'module.model2',
'm2_field3',
)



class Model2(models.Model):
_name = "module.model2"

m2_field1 = fields.Char(
'Field Name',
required=True,
)

m2_field2 = fields.Char(
'Field Value',
required=True,
)

m2_field3 = fields.Many2one(
"module.model1",
required=True,
index=True,
)



problem statement: filter records of Model1 where m2_field2 = for m2_field1 in tree/kanban view of Model1.

in other words, the requirement is to show values of m2_field1 in tree view and take user input for respective m2_field2 values and filter accordingly dynamically.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 23
2849
0
12月 22
3426
0
6月 20
5839
1
11月 19
3052
0
12月 18
93