[IMP] mrp: remove linked attachement on removing mrp document
Steps to Reproduce Bug: - Add Attachment on Bom Line - Delete Attachment Bug: - Attachment is still present on `ir.attachment` With this commit, we are removing linked attachment on deleting `mrp.document` closes odoo/odoo#74595 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
@@ -22,3 +22,7 @@ class MrpDocument(models.Model):
|
||||
('1', 'Low'),
|
||||
('2', 'High'),
|
||||
('3', 'Very High')], string="Priority", help='Gives the sequence order when displaying a list of MRP documents.')
|
||||
|
||||
def unlink(self):
|
||||
self.mapped('ir_attachment_id').unlink()
|
||||
return super(MrpDocument, self).unlink()
|
||||
|
||||
Reference in New Issue
Block a user