-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
[16.0][IMP] sign_oca: Improvements migrated from 14.0 #22
Conversation
Hi @etobella, |
b11dc7a
to
45edd51
Compare
40e501f
to
cfb2d25
Compare
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.
Thank you for doing this work to v16.
Some comments (my functional review is still pending).
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.
Some things I have seen do not work in v16:
- The "Sign from template" action that is automatically added in the tree and form view does not work: [14.0][IMP] sign_oca: Add Sign from template action from tree and form view #20
- Systray management does not work: [14.0][IMP] sign_oca: Systray management + user rules + wizard to create requests #8
- The action_signer_sign_url button in the form view of a request should only be shown in the sent state.
Other things I have not been able to check.
378c829
to
f38c83c
Compare
Some comments to keep in mind:
|
699d5e3
to
d46dd41
Compare
93152a1
to
f41970a
Compare
1. Add Sign button in request form (it was only in tree view). 2. Fix configure template action when it is created from a request.
… any user access to sign page TT41745
…expression) TT41745
b9c59c6
to
5d96bac
Compare
@victoralmau I'm checking the PR but still seem to find something not completely finished. The problem is that when we generate a signature request from the 'Sign from template' action, it doesn't create the signers. It seems to be something that has already been commented here but it's not quite clear to me: #25 (comment) From my point of view, in the sign_oca code we should generate by default all the signers defined in the template with the active user that is throwing the action. And later, in any case, it could be inherited from the method that generates the signers to define a different logic. So, the 'Sign from Template' feature should work on its own without the need for another module. Finally, I would also like to ask what exactly is the 'partner_type' field inside the 'sign.oca.role' model? I don't fully understand how to use it. Is it necessary? |
Currently everything is correct although I understand the confusion that exists (perhaps the readme should be improved). I explain a little bit the different use cases: A request will be created defining as signer the user that makes it. A wizard will be created to define the desired signers manually. A wizard will be created that when selecting a template will generate a request with the "corresponding" signers. The concept of signers does not exist in the templates, it is something that generates from the roles and the type (fixed partner or regular expression). You can check #32 to understand it better. |
@victoralmau Ok, I understand how it works and it looks good to me. The only thing that makes me hesitate is that the field is called 'Partner type' as it is not intuitive. How about we change it to 'Partner Selection Policy'? And in addition we add a help explaining a little how it works. Other than that, what is the use of the 'Empty' option? I don't see any use for it, I would change 'Empty' to 'Active User'. By default, if the role is not configured with another partner selection policy, it would take the active user. Thus, any user can select records from a model and sign them on their behalf. Lastly, when I use the 'Default' option it seems to fail.
|
If you want to change the string of the field and add a perfect help, but the empty option should be kept and it is the "most frequent". If we create a The error you indicate I have not been able to reproduce it, can you indicate the steps to reproduce it and/or add a mini-video? If it is something that happens in 15.0 currently it should be solved. |
Okay thank you! Will add the changes!
About this, why would you add an item in a template that is filled by a role whose partner selection policy is 'Empty'? It's difficult for me to imagine a situation in which you would configure it like that. A video showing how it is failing for me: |
d476260
to
e4ef185
Compare
e4ef185
to
9c8d1a5
Compare
@BernatPForgeFlow @victoralmau The error that you reported has been fixed. Also, the field partner_type has been renamed to partner_selection_policy. |
IMO by default the user who creates it should not be added as a signer. I understand what you comment but there are several things that would not make it very coherent:
IMO it could be improved (in a different PR) |
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.
LGTM! As @victoralmau recommended I will open a separated PR to propose a new way to work with the 'Partner Selection Policy' in 'Sign from template' action.
Sorry, could you add a migration script to rename field partner_type to partner_selection_policy from |
Ping @pedrobaeza @etobella |
Change partner_type column to partner_selection_policy
95bf66b
to
35a0ed5
Compare
@pedrobaeza This is now ready |
Is everything correct now? IMO I think it is important not to delay merging and adding these changes in the 17.0 migration. |
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.
/ocabot merge major
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 27ca9b9. Thanks a lot for contributing to OCA. ❤️ |
Migrated PRs:
#8 #17 #18 #19 #20 #21 #24 #26 #27 #30