[IMP] mail: Allow user deletion if linked to mail.activity
Purpose ======= Currently the on_delete='restrict' implicit constraint prevents the user deletion in case it's linked to a mail.activity record. Set the on_delete attribute to 'cascade' as the record is not of any usage without the user anyway. Taskid: 3222941 Part-of: odoo/odoo#114656
This commit is contained in:
@@ -82,7 +82,7 @@ class MailActivity(models.Model):
|
||||
user_id = fields.Many2one(
|
||||
'res.users', 'Assigned to',
|
||||
default=lambda self: self.env.user,
|
||||
index=True, required=True)
|
||||
index=True, required=True, ondelete='cascade')
|
||||
request_partner_id = fields.Many2one('res.partner', string='Requesting Partner')
|
||||
state = fields.Selection([
|
||||
('overdue', 'Overdue'),
|
||||
|
||||
Reference in New Issue
Block a user