|
@ -1,6 +1,6 @@ |
|
|
# Copyright 2016 Therp BV <https://therp.nl> |
|
|
# Copyright 2016 Therp BV <https://therp.nl> |
|
|
# Copyright 2018 Tecnativa - Sergio Teruel |
|
|
# Copyright 2018 Tecnativa - Sergio Teruel |
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). |
|
|
|
|
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). |
|
|
from lxml import etree |
|
|
from lxml import etree |
|
|
from odoo import api, models, tools |
|
|
from odoo import api, models, tools |
|
|
from odoo.tools.safe_eval import safe_eval |
|
|
from odoo.tools.safe_eval import safe_eval |
|
@ -115,19 +115,6 @@ class IrUiView(models.Model): |
|
|
node.attrib[attribute_node.get('name')] = str(python_dict) |
|
|
node.attrib[attribute_node.get('name')] = str(python_dict) |
|
|
return source |
|
|
return source |
|
|
|
|
|
|
|
|
@api.model |
|
|
|
|
|
def inheritance_handler_xpath(self, source, specs, inherit_id): |
|
|
|
|
|
if not specs.get('position') == 'move': |
|
|
|
|
|
return super(IrUiView, self).apply_inheritance_specs( |
|
|
|
|
|
source, specs, inherit_id |
|
|
|
|
|
) |
|
|
|
|
|
node = self.locate_node(source, specs) |
|
|
|
|
|
target_node = self.locate_node( |
|
|
|
|
|
source, etree.Element(specs.tag, expr=specs.get('target')) |
|
|
|
|
|
) |
|
|
|
|
|
target_node.append(node) |
|
|
|
|
|
return source |
|
|
|
|
|
|
|
|
|
|
|
@api.model |
|
|
@api.model |
|
|
def inheritance_handler_attributes_list_add( |
|
|
def inheritance_handler_attributes_list_add( |
|
|
self, source, specs, inherit_id |
|
|
self, source, specs, inherit_id |
|
|