Browse Source

[FIX] base_view_inheritance_extension: 2 things:

*  warning about dynamic context
* import for safe_eval
pull/1529/head
Holger Brunn 7 years ago
committed by Raphaël Valyi
parent
commit
feb51680cf
  1. 23
      base_view_inheritance_extension/i18n/de.po
  2. 34
      base_view_inheritance_extension/i18n/es.po
  3. 34
      base_view_inheritance_extension/i18n/hr.po
  4. 24
      base_view_inheritance_extension/i18n/it.po
  5. 6
      base_view_inheritance_extension/models/ir_ui_view.py

23
base_view_inheritance_extension/i18n/de.po

@ -3,15 +3,14 @@
# * base_view_inheritance_extension
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Rudolf Schnapka <rs@techno-flex.de>, 2017
# Niki Waibel <niki.waibel@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-19 17:59+0000\n"
"PO-Revision-Date: 2017-04-19 17:59+0000\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>, 2017\n"
"POT-Creation-Date: 2017-12-01 02:10+0000\n"
"PO-Revision-Date: 2017-12-01 02:10+0000\n"
"Last-Translator: Niki Waibel <niki.waibel@gmail.com>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,14 +19,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_form
msgid "A new page"
msgstr "Eine neue Seite"
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Partner form"
msgstr ""
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_form
msgid "Partner form"
msgstr "Partner-Formular"
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Phone numbers"
msgstr ""
#. module: base_view_inheritance_extension
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view

34
base_view_inheritance_extension/i18n/es.po

@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_view_inheritance_extension
#
# Translators:
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 02:10+0000\n"
"PO-Revision-Date: 2017-12-01 02:10+0000\n"
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Partner form"
msgstr ""
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Phone numbers"
msgstr ""
#. module: base_view_inheritance_extension
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view
msgid "ir.ui.view"
msgstr "ir.ui.view"

34
base_view_inheritance_extension/i18n/hr.po

@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_view_inheritance_extension
#
# Translators:
# Bole <bole@dajmi5.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-02 18:40+0000\n"
"PO-Revision-Date: 2018-03-02 18:40+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2018\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hr\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Partner form"
msgstr "Forma partnera"
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Phone numbers"
msgstr "Brojevi telefona"
#. module: base_view_inheritance_extension
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view
msgid "ir.ui.view"
msgstr "ir.ui.view"

24
base_view_inheritance_extension/i18n/it.po

@ -3,14 +3,14 @@
# * base_view_inheritance_extension
#
# Translators:
# Paolo Valier <paolo.valier@hotmail.it>, 2017
# Paolo Valier <paolo.valier@hotmail.it>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-19 17:59+0000\n"
"PO-Revision-Date: 2017-04-19 17:59+0000\n"
"Last-Translator: Paolo Valier <paolo.valier@hotmail.it>, 2017\n"
"POT-Creation-Date: 2018-01-06 02:25+0000\n"
"PO-Revision-Date: 2018-01-06 02:25+0000\n"
"Last-Translator: Paolo Valier <paolo.valier@hotmail.it>, 2018\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -19,16 +19,16 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_form
msgid "A new page"
msgstr "Una nuova pagina"
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Partner form"
msgstr "Form Partner"
#. module: base_view_inheritance_extension
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_form
msgid "Partner form"
msgstr ""
#: model:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form
msgid "Phone numbers"
msgstr "Numeri di telefono"
#. module: base_view_inheritance_extension
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view
msgid "ir.ui.view"
msgstr ""
msgstr "ir.ui.view"

6
base_view_inheritance_extension/models/ir_ui_view.py

@ -3,6 +3,7 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from lxml import etree
from odoo import api, models, tools
from odoo.tools.safe_eval import safe_eval
class UnquoteObject(str):
@ -103,9 +104,10 @@ class IrUiView(models.Model):
</$node>"""
node = self.locate_node(source, specs)
for attribute_node in specs:
python_dict = tools.safe_eval(
python_dict = safe_eval(
node.get(attribute_node.get('name')) or '{}',
UnquoteEvalObjectContext()
UnquoteEvalObjectContext(),
nocopy=True
)
python_dict[attribute_node.get('key')] = UnquoteObject(
attribute_node.text

Loading…
Cancel
Save