mirror of
https://github.com/bringout/oca-ocb-accounting.git
synced 2026-04-23 13:22:06 +02:00
13 lines
369 B
Python
13 lines
369 B
Python
from odoo import api, models
|
|
|
|
|
|
class AccountMove(models.Model):
|
|
_inherit = "account.move"
|
|
|
|
@api.ondelete(at_uninstall=False)
|
|
def unlink_snailmail_letters(self):
|
|
snailmail_letters = self.env['snailmail.letter'].search([
|
|
('model', '=', 'account.move'),
|
|
('res_id', 'in', self.ids),
|
|
])
|
|
snailmail_letters.unlink()
|