Skip to content
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

Merged
merged 6 commits into from
Jun 1, 2018

Conversation

yajo
Copy link
Member

@yajo yajo commented Sep 6, 2017

Normal migration.

@Tecnativa

@yajo yajo self-assigned this Sep 6, 2017
@yajo yajo added this to the 10.0 milestone Sep 6, 2017
@rafaelbn rafaelbn self-requested a review September 6, 2017 11:01
Copy link
Member

@rafaelbn rafaelbn left a 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!

@rafaelbn
Copy link
Member

rafaelbn commented Sep 6, 2017

@yajo it doesnt' work as expected check #205 (review)

@yajo
Copy link
Member Author

yajo commented Sep 7, 2017

It should work now.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Tested on runbot

Copy link
Member

@chienandalu chienandalu left a 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">
Copy link
Member

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.

@yajo
Copy link
Member Author

yajo commented Sep 8, 2017

@rafaelbn please re-review

@rafaelbn
Copy link
Member

rafaelbn commented Oct 8, 2017

Hi @yajo , rebuilding runbot for testing! Test are pending isn't it? Thanks!

@pedrobaeza pedrobaeza mentioned this pull request Oct 26, 2017
15 tasks
@yajo
Copy link
Member Author

yajo commented Oct 27, 2017

This has tests now

@pedrobaeza
Copy link
Member

Travis is failing

@yajo
Copy link
Member Author

yajo commented Nov 30, 2017

The tour wasn't being loaded, let's see now.

@pedrobaeza
Copy link
Member

Still red.

@pedrobaeza
Copy link
Member

@yajo Travis is still red. Maybe a rebase?

@yajo yajo force-pushed the 10.0-website_sale_require_legal branch from f10a2c6 to a780d3a Compare March 27, 2018 11:45
@yajo
Copy link
Member Author

yajo commented Mar 27, 2018

Rebased.

@pedrobaeza
Copy link
Member

This is still in red

Copy link
Member

@rafaelbn rafaelbn left a 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 🔴

@rafaelbn
Copy link
Member

rafaelbn commented Apr 27, 2018

If travis 💚 @yajo merge!

Copy link
Contributor

@grindtildeath grindtildeath left a 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 ''}">
Copy link
Contributor

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 😉

@pedrobaeza
Copy link
Member

@grindtildeath do you give your approval here then?

@grindtildeath
Copy link
Contributor

grindtildeath commented May 3, 2018

@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.
IMO the validation checkbox should appear on the payment page, because we need legal things to be confirmed to place an order, and not to enter any address....

@pedrobaeza
Copy link
Member

Not really, as with new GDPR, giving your address and clicking on continue, is registering personal information, so we need the legal page here.

@yajo yajo force-pushed the 10.0-website_sale_require_legal branch from 0a057fd to c925bda Compare May 15, 2018 10:27
@yajo
Copy link
Member Author

yajo commented May 15, 2018

It should go 💚 now.

It turns out that on v10, tour matches must be case sensitive.

@rafaelbn
Copy link
Member

@yajo this is still not GDPR compliance as metadata of acceptance is not stored in the customer. Please review. Thanks

@rafaelbn
Copy link
Member

This matter has been double-checked with Lawyer and this approach is valid and legal.

About your @grindtildeath doubt

you'll skip the checkbox and can register an order without having to explicitly accept the conditions

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

@grindtildeath
Copy link
Contributor

@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.
For example, if this module is called website_gdpr_compliance, or website_address_registration_require_legal, or anything which is not what it is actually, I have no issues with it.
But IMO my point still stands, that is : website_sale_require_legal is misleading, because acceptance of legal stuff is required to register information and not to register a sale order.

As I don't want to block your work, I see two easy solutions :

  • Use a module name which is closer to what the module does
    or
  • At the very least explain this loophole in the issues roadmap section of the readme.

Don't you think that would make it much easier for who wants to use this module ?

@pedrobaeza
Copy link
Member

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.

@rafaelbn
Copy link
Member

OK, let's go with At the very least explain this loophole in the issues roadmap section of the readme.

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:

  • The module name is correct as it requires accept legal advice.
  • The module is missing (in you opinion) is a new one called website_sale_require_term_of_use which apply in the Payment doesn't need yo have a checkbox. Just a text bellow (see Amazon example when I'm already registered)

term_of_use

Said that, please send me 2 or 3 ecommerce in EU to test them in both, legal and terms of use cases.

Thanks

Copy link
Member

@rafaelbn rafaelbn left a 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)
Copy link
Member Author

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?

@chienandalu chienandalu force-pushed the 10.0-website_sale_require_legal branch from 68b4d38 to 9e6007b Compare May 28, 2018 15:00
@chienandalu
Copy link
Member

@rafaelbn I couldn't reproduce your error. Can you detail STR?

@rafaelbn
Copy link
Member

"version": "10.0.1.0.0",
"category": "Website",
"website": "https://www.tecnativa.com",
"author": "Tecnativa, "
Copy link

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',

@chienandalu
Copy link
Member

@rafaelbn Can you test again?

@chienandalu
Copy link
Member

I don't know why LINT is failing now 😕

@simahawk
Copy link
Contributor

simahawk commented Jun 1, 2018

@chienandalu

website_sale_wishlist/README.rst:7: [E7901(rst-syntax-error), ]  Duplicate explicit target name: "your shop".

this should be the cause (we have stricter rules now for RST).

@chienandalu
Copy link
Member

Right! Fix here: #234

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

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

Tested 👍

@rafaelbn rafaelbn merged commit d65fe8a into OCA:10.0 Jun 1, 2018
@rafaelbn rafaelbn deleted the 10.0-website_sale_require_legal branch June 1, 2018 11:22
@rafaelbn
Copy link
Member

Hello @grindtildeath ,

Shouldn't the acceptance checkbox be moved to 'checkout' or 'payment' page ?

For your need you have an standard functionality. You don't need this module.

2018-09-29_0-46-16

Regards

cc @yajo @carlosdauden @sergio-teruel @chienandalu @pedrobaeza

@sergio-teruel
Copy link
Contributor

sergio-teruel commented Sep 29, 2018

Yes, I think it too...

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.

None yet

10 participants