mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[15.0][MIG] sql_export_mail: Migration to 15.0
This commit is contained in:
@@ -118,10 +118,10 @@ class SqlExport(models.Model):
|
||||
else:
|
||||
export.send_mail()
|
||||
|
||||
@api.constrains("query_properties_definition", "mail_user_ids")
|
||||
@api.constrains("field_ids", "mail_user_ids")
|
||||
def check_no_parameter_if_sent_by_mail(self):
|
||||
for export in self:
|
||||
if export.query_properties_definition and export.mail_user_ids:
|
||||
if export.field_ids and export.mail_user_ids:
|
||||
raise UserError(
|
||||
_(
|
||||
"It is not possible to execute and send a query "
|
||||
|
||||
Reference in New Issue
Block a user