تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5029 أدوات العرض

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
نوفمبر 23
3292
7
أبريل 21
20737
2
نوفمبر 16
4369
1
مارس 15
13795
4
مارس 15
21239