Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4930 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 11 23
3181
7
thg 4 21
20560
2
thg 11 16
4277
1
thg 3 15
13723
4
thg 3 15
21172