diff --git a/report_py3o/NEWS b/report_py3o/NEWS
deleted file mode 100644
index f993a6ca..00000000
--- a/report_py3o/NEWS
+++ /dev/null
@@ -1,4 +0,0 @@
-report_py3o 1.3
-
-Production release
-
diff --git a/report_py3o/__openerp__.py b/report_py3o/__openerp__.py
index e4f1cd43..26378bb7 100644
--- a/report_py3o/__openerp__.py
+++ b/report_py3o/__openerp__.py
@@ -2,7 +2,7 @@
# Copyright 2013 XCG Consulting (http://odoo.consulting)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
- 'name': 'LibreOffice Report Engine',
+ 'name': 'Py3o Report Engine',
'summary': 'Reporting engine based on Libreoffice (ODT -> ODT, '
'ODT -> PDF, ODT -> DOC, ODT -> DOCX, ODS -> ODS, etc.)',
'version': '9.0.1.0.0',
@@ -10,10 +10,7 @@
'license': 'AGPL-3',
'author': 'XCG Consulting,Odoo Community Association (OCA)',
'website': 'http://odoo.consulting/',
- 'depends': [
- 'base',
- 'report',
- ],
+ 'depends': ['report'],
'external_dependencies': {
'python': ['py3o.template',
'py3o.formats']
diff --git a/report_py3o/models/ir_report.py b/report_py3o/models/ir_report.py
index 37d017ee..0c77f0d4 100644
--- a/report_py3o/models/ir_report.py
+++ b/report_py3o/models/ir_report.py
@@ -2,15 +2,22 @@
# Copyright 2013 XCG Consulting (http://odoo.consulting)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import os
-from py3o.formats import Formats
from openerp import api, fields, models, _
from openerp.report.interface import report_int
from openerp.exceptions import ValidationError
from openerp import addons
from ..py3o_parser import Py3oParser
+import logging
+logger = logging.getLogger(__name__)
-class ReportXml(models.Model):
+try:
+ from py3o.formats import Formats
+except ImportError:
+ logger.debug('Cannot import py3o.formats')
+
+
+class IrActionsReportXml(models.Model):
""" Inherit from ir.actions.report.xml to allow customizing the template
file. The user cam chose a template from a list.
The list is configurable in the configuration tab, see py3o_template.py
@@ -22,8 +29,8 @@ class ReportXml(models.Model):
@api.constrains("py3o_filetype", "report_type")
def _check_py3o_filetype(self):
if self.report_type == "py3o" and not self.py3o_filetype:
- raise ValidationError(
- "Field 'Output Format' is required for Py3O report")
+ raise ValidationError(_(
+ "Field 'Output Format' is required for Py3O report"))
@api.one
@api.constrains("py3o_is_local_fusion", "py3o_server_id",
@@ -32,9 +39,9 @@ class ReportXml(models.Model):
is_native = Formats().get_format(self.py3o_filetype)
if ((not is_native or not self.py3o_is_local_fusion) and
not self.py3o_server_id):
- raise ValidationError(
+ raise ValidationError(_(
"Can not use not native format in local fusion. "
- "Please specify a Fusion Server")
+ "Please specify a Fusion Server"))
@api.model
def _get_py3o_filetypes(self):
@@ -116,4 +123,4 @@ class ReportXml(models.Model):
if new_report:
return new_report
else:
- return super(ReportXml, self)._lookup_report(cr, name)
+ return super(IrActionsReportXml, self)._lookup_report(cr, name)
diff --git a/report_py3o/py3o_parser.py b/report_py3o/py3o_parser.py
index e32e1af4..853035ac 100644
--- a/report_py3o/py3o_parser.py
+++ b/report_py3o/py3o_parser.py
@@ -9,14 +9,23 @@ import sys
from base64 import b64decode
import requests
from tempfile import NamedTemporaryFile
-from py3o.template.helpers import Py3oConvertor
-from py3o.template import Template
-from py3o.formats import Formats
-
from openerp import _
from openerp import exceptions
from openerp.report.report_sxw import report_sxw
from openerp import registry
+import logging
+
+logger = logging.getLogger(__name__)
+
+try:
+ from py3o.template.helpers import Py3oConvertor
+ from py3o.template import Template
+except ImportError:
+ logger.debug('Cannot import py3o.template')
+try:
+ from py3o.formats import Formats
+except ImportError:
+ logger.debug('Cannot import py3o.formats')
_extender_functions = {}
diff --git a/report_py3o/views/ir_report.xml b/report_py3o/views/ir_report.xml
index 1d01ca95..bc77db6f 100644
--- a/report_py3o/views/ir_report.xml
+++ b/report_py3o/views/ir_report.xml
@@ -1,32 +1,31 @@
-
-
+
-
- py3o_report_view
- ir.actions.report.xml
-
-
+
+ py3o_report_view
+ ir.actions.report.xml
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
diff --git a/report_py3o/views/menu.xml b/report_py3o/views/menu.xml
index 38388f30..8960a20d 100644
--- a/report_py3o/views/menu.xml
+++ b/report_py3o/views/menu.xml
@@ -1,8 +1,8 @@
-
-
-
+
+
+
diff --git a/report_py3o/views/py3o_server.xml b/report_py3o/views/py3o_server.xml
index dd936d88..7712305d 100644
--- a/report_py3o/views/py3o_server.xml
+++ b/report_py3o/views/py3o_server.xml
@@ -1,38 +1,38 @@
-
-
- py3o.server.configuration.form.view
- py3o.server
-
-
-
-
-
- py3o.server.configuration.tree.view
- py3o.server
-
-
-
+
+ py3o.server.configuration.form.view
+ py3o.server
+
+
-
-
+
+
+
+
-
- Py3o Servers
- py3o.server
- tree,form
-
+
+ py3o.server.configuration.tree.view
+ py3o.server
+
+
+
+
+
+
+
+
+
+ Py3o Servers
+ py3o.server
+ tree,form
+
+
+
-
-
diff --git a/report_py3o/views/py3o_template.xml b/report_py3o/views/py3o_template.xml
index 93f459aa..320376f8 100644
--- a/report_py3o/views/py3o_template.xml
+++ b/report_py3o/views/py3o_template.xml
@@ -1,54 +1,54 @@
-
-
- py3o.template.configuration.search.view
- py3o.template
-
-
-
-
-
-
-
-
-
-
-
- py3o.template.configuration.form.view
- py3o.template
-
-
-
-
+
+ py3o.template.configuration.search.view
+ py3o.template
+
+
+
+
+
+
+
+
+
+
-
- py3o.template.configuration.tree.view
- py3o.template
-
-
+
+ py3o.template.configuration.form.view
+ py3o.template
+
+
-
-
+
+
+
+
+
+
+
+ py3o.template.configuration.tree.view
+ py3o.template
+
+
+
+
+
+
+
+
+
+ Py3o Templates
+ py3o.template
+ tree,form
+
-
- Py3o Templates
- py3o.template
- tree,form
-
+
-
-