-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
[IMP] sign_oca: Allow to store geolocalization #16
Conversation
1c2d9fa
to
fa2dc13
Compare
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
@etobella can you rebase please ? |
d8d96f7
to
b490bad
Compare
@WesleyOliveira98, could you please review? |
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.
[FUNCTIONAL REVIEW]
Create a Sign Oca Template with Ask Location enabled
Testing on Runboat (which uses HTTP), the browser blocks geolocation retrieval. This is a standard security restriction for pages not served over HTTPS. As a result, it consistently returns an error.
TypeError: Cannot read properties of undefined (reading 'latitude')
at SignOcaPdfPortal._onClickSign (http://oca-sign-16-0-pr16-b490badf47d5.runboat.odoo-community.org/web/assets/212-b5b3804/web.assets_frontend.min.js:9355:80)
To work around this, I had to run Chrome with the following command (using Ubuntu):
google-chrome --unsafely-treat-insecure-origin-as-secure="http://oca-sign-16-0-pr16-b490badf47d5.runboat.odoo-community.org/" --user-data-dir=/tmp/chrome_dev_test
This allowed me to enable location access for Runboat and proceed with the signing process. It worked perfectly, and the system correctly retrieved my latitude and longitude.
And then, i reopened Chrome with the flags and blocked the site from accessing the geolocation, which resulted in the same error as before.
sign_oca/static/src/components/sign_oca_pdf/sign_oca_pdf.esm.js
Outdated
Show resolved
Hide resolved
sign_oca/static/src/components/sign_oca_pdf_portal/sign_oca_pdf_portal.esm.js
Outdated
Show resolved
Hide resolved
b490bad
to
22eb5b9
Compare
@WesleyOliveira98 Comments attended |
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
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
sign_oca/static/src/components/sign_oca_pdf/sign_oca_pdf.esm.js
Outdated
Show resolved
Hide resolved
22eb5b9
to
ca4c5a3
Compare
/ocabot merge major |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 91c232a. Thanks a lot for contributing to OCA. ❤️ |
Using geolocalization can be useful in order to prove the authorship of the signature