Browse Source

[FIX] import for safe_eval

pull/964/merge
Holger Brunn 7 years ago
committed by Pedro M. Baeza
parent
commit
2e07f3d74c
  1. 3
      base_view_inheritance_extension/models/ir_ui_view.py

3
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,7 +104,7 @@ 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(),
nocopy=True

Loading…
Cancel
Save