diff --git a/base_view_inheritance_extension/__init__.py b/base_view_inheritance_extension/__init__.py index 92325983c..0650744f6 100644 --- a/base_view_inheritance_extension/__init__.py +++ b/base_view_inheritance_extension/__init__.py @@ -1,2 +1 @@ -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import models diff --git a/base_view_inheritance_extension/__manifest__.py b/base_view_inheritance_extension/__manifest__.py index baa593cd7..e178e5725 100644 --- a/base_view_inheritance_extension/__manifest__.py +++ b/base_view_inheritance_extension/__manifest__.py @@ -1,6 +1,6 @@ # Copyright 2016 Therp BV # 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). { "name": "Extended view inheritance", "version": "12.0.1.0.0", diff --git a/base_view_inheritance_extension/demo/ir_ui_view.xml b/base_view_inheritance_extension/demo/ir_ui_view.xml index 043960209..fb357c955 100644 --- a/base_view_inheritance_extension/demo/ir_ui_view.xml +++ b/base_view_inheritance_extension/demo/ir_ui_view.xml @@ -20,8 +20,6 @@ - - diff --git a/base_view_inheritance_extension/models/__init__.py b/base_view_inheritance_extension/models/__init__.py index 352589cd2..81f52e3bf 100644 --- a/base_view_inheritance_extension/models/__init__.py +++ b/base_view_inheritance_extension/models/__init__.py @@ -1,2 +1 @@ -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import ir_ui_view diff --git a/base_view_inheritance_extension/models/ir_ui_view.py b/base_view_inheritance_extension/models/ir_ui_view.py index c95631625..d7386d706 100644 --- a/base_view_inheritance_extension/models/ir_ui_view.py +++ b/base_view_inheritance_extension/models/ir_ui_view.py @@ -1,6 +1,6 @@ # Copyright 2016 Therp BV # 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 odoo import api, models, tools 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) 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 def inheritance_handler_attributes_list_add( self, source, specs, inherit_id diff --git a/base_view_inheritance_extension/readme/USAGE.rst b/base_view_inheritance_extension/readme/USAGE.rst index 65199fd1e..2af06adaa 100644 --- a/base_view_inheritance_extension/readme/USAGE.rst +++ b/base_view_inheritance_extension/readme/USAGE.rst @@ -10,15 +10,6 @@ Note that views are subject to evaluation of xmlids anyways, so if you need to refer to some xmlid, say ``%(xmlid)s``. -**Move an element in the view** - -.. code-block:: xml - - - -This can also be used to wrap some element into another, create the target -element first, then move the node youwant to wrap there. - **Add to values in a list (states for example)** .. code-block:: xml @@ -34,3 +25,9 @@ element first, then move the node youwant to wrap there. $remove_value(s) + +**Move an element in the view** + +This feature is now native, cf the `official Odoo documentation `_. + + diff --git a/base_view_inheritance_extension/tests/__init__.py b/base_view_inheritance_extension/tests/__init__.py index e19c813a8..261fddfad 100644 --- a/base_view_inheritance_extension/tests/__init__.py +++ b/base_view_inheritance_extension/tests/__init__.py @@ -1,2 +1 @@ -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import test_base_view_inheritance_extension diff --git a/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py b/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py index 212a20b5e..ae30978ad 100644 --- a/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py +++ b/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py @@ -1,5 +1,5 @@ # Copyright 2016 Therp BV -# 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 odoo.tests.common import TransactionCase @@ -23,11 +23,6 @@ class TestBaseViewInheritanceExtension(TransactionCase): "context.get('company_id', context.get('company'))" in view.xpath('//field[@name="parent_id"]')[0].get('context') ) - # verify we moved the child_ids field - self.assertEqual( - view.xpath('//field[@name="mobile"]')[0].getparent(), - view.xpath('//page[@name="phone_book"]')[0] - ) def test_list_add(self): view_model = self.env['ir.ui.view']