From 506ec71703ee0992a15c228a61db5af98795a7f1 Mon Sep 17 00:00:00 2001 From: "Laurent Mignon (ACSONE)" Date: Wed, 12 Oct 2016 16:24:27 +0200 Subject: [PATCH] [FIX] Check constrains only if report_type == 'py3o' --- report_py3o/models/ir_actions_report_xml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/report_py3o/models/ir_actions_report_xml.py b/report_py3o/models/ir_actions_report_xml.py index bf262914..bce6593d 100644 --- a/report_py3o/models/ir_actions_report_xml.py +++ b/report_py3o/models/ir_actions_report_xml.py @@ -36,6 +36,8 @@ class IrActionsReportXml(models.Model): @api.constrains("py3o_is_local_fusion", "py3o_server_id", "py3o_filetype") def _check_py3o_server_id(self): + if self.report_type != "py3o": + return is_native = Formats().get_format(self.py3o_filetype).native if ((not is_native or not self.py3o_is_local_fusion) and not self.py3o_server_id):