Skip to content

[16.0][IMP] sign_oca: enable signing from portal#86

Merged
OCA-git-bot merged 1 commit intoOCA:16.0from
kencove:16.0-imp-sign_oca-3
Nov 5, 2025
Merged

[16.0][IMP] sign_oca: enable signing from portal#86
OCA-git-bot merged 1 commit intoOCA:16.0from
kencove:16.0-imp-sign_oca-3

Conversation

@kobros-tech
Copy link
Contributor

adding a new feature by enabling portal users from signing their documents from portal in addition to signing it from emails too.
same as #78 but for version 16.0

@OCA-git-bot
Copy link
Contributor

Hi @etobella,
some modules you are maintaining are being modified, check this out!

@kobros-tech
Copy link
Contributor Author

dnplkndll

Copy link
Member

@flotho flotho left a comment

Choose a reason for hiding this comment

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

thanks
tested on runboat,
LGTM

Copy link

@xaviedoanhduy xaviedoanhduy left a comment

Choose a reason for hiding this comment

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

LGTM about functionality and code review

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link

@sergiocorato sergiocorato left a comment

Choose a reason for hiding this comment

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

Thanks

@kobros-tech kobros-tech force-pushed the 16.0-imp-sign_oca-3 branch 4 times, most recently from 932a4d7 to ee91ea1 Compare March 20, 2025 18:22
@kobros-tech kobros-tech requested a review from victoralmau March 20, 2025 22:52
Copy link
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

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

My other comments are pending: #86 (comment) + #86 (comment) + #86 (comment) + #86 (comment)

@kobros-tech
Copy link
Contributor Author

kobros-tech commented Mar 22, 2025

My other comments are pending: #86 (comment) + #86 (comment) + #86 (comment) + #86 (comment)
@victoralmau

There are mock tests and tour tests already there, you can review!
If you don't like number of rows I added as 10, what is the default should be there?
The new breadcrup should be now within others smoothly, so please review agin these issues properly.

Any other ones that could be related to new work will be handled according to what we decide whether remving or keeping to resume work.

I expect to stop at this point as the commit is getting large and review will never stop, so I tend to remove the lement for upcomming contribution.

Thanks ;)

could you guide me if I add my tour how can user open a page and return back to open another one like mine.
I think I tried but I got timeout.

@victoralmau
Copy link
Member

My other comments are pending: #86 (comment) + #86 (comment) + #86 (comment) + #86 (comment)
@victoralmau

There are mock tests and tour tests already there, you can review! If you don't like number of rows I added as 10, what is the default should be there? The new breadcrup should be now within others smoothly, so please review agin these issues properly.

Any other ones that could be related to new work will be handled according to what we decide whether remving or keeping to resume work.

I expect to stop at this point as the commit is getting large and review will never stop, so I tend to remove the lement for upcomming contribution.

Thanks ;)

Please comment on each thing in the corresponding conversation, if you want to. You can also skip my review comments, of course.

@kobros-tech kobros-tech force-pushed the 16.0-imp-sign_oca-3 branch from ee91ea1 to 065f4e5 Compare March 27, 2025 21:06
@kobros-tech
Copy link
Contributor Author

kobros-tech commented Mar 27, 2025

@victoralmau
I asked you if you don't like this default value to show:
self._items_per_page = 10

which is the other default one? as in the method I set the value by the way
I choose how many lines to appear, if you have an idea I didn't catch up explain more and better to have an example with code.

https://github.com/odoo/odoo/blob/18.0/addons/portal/controllers/portal.py#L133
https://github.com/odoo/odoo/blob/18.0/addons/hr_timesheet/controllers/portal.py#L77

For tests we have tour test and methods tests, including mocking if you don't like mock then it is a solution better than none.
tour is good but functionality for each part is good to be tested too.

We do mocking in avatax not just here.

I see the PR is very ready now

@kobros-tech
Copy link
Contributor Author

@etobella
@victoralmau
@pedrobaeza

You have made entire change on the module by deleting many files and a dir, it is ok to remove vunrable code but now I have conflict and I have to rebuld my work from zero as long as WE want it to be merged into OCA.

So, can we have a serious look into the open PRs and prepare for merging, I am ready for it and waiting.

Then, I can fix the scroll PR with the conflict.

@pedrobaeza
Copy link
Member

It's true that #105 removes code, but it reduces a lot of duplicated code, don't you think? I recommend you also to subscribe to the repository to be aware of the current pull requests, for commenting about before merging, so the rest can be aware.

@kobros-tech
Copy link
Contributor Author

It's true that #105 removes code, but it reduces a lot of duplicated code, don't you think? I recommend you also to subscribe to the repository to be aware of the current pull requests, for commenting about before merging, so the rest can be aware.

all right, I would like to know how to subscribe to a repository in OCA?

@pedrobaeza
Copy link
Member

Here you have it:

imagen

@kobros-tech kobros-tech force-pushed the 16.0-imp-sign_oca-3 branch from 065f4e5 to bb2a0ae Compare August 7, 2025 11:50
@kobros-tech
Copy link
Contributor Author

@pedrobaeza

I really need to have this module merged as long as there is no more issues to solve.

between time to time I find conflicts with the base branch and I have to fix the conflict, we still have a migration to 18.0 of this feature and the PR is closed although it is a concerning feature, right?

#77

@kobros-tech
Copy link
Contributor Author

@etobella
@pedrobaeza

Are we ready now?

@pedrobaeza
Copy link
Member

@etobella you tell us

@etobella
Copy link
Member

When I download the file from here:

image

The file is downloaded without an extension.

image

Comment on lines +206 to +217
attachment = (
request.env["ir.attachment"]
.sudo()
.search(
[
("res_model", "=", "sign.oca.request"),
("res_id", "=", sign_request.id),
("res_field", "=", "data"),
],
limit=1,
)
)
Copy link
Member

Choose a reason for hiding this comment

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

IMO, I think an attachment_id store=False field should be created with this domain in sign.oca.request.signer to simplify the code https://github.com/OCA/sign/blob/16.0/sign_oca/models/sign_oca_request.py#L289

Furthermore, I believe that the portal_download_signed() method is unnecessary because it could be used for the download /web/content/{attachment_id} url (something that the web allows: https://github.com/odoo/odoo/blob/215ad0e1c7d74f919c646e40ed23c0bb12cee034/addons/web/controllers/binary.py#L65).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@victoralmau

I did not understand what do you mean in the first sentence, can you explain more the difference and the requested change, please?

@kobros-tech
Copy link
Contributor Author

@victoralmau

return request.redirect(
f"/web/content/{attachment.id}?download=true&filename={utf8_filename}"
)

using this line is very nice but the module was not compatable with it, if I use it I need access_token value for the attachment or for the sign.oca.request.signer or sign.oca.request but sign.oca.request has no field access_token but has attachment

and sign.oca.request.signer has access_token but does not have attachment

@xaviedoanhduy
Copy link

xaviedoanhduy commented Oct 1, 2025

using this line is very nice but the module was not compatable with it, if I use it I need access_token value for the attachment or for the sign.oca.request.signer or sign.oca.request but sign.oca.request has no field access_token but has attachment

hi @kobros-tech, you can get access_token from generate_access_token() function from attachment created above
https://github.com/odoo/odoo/blob/e8d4873ecf27d10399b67b62a03cce6c47a2f69b/addons/mass_mailing/models/mailing.py#L1404

@kobros-tech
Copy link
Contributor Author

@xaviedoanhduy
@victoralmau
@pedrobaeza
@etobella

now the suggestions are added and no issue with access, thanks xaviedoanhduy

@kobros-tech
Copy link
Contributor Author

hello?
@etobella

@kobros-tech kobros-tech force-pushed the 16.0-imp-sign_oca-3 branch 2 times, most recently from 1af21a1 to 32214d3 Compare November 4, 2025 12:10
@kobros-tech
Copy link
Contributor Author

I am waiting for celebrating the merge!

@etobella
Copy link
Member

etobella commented Nov 5, 2025

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-86-by-etobella-bump-minor, awaiting test results.

@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at e9cf05c. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit 8d964cc into OCA:16.0 Nov 5, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants