Skip to content
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

[ADD] beesdoo_shift: allow to create user #298

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

tfrancoi
Copy link
Contributor

When a new cooperator subscribe
add a checkbox to allow to create a portal user
if the user already exist nothing will happen

@tfrancoi
Copy link
Contributor Author

TODO: Check if we don't want to hide this field by default
How to display it then ?

Copy link
Member

@robinkeunen robinkeunen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO si on a envie : n’afficher cette case que si aucun user n’existe encore. But : réduire l’interface pour les utilisateurs (une case en plus == des questions de users en plus).

Comment on lines 221 to 207
PortalWizard = self.env['portal.wizard'].sudo()
wiz_values = PortalWizard.with_context(active_ids=self.cooperator_id.ids).default_get(['user_ids'])
wizard = PortalWizard.create(wiz_values)
wizard.user_ids.write({'in_portal': True})
wizard.action_apply()
Copy link
Member

@robinkeunen robinkeunen Feb 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remytms fyi, comment Thibault crée un utilisateur.

@codecov-commenter
Copy link

Codecov Report

Merging #298 (0e64141) into 12.0 (fa7306c) will decrease coverage by 0.12%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##             12.0     #298      +/-   ##
==========================================
- Coverage   68.53%   68.41%   -0.13%     
==========================================
  Files         107      107              
  Lines        3366     3375       +9     
  Branches      589      590       +1     
==========================================
+ Hits         2307     2309       +2     
- Misses        951      957       +6     
- Partials      108      109       +1     
Impacted Files Coverage Δ
beesdoo_shift/wizard/subscribe.py 56.25% <22.22%> (-3.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa7306c...0e64141. Read the comment docs.

@tfrancoi
Copy link
Contributor Author

@robinkeunen All green

@robinkeunen
Copy link
Member

@polchampion I deployed this on these databases. As noted above, we have to see wether we want to make this feature available to all or only based on a configuration. Or only let some user group see the checkbox.

The other option is to merge as is and then split it into another module.

bees-test
coopeco-test
demain-test
fhmunich-test
lasource-test
lenid-test
lesptitspots-test
oufticoop-test
spp-test
vervicoop-test

@polchampion
Copy link
Collaborator

@robinkeunen Je dois tester mais a priori ok de merger cela as is. Nice to have : mouseover "cocher cette case pour créer un utilisateur pour cette personne. Si un utilisateur existe déjà, cocher cette case n'aura aucun effet."

@robinkeunen robinkeunen self-assigned this Jun 7, 2022
When a new cooperator subscribe
add a checkbox to allow to create a portal user
if the user already exist nothing will happen
@robinkeunen
Copy link
Member

/ocabot merge minor

@robinkeunen robinkeunen merged commit 934313e into 12.0 Jun 9, 2022
@robinkeunen robinkeunen deleted the 12.0-create-user-subscribe branch June 9, 2022 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants