Skip to content

Commit

Permalink
custom_group_change_passw
Browse files Browse the repository at this point in the history
  • Loading branch information
Gines-Pesol committed Jan 12, 2024
1 parent cb15ba6 commit a35e108
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_group_change_passw/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
###############################################################################
# For copyright and license notices, see __manifest__.py file in root directory
###############################################################################
# from . import models

Check failure on line 4 in custom_group_change_passw/__init__.py

View workflow job for this annotation

GitHub Actions / flake8_py3

custom_group_change_passw/__init__.py#L4

[W292] no newline at end of file
40 changes: 40 additions & 0 deletions custom_group_change_passw/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
###############################################################################
#
# Sidoo Soluciones S.L.
# Copyright (C) 2023-Today Sidoo Soluciones S.L. <www.sidoo.es>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
{
'name': 'Custom Group Not Allow Change Password',
'summary': '''Module module is designed for authentication with Microsoft Azure. It blocks non-administrative users from changing their

Check failure on line 22 in custom_group_change_passw/__manifest__.py

View workflow job for this annotation

GitHub Actions / flake8_py3

custom_group_change_passw/__manifest__.py#L22

[E501] line too long

Check failure on line 22 in custom_group_change_passw/__manifest__.py

View workflow job for this annotation

GitHub Actions / flake8_py3

custom_group_change_passw/__manifest__.py#L22

[W291] trailing whitespace
own passwords. Additionally, it disables the option to change passwords from the login reset password feature.''',

Check failure on line 23 in custom_group_change_passw/__manifest__.py

View workflow job for this annotation

GitHub Actions / flake8_py3

custom_group_change_passw/__manifest__.py#L23

[E501] line too long
'author': 'Gines Saez, Sidoo',
'website': 'http://sidoo.es',
'license': 'AGPL-3',
'category': 'Customize',
'version': '16.0.1.0.0',
'depends': [
'base',
'hr',
'auth_signup',
],
'data': [
"views/auth_singup_logout.xml",
"data/res_group.xml",
"views/res_user_view.xml",
],
'application': True,
}

Check failure on line 40 in custom_group_change_passw/__manifest__.py

View workflow job for this annotation

GitHub Actions / flake8_py3

custom_group_change_passw/__manifest__.py#L40

[W292] no newline at end of file
6 changes: 6 additions & 0 deletions custom_group_change_passw/data/res_group.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo noupdate="1">
<record id="group_custom_not_allow_change_passw" model="res.groups">
<field name="name">Permitir cambiar contraseña</field>
</record>
</odoo>
3 changes: 3 additions & 0 deletions custom_group_change_passw/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
###############################################################################
# For copyright and license notices, see __manifest__.py file in root directory
###############################################################################

Check failure on line 3 in custom_group_change_passw/models/__init__.py

View workflow job for this annotation

GitHub Actions / flake8_py3

custom_group_change_passw/models/__init__.py#L3

[W292] no newline at end of file
16 changes: 16 additions & 0 deletions custom_group_change_passw/views/auth_singup_logout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="fields" inherit_id="auth_signup.fields">
<xpath expr="//label[@for='password']//.." position="attributes">
<attribute name="t-if">False</attribute>
</xpath>
<xpath expr="//label[@for='confirm_password']//.." position="attributes">
<attribute name="t-if">False</attribute>
</xpath>
</template>
<template id="reset_password" inherit_id="auth_signup.reset_password">
<xpath expr="//div[@class='clearfix oe_login_buttons d-grid mt-3']//button" position="attributes">
<attribute name="t-if">False</attribute>
</xpath>
</template>
</odoo>
13 changes: 13 additions & 0 deletions custom_group_change_passw/views/res_user_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record model="ir.ui.view" id="view_users_form_simple_modif">
<field name="name">users_group_invisible</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<group name="auth" position="attributes">
<attribute name="groups">custom_group_change_passw.group_custom_not_allow_change_passw</attribute>
</group>
</field>
</record>
</odoo>

0 comments on commit a35e108

Please sign in to comment.