Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4665 Tampilan

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.

Avatar
Buang
Penulis Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Nov 23
2876
7
Apr 21
20160
2
Nov 16
4064
1
Mar 15
13506
4
Mar 15
20933