-
-
Notifications
You must be signed in to change notification settings - Fork 59
[IMP] sign_oca: add resend feature to partners who did not sign #89
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
base: 16.0
Are you sure you want to change the base?
Conversation
|
Hi @etobella, |
a8fe6e2 to
531fe8d
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.
hi @kobros-tech, why don't you change or reuse the action_send (ref) function to make the sign.oca.request support for sent state as well instead of creating a duplicate function with the same functionality. same as the Send By Email function of Sale Order.

if it could be applied would be a good idea💡 |
7971f13 to
182845c
Compare
victoralmau
left a comment
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.
I don't understand the need to resend the email, in any case, maybe it would be easier to add a “Back to draft” button (while in sent status) to achieve the same goal. What do you think?
The point is not creaing many requests as if there are 3 partners and they should sign So we better resend the same signed request with 2 partners to him to sign, so the point is not the state at all but the workflow. |
|
by the way I didn't see back to draft button here is it recently merged or what? |
182845c to
d8103e3
Compare
|
Only partners who have not signed yet will receive the email to sign. |
|
I am planning to correct the module to prevent creation if the signers are the same, return to draft button is not shown to me in this module? |
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.
I am planning to correct the module to prevent creation if the signers are the same, return to draft button is not shown to me in this module?
I agree with your point of view. We should make the function of sending mail similar to that of sending email like Sale Order, Purchase Order, Invoice, ... (we can send mail multiple times in draft, sent or even confirm status)
Your change now is ok with me, so thanks for your work.
The use case would be to remind the signer that there is a pending item needing attention. not sure if there is any better way to accomplish that. I guess if they are not longer interested in the service/status achieved from the contract, then the email should have a cancel option to prevent additional reminders. |
technically yes, they can unsubscribe to a channel but let me try if I can. |
d8103e3 to
833090c
Compare
|
@dnplkndll |
40cb134 to
5c874de
Compare
5c874de to
aa85074
Compare
there is an idea to achieve the same goal, shall I try and if it works we prefer the best option? |
sign_oca/controllers/main.py
Outdated
| def unsubscription(self, signer_id=None, res_id=None, access_token=None, **kwargs): | ||
| """manage calls for unsubscription""" | ||
| if not res_id or not signer_id: | ||
| return {"state": "wrong_url"} | ||
| sign_request = request.env["sign.oca.request"].sudo().browse(int(res_id)) | ||
| try: | ||
| signer = ( | ||
| request.env["sign.oca.request.signer"].sudo().browse(int(signer_id)) | ||
| ) | ||
| if not signer: | ||
| return {"state": "wrong_id"} | ||
| signer_sudo = self._document_check_access( | ||
| signer._name, signer.id, access_token | ||
| ) | ||
| sign_request.message_unsubscribe( | ||
| partner_ids=[int(signer_sudo.partner_id.id)] | ||
| ) | ||
| except (AccessError, MissingError): | ||
| return {"state": "wrong_access"} | ||
| return {"state": "ok"} | ||
|
|
||
| @http.route("/mail/unsubscribe", type="http", auth="public", website=True) | ||
| def unsubscribe(self, signer_id=None, res_id=None, access_token=None, **kwargs): | ||
| """unsubscription controller""" | ||
| vals = self.unsubscription( | ||
| signer_id=signer_id, res_id=res_id, access_token=access_token, **kwargs | ||
| ) | ||
| return request.render("sign_oca.page_unsubscribed", vals) |
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.
I don't understand the need for this. I mean, why would anyone want to unsubscribe from something they have to sign up for? Do we want to “allow” them to do so? I don't think so. I could apply the same “logic” to an email for a sales order, and no unsubscribe option is added, but that's just my opinion.
sign_oca/models/sign_oca_template.py
Outdated
| model = fields.Char(compute="_compute_model", compute_sudo=True, store=True) | ||
| active = fields.Boolean(default=True) | ||
| request_ids = fields.One2many("sign.oca.request", inverse_name="template_id") | ||
| create_single_request = fields.Boolean(default=True) |
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.
I don't understand the need for this field; I think it just complicates the (clear) logic that currently exists.
sign_oca/views/sign_oca_request.xml
Outdated
| string="Send" | ||
| type="object" | ||
| states="1_draft" | ||
| states="1_draft,0_sent" |
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.
Continuing with #124 (comment), this is NOT what I suggested. The “send” button in the header should remain as it is and should not be changed. A button (an icon that is representative without text) should be added to the signers, and that action should send the email to that recipient, nothing else.
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.
I think the “simple” thing to do is to separate this part
sign/sign_oca/models/sign_oca_request.py
Line 244 in e144050
| for signer in self.signer_ids: |
1446f98 to
605aff8
Compare
|
@kobros-tech when someone asks for the request but it goes to spam or not received for other reason ( bad email ?) |
605aff8 to
be8c334
Compare
victoralmau
left a comment
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.
My comment #89 (comment) is still pending.
sign_oca/views/sign_oca_request.xml
Outdated
| states="1_draft" | ||
| name="action_send" | ||
| icon="fa-paper-plane" | ||
| confirm="Are you sure ?" |
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.
| confirm="Are you sure ?" |
I believe that this specific confirmation is not necessary.
I created this PR so that it is very easy to DM the link in the chat or someone can sign on behalf: |
|
hello? |
|
My comment https://github.com/OCA/sign/pull/89/files#r2374878936 is still pending. |
be8c334 to
13338bf
Compare
|
the comment is resolved, is there any comment? |
|
@kobros-tech could a plan be setup? for instance to resend in an hour, then each day for a week then monthly unless the signer cancels? just for instance. that seems kind of annoying too. |
|
we can make it in a private custom code, or I am working on notification automation and I would make it based on queue project. to approach your point as long as any sign request is set to sent a queued notification will be sent untill the request becomes canceled or signed. It is still needing finishing but can be reviewed to suggest any features. |






Sometimes we can resend the sign request for some partners and find that a new one is created although some people have already signed the previous one.
In that case we will have to resign agin which is extra needed
This PR is allow to resend the email or sms of the same sign request to be signed, also there is an option to allow creating request for once.
#87
unsubscribe feature is added to avoid sending emails to partners who are not interested.
Only partners who didn't sign and still followers to the specific sign request are receiving the email notifications.