[MIG] auth_admin: Migrate to 18.0

H14631
This commit is contained in:
Mayank Patel
2024-10-24 10:18:42 +00:00
parent 1429f38df6
commit 56cb3a99a2
4 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
'name': 'Auth Admin', 'name': 'Auth Admin',
'author': 'Hibou Corp.', 'author': 'Hibou Corp.',
'category': 'Hidden', 'category': 'Hidden',
'version': '17.0.1.0.0', 'version': '18.0.1.0.0',
'description': 'description':
""" """
Login as other user Login as other user

View File

@@ -17,7 +17,7 @@ def admin_auth_generate_login(env, user):
:param user: `res.users` in :param user: `res.users` in
:return: :return:
""" """
if not env['res.partner'].check_access_rights('write'): if not env['res.partner'].has_access('write'):
return None return None
u = str(user.id) u = str(user.id)
now = datetime.utcnow() now = datetime.utcnow()

View File

@@ -5,7 +5,7 @@
<field name="model">res.users</field> <field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_tree"/> <field name="inherit_id" ref="base.view_users_tree"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//tree" position="inside"> <xpath expr="//list" position="inside">
<field name="share" invisible="1"/> <field name="share" invisible="1"/>
<button string="Generate Login" type="object" <button string="Generate Login" type="object"
name="admin_auth_generate_login" name="admin_auth_generate_login"

View File

@@ -9,7 +9,7 @@
<xpath expr="//field[@name='is_portal']" position="after"> <xpath expr="//field[@name='is_portal']" position="after">
<field name="force_login_url" widget="CopyClipboardChar"/> <field name="force_login_url" widget="CopyClipboardChar"/>
</xpath> </xpath>
<xpath expr="//tree/button[last()]" position="after"> <xpath expr="//list/button[last()]" position="after">
<button string="Generate Login URL" type="object" name="admin_auth_generate_login" class="btn-primary" /> <button string="Generate Login URL" type="object" name="admin_auth_generate_login" class="btn-primary" />
</xpath> </xpath>
</field> </field>