here are my Models, I have created a field parent_type in donation.categories which select multiple values (Many2many) from donation.types,
now in model mytests i want:
after user select from Many2one field donation.category
the field category_type should be filled with related records from field parent_type which is Many2many in donation.categories model,
please help.
class DonationTypes(models.Model):
_name = 'donation.types'
_description = 'Donation Types'
name = fields.Char(string='Donation Type')
colors = fields.Integer(string="Color")
class DonationCategories(models.Model):
_name = 'donation.categories'
_description = 'Donation Categories'
name = fields.Char(string='Donation Category')
parent_type = fields.Many2many('donation.types', string='Types')
class Tests(models.Model):
_name = 'mytests'
_description = 'Tests For'
name = fields.Char(string='My Test')
donation_category = fields.Many2one('donation.categories')
category_type = fields.Many2one( ) -- here i need help
regards