Browse Source

Improve filetype selection name

pull/258/head
Laurent Mignon 8 years ago
committed by Laurent Mignon (ACSONE)
parent
commit
8360106cfe
  1. 14
      report_py3o/models/ir_report.py

14
report_py3o/models/ir_report.py

@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import os import os
from py3o.formats import Formats from py3o.formats import Formats
from openerp import api, fields, models
from openerp import api, fields, models, _
from openerp.report.interface import report_int from openerp.report.interface import report_int
from openerp.exceptions import ValidationError from openerp.exceptions import ValidationError
from openerp import addons from openerp import addons
@ -42,7 +42,10 @@ class ReportXml(models.Model):
names = formats.get_known_format_names() names = formats.get_known_format_names()
selections = [] selections = []
for name in names: for name in names:
selections.append((name, name))
description = name
if formats.get_format(name).native:
description = description + " " + _("(Native)")
selections.append((name, description))
return selections return selections
py3o_fusion_filetype = fields.Selection( py3o_fusion_filetype = fields.Selection(
@ -53,9 +56,10 @@ class ReportXml(models.Model):
"Template") "Template")
py3o_is_local_fusion = fields.Boolean( py3o_is_local_fusion = fields.Boolean(
"Local fusion", "Local fusion",
help="Odt to Odt will be processed without sever. You must use this "
"mode if you call methods on your model into the template.",
default=False)
help="Native formats will be processed without a server. "
"You must use this mode if you call methods on your model into "
"the template.",
default=True)
py3o_server_id = fields.Many2one( py3o_server_id = fields.Many2one(
"py3o.server" "py3o.server"
"Fusion server") "Fusion server")

Loading…
Cancel
Save