From 66e4d8dee34a444ceded52b3486083370ff02ef7 Mon Sep 17 00:00:00 2001 From: Arnaud Pineux Date: Tue, 4 Oct 2022 14:48:39 +0200 Subject: [PATCH] [MIG] base_technical_features: Migration to 16.0 --- base_technical_features/README.rst | 14 +++++++------- .../tests/test_base_technical_features.py | 14 +++++--------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/base_technical_features/README.rst b/base_technical_features/README.rst index e054c7dee6..65c9353558 100644 --- a/base_technical_features/README.rst +++ b/base_technical_features/README.rst @@ -14,16 +14,16 @@ Technical features group :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github - :target: https://github.com/OCA/server-ux/tree/15.0/base_technical_features + :target: https://github.com/OCA/server-ux/tree/16.0/base_technical_features :alt: OCA/server-ux .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-ux-15-0/server-ux-15-0-base_technical_features + :target: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_technical_features :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/250/15.0 + :target: https://runbot.odoo-community.org/runbot/250/16.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| ========================================================== Access to technical features without activating debug mode @@ -50,7 +50,7 @@ Additionally, users can check the *Technical feature* field in their preferences to gain permanent access to the menus and views that fall under this category. -.. figure:: https://raw.githubusercontent.com/OCA/server-ux/15.0/base_technical_features/static/description/user_preferences.png +.. figure:: https://raw.githubusercontent.com/OCA/server-ux/16.0/base_technical_features/static/description/user_preferences.png :alt: User preferences Upon installation of this module, this preference is already @@ -66,7 +66,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -98,6 +98,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-ux `_ project on GitHub. +This module is part of the `OCA/server-ux `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_technical_features/tests/test_base_technical_features.py b/base_technical_features/tests/test_base_technical_features.py index d23983f70c..cba126066e 100644 --- a/base_technical_features/tests/test_base_technical_features.py +++ b/base_technical_features/tests/test_base_technical_features.py @@ -23,22 +23,18 @@ def test02_visible_fields(self): """ A technical field is visible when its form is loaded by a user \ with the technical features group """ - def get_partner_field_invisible(): + def get_partner_field(): xml = etree.fromstring( self.env["res.users"] - .fields_view_get(view_id=self.env.ref("base.view_users_form").id)[ - "arch" - ] + .get_view(view_id=self.env.ref("base.view_users_form").id)["arch"] .encode("utf-8") ) - return xml.xpath('//div/group/field[@name="partner_id"]')[0].get( - "invisible" - ) + return xml.xpath('//div/group/field[@name="partner_id"]') self.env.user.write({"technical_features": False}) - self.assertEqual(get_partner_field_invisible(), "1") + self.assertEqual(len(get_partner_field()), 0) self.env.user.write({"technical_features": True}) - self.assertEqual(get_partner_field_invisible(), None) + self.assertEqual(len(get_partner_field()), 1) def test03_user_access(self): """ Setting the user pref raises an access error if the user is not \