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

Hello,

I have a model like this: (i just simplified)

class Products(models.Model):
    _name = 'products'
    category = fields.Many2one('category')
)

category model is:

class Category(models.Model):
    _name = 'category'
    category_type_id = fields.Many2one('category_type')
)

What i want is:

Need to add "category_type_id" item on Product model view -> search -> filter list. In other word need to filter Product items by category_type_id with given value.

How can i do this? please help, thanks.

形象
丢弃
编写者 最佳答案

Solved with adding a field on Products model that is related to Category.category_type_id

形象
丢弃
相关帖文 回复 查看 活动
2
11月 23
3067
7
4月 21
20410
2
11月 16
4181
1
3月 15
13638
4
3月 15
21116