[FIX] mail: fix record deletion crash

Before this commit, calling `record.delete` twice would
result in a crash. This is due to `this.Model`being cleared
once the delete is done. This commit skips the deletion if
it was already done: calling delete will result in the desired
state anyway.

This can be easily reproduced:
- Throttle your network
- Send a message on the discuss app
- A crash occurs

closes odoo/odoo#134254

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
tsm-odoo
2023-09-06 05:53:41 +00:00
parent a8a752a14e
commit f5c12800c9

Diff Content Not Available