|
@ -14,10 +14,10 @@ _logger = logging.getLogger(__name__) |
|
|
class IrCron(models.Model): |
|
|
class IrCron(models.Model): |
|
|
_inherit = "ir.cron" |
|
|
_inherit = "ir.cron" |
|
|
|
|
|
|
|
|
@api.one |
|
|
|
|
|
@api.constrains('mutually_exclusive_cron_ids') |
|
|
@api.constrains('mutually_exclusive_cron_ids') |
|
|
def _check_auto_exclusion(self): |
|
|
def _check_auto_exclusion(self): |
|
|
if self in self.mutually_exclusive_cron_ids: |
|
|
|
|
|
|
|
|
for item in self: |
|
|
|
|
|
if item in item.mutually_exclusive_cron_ids: |
|
|
raise ValidationError(_( |
|
|
raise ValidationError(_( |
|
|
"You can not mutually exclude a scheduled actions with " |
|
|
"You can not mutually exclude a scheduled actions with " |
|
|
"itself.")) |
|
|
"itself.")) |
|
|