Merge PR #718 into 16.0

Signed-off-by legalsylvain
This commit is contained in:
OCA-git-bot
2023-10-10 14:26:01 +00:00
14 changed files with 122 additions and 234 deletions

View File

@@ -118,10 +118,10 @@ class SqlExport(models.Model):
else:
export.send_mail()
@api.constrains("field_ids", "mail_user_ids")
@api.constrains("query_properties_definition", "mail_user_ids")
def check_no_parameter_if_sent_by_mail(self):
for export in self:
if export.field_ids and export.mail_user_ids:
if export.query_properties_definition and export.mail_user_ids:
raise UserError(
_(
"It is not possible to execute and send a query "