-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
[MIG][website_sale_require_legal] Migrate to v10 #205
Conversation
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.
- Go to runbot (don't make login)
- Buy and ipad
- Fill the form
- You will see field "Country" cannot be modified + as is a mandatory field you cannot continue buying
Please fix, thanks!
@yajo it doesnt' work as expected check #205 (review) |
It should work now. |
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.
Tested on runbot
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.
Tested on runbot 👍
</template> | ||
|
||
<template id="address" inherit_id="website_sale.address"> | ||
<xpath expr="//div[@class='clearfix'][last()]" position="before"> |
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.
Maybe if you put it after or add another clearfix
before the legal block it wouldn't hide the country selector.
@rafaelbn please re-review |
Hi @yajo , rebuilding runbot for testing! Test are pending isn't it? Thanks! |
This has tests now |
Travis is failing |
The tour wasn't being loaded, let's see now. |
Still red. |
@yajo Travis is still red. Maybe a rebase? |
f10a2c6
to
a780d3a
Compare
Rebased. |
This is still in red |
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.
Thanks but travis is stilll 🔴
If travis 💚 @yajo merge! |
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.
Just wondering if it's been considered, but address page won't appear for connected user with an address already existing. Shouldn't the acceptance checkbox be moved to 'checkout' or 'payment' page ?
Or at least state this in the README ?
<odoo> | ||
|
||
<template id="accept_input"> | ||
<div t-attf-class="form-group col-md-12 #{'has-error' if error.get('accepted_legal_terms') 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.
if error.get(...)
should be if error and error.get(..)
to avoid following rendering error :
QWebException: 'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/opt/odoo/src/odoo/addons/base/ir/ir_qweb/qweb.py", line 315, in _compiled_fn return compiled(self, append, values, options, log) File "<template>", line 1, in template_website_sale_require_legal_accept_input_50 AttributeError: 'NoneType' object has no attribute 'get' Error to render compiling AST AttributeError: 'NoneType' object has no attribute 'get' Template: website_sale_require_legal.accept_input Path: /templates/t/div Node: <div t-attf-class="form-group col-md-12 #{'has-error' if error.get('accepted_legal_terms') else ''}"> <label for="accepted_legal_terms" class="control-label"> <input type="checkbox" name="accepted_legal_terms" id="accepted_legal_terms" required="required" data-oe-id="1617" data-oe-model="ir.ui.view" data-oe-field="arch" data-oe-xpath="/t[1]/div[1]/label[1]/input[1]"/> <t t-call="website_legal_page.acceptance_full"/> </label> </div>
I opened Tecnativa#3 as it's blocking for us 😉
@grindtildeath do you give your approval here then? |
@pedrobaeza I tried it out on runbot without our customization, and to me the module doesn't work as expected, since you can place an order without having to accept explicitly. |
Not really, as with new GDPR, giving your address and clicking on continue, is registering personal information, so we need the legal page here. |
0a057fd
to
c925bda
Compare
It should go 💚 now. It turns out that on v10, tour matches must be case sensitive. |
@yajo this is still not GDPR compliance as metadata of acceptance is not stored in the customer. Please review. Thanks |
This matter has been double-checked with Lawyer and this approach is valid and legal. About your @grindtildeath doubt
This happens when the customer is already registered so he/she has accepted the terms before. If you change terms, then you should inform to all customers in other way. But not, is not needed to put another checkbox. Said that, it could be an improvement to allow more options in this module but we cannot afford this now because the main objective it migrating this module with GDPR compliance approach which is in the form when user fill the personal data and accept legal advice and term and conditions of the ecommerce. Please @chienandalu finish this PR with the metadata info Thanks |
@rafaelbn Again, I understand your point of view and the goal is legit, but I persist in thinking you need to reconsider the name of the module as well as its description. As I don't want to block your work, I see two easy solutions :
Don't you think that would make it much easier for who wants to use this module ? |
OK, we will add it to the know issues / roadmap section, as the technical name is correct due to the dependencies and this module is already in several versions with this name. |
OK, let's go with This modules was needed before GDPR (comes from 2016 in v8), this is for improving it making it GDPR compliance. @grindtildeath I really thank for you point of view (22 days ago #205 (review)) which make me to call and write some emails to be sure with several opinions (outsite Tecnativa, outside Odoo software). This make me be sure, really sure on what we make. Asking Lawyers, Ecommerce Manager and trying some other ecommerce that are not Odoo but Prestashop o Magento. 😄 Really we want the best solution 👍 IMHO:
Said that, please send me 2 or 3 ecommerce in EU to test them in both, legal and terms of use cases. Thanks |
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.
Tested in runbot. After filling the form http://3327035-205-68b4d3.runbot2.odoo-community.org/shop/address and click next you get
500: Internal Server Error
) | ||
) | ||
partner_id = request.env['res.partner'].browse(res) | ||
partner_id.message_post(body=metadata) |
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 imagine this message should be of type log. Don't you need to specify that? We don't want this to reach the buyer, right?
68b4d38
to
9e6007b
Compare
@rafaelbn I couldn't reproduce your error. Can you detail STR? |
"version": "10.0.1.0.0", | ||
"category": "Website", | ||
"website": "https://www.tecnativa.com", | ||
"author": "Tecnativa, " |
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.
'website': 'https://github.com/OCA/e-commerce',
@rafaelbn Can you test again? |
I don't know why LINT is failing now 😕 |
this should be the cause (we have stricter rules now for RST). |
Right! Fix here: #234 |
5d41aac
to
ef3cc2a
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.
Tested 👍
Hello @grindtildeath ,
For your need you have an standard functionality. You don't need this module. Regards cc @yajo @carlosdauden @sergio-teruel @chienandalu @pedrobaeza |
Yes, I think it too... |
Normal migration.
@Tecnativa