Merge pull request #11 from acsone/9.0-import_report_py3o

[FIX] Check constrains only if report_type == 'py3o'
This commit is contained in:
Florent Aide
2016-10-13 10:50:03 +02:00
committed by GitHub

View File

@@ -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):