addons14/base_technical_features/tests/test_base_technical_features.py
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():
            xml = etree.fromstring(
                self.env["res.users"]
                .fields_view_get(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"
            )

        self.env.user.write({"technical_features": False})
        self.assertEqual(get_partner_field_invisible(), "1")
        self.env.user.write({"technical_features": True})
        self.assertEqual(get_partner_field_invisible(), None)
 A technical field is visible when its form is loaded by a user \
        with the technical features group 
A technical field is visible when its form is loaded by a user \
with the technical features group
A technical field is visible when its form is loaded by a user \ with the technical features group
def test02_visible_fields(self):
        def get_partner_field_invisible():
            xml = etree.fromstring(
                self.env["res.users"]
                .fields_view_get(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"
            )
        self.env.user.write({"technical_features": False})
        self.assertEqual(get_partner_field_invisible(), "1")
        self.env.user.write({"technical_features": True})
        self.assertEqual(get_partner_field_invisible(), None)
def test02_visible_fields ( self ) : def get_partner_field_invisible ( ) : xml = etree . fromstring ( self . env [ "res.users" ] . fields_view_get ( 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" ) self . env . user . write ( { "technical_features" : False } ) self . assertEqual ( get_partner_field_invisible ( ) , "1" ) self . env . user . write ( { "technical_features" : True } ) self . assertEqual ( get_partner_field_invisible ( ) , None )
A technical field is visible when its form is loaded by a user \
with the technical features group
A technical field is visible when its form is loaded by a user \ with the technical features group
""" A technical field is visible when its form is loaded by a user \
        with the technical features group """
self