i wanted to append data to the one2many field but this implementation i am using only replaces the value and it is not what i needed
_property = self.env['estate.property'].browse(vals['property_id'])
_users = self.env['res.users'].search([('partner_id', '=', vals['partner_id'])])
for user in _users:
user.write({ 'property_ids': _property })
additional input:
i have tried this code as i have seen in the forum
user.write({ 'property_ids':[(0,0,_property)] })
but it causes an error
ValueError: dictionary update sequence element #0 has length 1; 2 is required
thank you for the help! i'm still new