Merge PR #770 into 16.0

Signed-off-by legalsylvain
This commit is contained in:
OCA-git-bot
2023-06-15 15:26:29 +00:00

View File

@@ -263,7 +263,8 @@ class BiSQLView(models.Model):
"If you want to delete them, first set them to draft."
)
)
self.cron_id.unlink()
if self.cron_id:
self.cron_id.unlink()
return super().unlink()
def copy(self, default=None):