تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1064 أدوات العرض
_inherit = "product.template"
_description = "Product"

branch_ids = fields.Many2many('res.branch', string='Branch', help="Branch associated with this product template")

@api.onchange('categ_id')
def _onchange_categ_id(self):
"""Sets branch_ids based on the selected category's branch_ids"""
if self.categ_id:
self.branch_ids = self.categ_id.branch_ids
else:
self.branch_ids = [(5, 0, 0)] # Clears the branch_ids field

i want to passed the value but dont want auto fetch the data user will select it on their choice based on associted with category in form of dropdown how i will do that 

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
نوفمبر 24
1018
0
نوفمبر 24
15
10
يونيو 16
33070
1
أكتوبر 15
9271
4
أغسطس 15
3617