Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4990 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
พ.ย. 23
3229
7
เม.ย. 21
20654
change search filter แก้ไขแล้ว
2
พ.ย. 16
4318
1
มี.ค. 15
13769
Search with functional fields แก้ไขแล้ว
4
มี.ค. 15
21213