Browse Source

Merge pull request #11 from acsone/9.0-import_report_py3o

[FIX] Check constrains only if report_type == 'py3o'
pull/80/head
Florent Aide 8 years ago
committed by GitHub
parent
commit
80def28238
  1. 2
      report_py3o/models/ir_actions_report_xml.py

2
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", @api.constrains("py3o_is_local_fusion", "py3o_server_id",
"py3o_filetype") "py3o_filetype")
def _check_py3o_server_id(self): def _check_py3o_server_id(self):
if self.report_type != "py3o":
return
is_native = Formats().get_format(self.py3o_filetype).native is_native = Formats().get_format(self.py3o_filetype).native
if ((not is_native or not self.py3o_is_local_fusion) and if ((not is_native or not self.py3o_is_local_fusion) and
not self.py3o_server_id): not self.py3o_server_id):

Loading…
Cancel
Save