Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odoo CE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Comunitats Energètiques
Odoo CE
Commits
2ffe5e4a
Commit
2ffe5e4a
authored
2 years ago
by
Daniil Digtyar Vasilieva
Browse files
Options
Downloads
Patches
Plain Diff
Added get role codes to user
parent
bc70de4a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!73
14 imp other endpoints
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
energy_communities/models/res_users.py
+4
-0
4 additions, 0 deletions
energy_communities/models/res_users.py
with
4 additions
and
0 deletions
energy_communities/models/res_users.py
+
4
−
0
View file @
2ffe5e4a
...
...
@@ -177,3 +177,7 @@ class ResUsers(models.Model):
# yes, Keycloak sends back NOTHING on create
# so we are forced to do anothe call to get its data :(
return
self
.
_get_users
(
token
,
provider_id
,
search
=
data
[
'
username
'
])[
0
]
def
get_role_codes
(
self
):
#TODO Map all code to company and enable (We should update the API schema too)
return
self
.
role_line_ids
[
0
].
role_id
.
code
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment