When i run my code i got the error 'AttributeError: 'list' object has no attribute 'get''
@api.onchange('custom_product_category_ids')
def _get_selection(self):
values = []
prod_categ_ids = self.env['custom.product.category'].search([['id','=', self.custom_product_category_ids.id],])
print(prod_categ_ids)
for product_categ in prod_categ_ids:
print(product_categ.id)
print('pass')
product_obj = self.env['custom.product.category'].browse(product_categ.id)
values.append([str(product_obj.id), str(product_obj.categ_name)])
print(values)
return values
What is the problem ?