IMP benefit
This commit is contained in:
parent
28a306c0e9
commit
1dc9764bb4
|
|
@ -293,14 +293,6 @@ class FamilyMemberProfile(models.Model):
|
|||
for order in self:
|
||||
if order.state not in ['draft']:
|
||||
raise UserError(_('You cannot delete this record'))
|
||||
# if order.attachment_ids:
|
||||
# order.attachment_ids.unlink()
|
||||
# if order.hobbies_attachment_ids:
|
||||
# order.hobbies_attachment_ids.unlink()
|
||||
# if order.diseases_attachment_ids:
|
||||
# order.diseases_attachment_ids.unlink()
|
||||
# if order.disabilities_attachment_ids:
|
||||
# order.disabilities_attachment_ids.unlink()
|
||||
self.env['ir.attachment'].search([('member_id', 'in', order.id)]).unlink()
|
||||
if order.hobbies_ids:
|
||||
order.hobbies_ids.unlink()
|
||||
|
|
|
|||
Loading…
Reference in New Issue