-
-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create users in OCA instance for partners with a github login #47
Conversation
This PR depends on #36 (and I actually rebased my branch on top of that one) @StefanRijnhart @guewen your feedback is welcome |
8f48611
to
c468b79
Compare
@StefanRijnhart fixed thanks. |
ResGroups = client.ResGroups | ||
grp_project_user = ResGroups.get('project.group_project_user') | ||
members_with_gh = ResPartner.search([('x_github_login', '!=', False), | ||
('user_ids', '=', False)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check with active_test=True in the context here, so that we don't try to recreate users which have been set to inactive for some reason?
@StefanRijnhart the current problem I have is with duplicate partners: one has a github login set, no email, no user, the other has no github login, generally an email and a user. Manually adding the email fails (there's a unique key on email) and creating the partner fails too (duplicate login). <rant>The partner model with its relations to users (and employees) is a total 💩</rant> |
Need to use the dedupplicate contact in OCA Odoo instance for this issue |
@jgrandguillaume can you help here with your deduplicate tool? |
refactored github login so they both use the same config file
username and password in the config file without launching another script (can be used to prepare a cron with oca-github-login too)
which seems better to me
search group by xmlid smarter search partners without a user
handle that in the script and don't crash in that case.
fef0b70
to
a14e7a1
Compare
erppeek can browse on ids or domain...
👍 |
@StefanRijnhart ok, we made a quick session today with joel to fix the remaining database problems. This script has run, and we should be able to merge and move on with #36 |
Great, thanks. Tested but without actually creating users as per my privileges in the OCA database.\ 👍 |
👍 |
Create users in OCA instance for partners with a github login
No description provided.