├── requirements.txt ├── setup ├── _metapackage │ ├── VERSION.txt │ └── setup.py ├── base_user_role │ ├── odoo │ │ └── addons │ │ │ └── base_user_role │ └── setup.py ├── base_import_match │ ├── odoo │ │ └── addons │ │ │ └── base_import_match │ └── setup.py ├── base_user_role_company │ ├── odoo │ │ └── addons │ │ │ └── base_user_role_company │ └── setup.py ├── base_user_role_profile │ ├── odoo │ │ └── addons │ │ │ └── base_user_role_profile │ └── setup.py ├── README └── .setuptools-odoo-make-default-ignore ├── base_user_role ├── __init__.py ├── tests │ └── __init__.py ├── models │ ├── __init__.py │ ├── user.py │ └── role.py ├── static │ └── description │ │ ├── icon.png │ │ ├── roles.png │ │ ├── user_form.png │ │ ├── role_groups.png │ │ └── role_users.png ├── readme │ ├── CREDITS.rst │ ├── USAGE.rst │ ├── CONTRIBUTORS.rst │ ├── CONFIGURE.rst │ └── DESCRIPTION.rst ├── security │ └── ir.model.access.csv ├── data │ ├── ir_module_category.xml │ └── ir_cron.xml ├── __manifest__.py ├── views │ ├── user.xml │ └── role.xml └── README.rst ├── base_user_role_profile ├── tests │ ├── __init__.py │ └── test_user_role.py ├── __init__.py ├── models │ ├── __init__.py │ ├── role.py │ ├── profile.py │ ├── ir_http.py │ └── user.py ├── readme │ ├── CONTRIBUTORS.rst │ ├── CONFIGURE.rst │ ├── USAGE.rst │ └── DESCRIPTION.rst ├── static │ └── description │ │ └── icon.png ├── data │ └── data.xml ├── security │ └── ir.model.access.csv ├── hooks.py ├── views │ ├── assets.xml │ ├── role.xml │ ├── user.xml │ └── profile.xml ├── __manifest__.py ├── README.rst └── i18n │ └── base_user_role_profile.pot ├── base_user_role_company ├── tests │ ├── __init__.py │ └── test_role_per_company.py ├── static │ └── description │ │ └── icon.png ├── __init__.py ├── models │ ├── __init__.py │ ├── ir_http.py │ └── role.py ├── readme │ ├── CONTRIBUTORS.rst │ ├── CONFIGURE.rst │ ├── DESCRIPTION.rst │ └── USAGE.rst ├── __manifest__.py ├── views │ └── role.xml ├── i18n │ └── base_user_role_company.pot └── README.rst ├── base_import_match ├── tests │ ├── import_data │ │ ├── res_users_login.csv │ │ ├── res_partner_name.csv │ │ ├── res_partner_vat.csv │ │ ├── res_partner_dbid.csv │ │ ├── res_partner_email.csv │ │ ├── res_partner_invalid_combination_vat.csv │ │ ├── res_partner_external_id.csv │ │ └── res_partner_parent_name_is_company.csv │ ├── __init__.py │ └── test_import.py ├── readme │ ├── CONTRIBUTORS.rst │ ├── ROADMAP.rst │ ├── USAGE.rst │ ├── CONFIGURE.rst │ └── DESCRIPTION.rst ├── static │ └── description │ │ └── icon.png ├── __init__.py ├── models │ ├── __init__.py │ ├── base.py │ └── base_import.py ├── security │ └── ir.model.access.csv ├── __manifest__.py ├── data │ └── base_import_match.xml ├── demo │ └── base_import_match.xml ├── views │ └── base_import_match_view.xml ├── README.rst └── i18n │ ├── base_import_match.pot │ ├── gl_ES.po │ ├── ja.po │ ├── ko.po │ └── zh_TW.po ├── base_dav ├── readme │ ├── CONTRIBUTORS.rst │ ├── CREDITS.rst │ ├── DESCRIPTION.rst │ ├── CONFIGURE.rst │ └── ROADMAP.rst ├── static │ └── description │ │ └── icon.png ├── controllers │ ├── __init__.py │ └── main.py ├── tests │ ├── __init__.py │ ├── test_base_dav.py │ └── test_collection.py ├── __init__.py ├── models │ ├── __init__.py │ └── dav_collection_field_mapping.py ├── radicale │ ├── __init__.py │ ├── auth.py │ ├── rights.py │ └── collection.py ├── security │ └── ir.model.access.csv ├── __manifest__.py ├── demo │ └── dav_collection.xml ├── views │ └── dav_collection.xml └── README.rst ├── oca_dependencies.txt ├── .prettierrc.yml ├── .flake8 ├── .isort.cfg ├── .copier-answers.yml ├── .editorconfig ├── .github └── workflows │ ├── pre-commit.yml │ └── stale.yml ├── .travis.yml ├── .gitignore ├── .pylintrc-mandatory ├── README.md ├── .pylintrc ├── .pre-commit-config.yaml └── .eslintrc.yml /requirements.txt: -------------------------------------------------------------------------------- 1 | radicale==2.1.12 2 | -------------------------------------------------------------------------------- /setup/_metapackage/VERSION.txt: -------------------------------------------------------------------------------- 1 | 14.0.20211204.0 -------------------------------------------------------------------------------- /base_user_role/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | -------------------------------------------------------------------------------- /base_user_role/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_user_role 2 | -------------------------------------------------------------------------------- /base_user_role_profile/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_user_role 2 | -------------------------------------------------------------------------------- /setup/base_user_role/odoo/addons/base_user_role: -------------------------------------------------------------------------------- 1 | ../../../../base_user_role -------------------------------------------------------------------------------- /base_user_role/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import role 2 | from . import user 3 | -------------------------------------------------------------------------------- /base_user_role_company/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_role_per_company 2 | -------------------------------------------------------------------------------- /setup/base_import_match/odoo/addons/base_import_match: -------------------------------------------------------------------------------- 1 | ../../../../base_import_match -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_users_login.csv: -------------------------------------------------------------------------------- 1 | login,name 2 | demo,Demo User Changed 3 | -------------------------------------------------------------------------------- /base_user_role_profile/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | from .hooks import post_init_hook 3 | -------------------------------------------------------------------------------- /setup/base_user_role_company/odoo/addons/base_user_role_company: -------------------------------------------------------------------------------- 1 | ../../../../base_user_role_company -------------------------------------------------------------------------------- /setup/base_user_role_profile/odoo/addons/base_user_role_profile: -------------------------------------------------------------------------------- 1 | ../../../../base_user_role_profile -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_partner_name.csv: -------------------------------------------------------------------------------- 1 | function,name 2 | Function Changed,Floyd Steward 3 | -------------------------------------------------------------------------------- /setup/README: -------------------------------------------------------------------------------- 1 | To learn more about this directory, please visit 2 | https://pypi.python.org/pypi/setuptools-odoo 3 | -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_partner_vat.csv: -------------------------------------------------------------------------------- 1 | name,vat,is_company 2 | Deco Addict Changed,BE0477472701,True 3 | -------------------------------------------------------------------------------- /base_dav/readme/CONTRIBUTORS.rst: -------------------------------------------------------------------------------- 1 | * Holger Brunn 2 | * Florian Kantelberg 3 | -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_partner_dbid.csv: -------------------------------------------------------------------------------- 1 | .id,vat,name 2 | 10,BE099999999,Deco Addict External DBID Changed 3 | -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_partner_email.csv: -------------------------------------------------------------------------------- 1 | email,name 2 | floyd.steward34@example.com,Floyd Steward Changed 3 | -------------------------------------------------------------------------------- /base_dav/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_dav/static/description/icon.png -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_partner_invalid_combination_vat.csv: -------------------------------------------------------------------------------- 1 | name,vat,is_company 2 | Deco Addict Changed,BE0477472701,False 3 | -------------------------------------------------------------------------------- /base_user_role_profile/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import profile 2 | from . import user 3 | from . import role 4 | from . import ir_http 5 | -------------------------------------------------------------------------------- /base_user_role_profile/readme/CONTRIBUTORS.rst: -------------------------------------------------------------------------------- 1 | * Kevin Khao 2 | * Sébastien Beau 3 | -------------------------------------------------------------------------------- /oca_dependencies.txt: -------------------------------------------------------------------------------- 1 | # See https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#oca_dependencies-txt 2 | -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_partner_external_id.csv: -------------------------------------------------------------------------------- 1 | id,vat,name 2 | base.res_partner_2,BE077777777,Deco Addict External ID Changed 3 | -------------------------------------------------------------------------------- /setup/.setuptools-odoo-make-default-ignore: -------------------------------------------------------------------------------- 1 | # addons listed in this file are ignored by 2 | # setuptools-odoo-make-default (one addon per line) 3 | -------------------------------------------------------------------------------- /base_user_role/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_user_role/static/description/icon.png -------------------------------------------------------------------------------- /setup/base_user_role/setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | setuptools.setup( 4 | setup_requires=['setuptools-odoo'], 5 | odoo_addon=True, 6 | ) 7 | -------------------------------------------------------------------------------- /base_import_match/readme/CONTRIBUTORS.rst: -------------------------------------------------------------------------------- 1 | * `Tecnativa `_: 2 | * Jairo Llopis 3 | * Vicent Cubells 4 | * Ernesto Tejeda 5 | -------------------------------------------------------------------------------- /base_import_match/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_import_match/static/description/icon.png -------------------------------------------------------------------------------- /base_user_role/static/description/roles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_user_role/static/description/roles.png -------------------------------------------------------------------------------- /setup/base_import_match/setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | setuptools.setup( 4 | setup_requires=['setuptools-odoo'], 5 | odoo_addon=True, 6 | ) 7 | -------------------------------------------------------------------------------- /base_user_role/static/description/user_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_user_role/static/description/user_form.png -------------------------------------------------------------------------------- /setup/base_user_role_company/setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | setuptools.setup( 4 | setup_requires=['setuptools-odoo'], 5 | odoo_addon=True, 6 | ) 7 | -------------------------------------------------------------------------------- /setup/base_user_role_profile/setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | setuptools.setup( 4 | setup_requires=['setuptools-odoo'], 5 | odoo_addon=True, 6 | ) 7 | -------------------------------------------------------------------------------- /base_import_match/readme/ROADMAP.rst: -------------------------------------------------------------------------------- 1 | * Add a setting to throw an error when multiple matches are found, instead of 2 | falling back to creation of new record. 3 | -------------------------------------------------------------------------------- /base_user_role/static/description/role_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_user_role/static/description/role_groups.png -------------------------------------------------------------------------------- /base_user_role/static/description/role_users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_user_role/static/description/role_users.png -------------------------------------------------------------------------------- /base_user_role_company/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_user_role_company/static/description/icon.png -------------------------------------------------------------------------------- /base_user_role_profile/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-oca-server-backend/14.0/base_user_role_profile/static/description/icon.png -------------------------------------------------------------------------------- /base_dav/controllers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import main 4 | -------------------------------------------------------------------------------- /base_user_role_company/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2021 Open Source Integrators 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from . import models 5 | -------------------------------------------------------------------------------- /base_user_role_profile/readme/CONFIGURE.rst: -------------------------------------------------------------------------------- 1 | Go to Configuration / Users / Profiles and create a profile. Go to Configuration / Users / Roles and define some role lines with profiles. 2 | -------------------------------------------------------------------------------- /base_import_match/tests/import_data/res_partner_parent_name_is_company.csv: -------------------------------------------------------------------------------- 1 | name,is_company,parent_id/id,email 2 | Floyd Steward,False,base.res_partner_2,floyd.steward34.changed@example.com 3 | -------------------------------------------------------------------------------- /base_dav/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import test_base_dav, test_collection 4 | -------------------------------------------------------------------------------- /base_user_role/readme/CREDITS.rst: -------------------------------------------------------------------------------- 1 | Images 2 | ------ 3 | 4 | * Oxygen Team: `Icon `_ (LGPL) 5 | -------------------------------------------------------------------------------- /base_user_role_company/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2021 Open Source Integrators 2 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 3 | 4 | from . import role 5 | from . import ir_http 6 | -------------------------------------------------------------------------------- /base_dav/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import models 4 | from . import controllers 5 | from . import radicale 6 | -------------------------------------------------------------------------------- /base_import_match/readme/USAGE.rst: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | #. Follow steps in **Configuration** section above. 4 | #. Go to any list view. 5 | #. Press *Import* and follow the import procedure as usual. 6 | -------------------------------------------------------------------------------- /base_dav/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import dav_collection 4 | from . import dav_collection_field_mapping 5 | -------------------------------------------------------------------------------- /base_dav/radicale/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Therp BV 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | from . import auth 4 | from . import collection 5 | from . import rights 6 | -------------------------------------------------------------------------------- /base_user_role/readme/USAGE.rst: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | #. Go to Configuration / Users / Users choose user and set Roles: 4 | 5 | .. image:: /OCA/server-backend/base_user_role/static/description/user_form.png 6 | -------------------------------------------------------------------------------- /base_user_role_company/readme/CONTRIBUTORS.rst: -------------------------------------------------------------------------------- 1 | `Open Source Integrators `_ 2 | 3 | * Daniel Reis 4 | * Chandresh Thakkar 5 | -------------------------------------------------------------------------------- /base_user_role_profile/data/data.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | No profile 5 | 6 | 7 | -------------------------------------------------------------------------------- /base_dav/readme/CREDITS.rst: -------------------------------------------------------------------------------- 1 | * Odoo Community Association: `Icon `_ 2 | * All the actual work is done by `Radicale `_ 3 | -------------------------------------------------------------------------------- /base_import_match/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis 2 | # Copyright 2016 Tecnativa - Vicent Cubells 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 4 | 5 | from . import models 6 | -------------------------------------------------------------------------------- /base_dav/readme/DESCRIPTION.rst: -------------------------------------------------------------------------------- 1 | This module adds WebDAV support to Odoo, specifically CalDAV and CardDAV. 2 | 3 | You can configure arbitrary objects as a calendar or an address book, thus make arbitrary information accessible in external systems or your mobile. 4 | -------------------------------------------------------------------------------- /base_import_match/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis 2 | # Copyright 2016 Tecnativa - Vicent Cubells 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 4 | 5 | from . import test_import 6 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | # Defaults for all prettier-supported languages. 2 | # Prettier will complete this with settings from .editorconfig file. 3 | bracketSpacing: false 4 | printWidth: 88 5 | proseWrap: always 6 | semi: true 7 | trailingComma: "es5" 8 | xmlWhitespaceSensitivity: "strict" 9 | -------------------------------------------------------------------------------- /base_import_match/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis 2 | # Copyright 2016 Tecnativa - Vicent Cubells 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 4 | 5 | from . import base 6 | from . import base_import 7 | -------------------------------------------------------------------------------- /base_user_role_profile/readme/USAGE.rst: -------------------------------------------------------------------------------- 1 | Once you have set up at least one profile for a user, use the widget in the top bar to switch user profiles. Note that it is possible to use no profile; in this case, the user will only get the roles that always apply (i.e the ones with no profile_id). 2 | -------------------------------------------------------------------------------- /base_dav/readme/CONFIGURE.rst: -------------------------------------------------------------------------------- 1 | To configure this module, you need to: 2 | 3 | #. go to `Settings / WebDAV Collections` and create or edit your collections. There, you'll also see the URL to point your clients to. 4 | 5 | Note that you need to configure a dbfilter if you use multiple databases. 6 | -------------------------------------------------------------------------------- /base_user_role/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 2 | access_res_users_role,access_res_users_role,model_res_users_role,"base.group_erp_manager",1,1,1,1 3 | access_res_users_role_line,access_res_users_role_line,model_res_users_role_line,"base.group_erp_manager",1,1,1,1 4 | -------------------------------------------------------------------------------- /base_user_role_company/readme/CONFIGURE.rst: -------------------------------------------------------------------------------- 1 | Roles are set on the User form. 2 | 3 | The "Company" additional column allows to set a Role as only valid for specific companies. 4 | 5 | There is also a "Active Role" techincal field, only visible in developer mode. 6 | It shows what roles are active, after applying the company selection rules. 7 | -------------------------------------------------------------------------------- /base_user_role_profile/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 2 | access_res_users_profile,access_res_users_profile,model_res_users_profile,base.group_user,1,0,0,0 3 | access_res_users_role_line_users,access_res_users_role_line,model_res_users_role_line,base.group_user,1,0,0,0 4 | -------------------------------------------------------------------------------- /base_dav/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" 2 | access_dav_collection,access_dav_collection,model_dav_collection,base.group_user,1,1,1,1 3 | access_dav_collection_field_mapping,access_dav_collection_field_mapping,model_dav_collection_field_mapping,base.group_user,1,1,1,1 4 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 88 3 | max-complexity = 16 4 | # B = bugbear 5 | # B9 = bugbear opinionated (incl line length) 6 | select = C,E,F,W,B,B9 7 | # E203: whitespace before ':' (black behaviour) 8 | # E501: flake8 line length (covered by bugbear B950) 9 | # W503: line break before binary operator (black behaviour) 10 | ignore = E203,E501,W503 11 | per-file-ignores= 12 | __init__.py:F401 13 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | ; see https://github.com/psf/black 3 | multi_line_output=3 4 | include_trailing_comma=True 5 | force_grid_wrap=0 6 | combine_as_imports=True 7 | use_parentheses=True 8 | line_length=88 9 | known_odoo=odoo 10 | known_odoo_addons=odoo.addons 11 | sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER 12 | default_section=THIRDPARTY 13 | ensure_newline_before_comments = True 14 | -------------------------------------------------------------------------------- /base_user_role_company/readme/DESCRIPTION.rst: -------------------------------------------------------------------------------- 1 | Enable User Roles depending on the Companies selected. 2 | 3 | A company specific Role will only be enabled 4 | if it is set for **all** the currently selected companies. 5 | 6 | For example, if a user is "Sales Manager" only for Company A, 7 | it will see that role enabled only if Company A is selected. 8 | If the user selects Company A and Company B, 9 | then the "Sales Manager" role won't be enabled. 10 | -------------------------------------------------------------------------------- /base_user_role/readme/CONTRIBUTORS.rst: -------------------------------------------------------------------------------- 1 | * Sébastien Alix 2 | * Duc, Dao Dong (https://komit-consulting.com) 3 | * Jean-Charles Drubay (https://komit-consulting.com) 4 | * Alan Ramos (https://www.jarsa.com.mx) 5 | * Harald Panten 6 | * Kevin Khao 7 | 8 | Do not contact contributors directly about support or help with technical issues. 9 | -------------------------------------------------------------------------------- /.copier-answers.yml: -------------------------------------------------------------------------------- 1 | # Do NOT update manually; changes here will be overwritten by Copier 2 | _commit: v1.3.6 3 | _src_path: gh:oca/oca-addons-repo-template 4 | ci: Travis 5 | dependency_installation_mode: PIP 6 | generate_requirements_txt: true 7 | include_wkhtmltopdf: false 8 | odoo_version: 14.0 9 | rebel_module_groups: [] 10 | repo_description: 'TODO: add repo description.' 11 | repo_name: server-backend 12 | repo_slug: server-backend 13 | travis_apt_packages: [] 14 | travis_apt_sources: [] 15 | -------------------------------------------------------------------------------- /base_user_role_profile/models/role.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 2 | from odoo import fields, models 3 | 4 | 5 | class ResUsersRole(models.Model): 6 | _inherit = "res.users.role" 7 | 8 | profile_id = fields.Many2one( 9 | "res.users.profile", 10 | "Profile", 11 | ) 12 | 13 | 14 | class ResUsersRoleLine(models.Model): 15 | _inherit = "res.users.role.line" 16 | 17 | profile_id = fields.Many2one(related="role_id.profile_id") 18 | -------------------------------------------------------------------------------- /base_user_role_profile/hooks.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Akretion (https://www.akretion.com). 2 | # @author Pierrick Brun 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 4 | 5 | from odoo import SUPERUSER_ID, api 6 | 7 | 8 | def post_init_hook(cr, registry): 9 | env = api.Environment(cr, SUPERUSER_ID, {}) 10 | env["res.users"].search([("profile_id", "=", False)]).profile_id = env.ref( 11 | "base_user_role_profile.default_profile" 12 | ) 13 | -------------------------------------------------------------------------------- /base_user_role_profile/views/assets.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |