blooparksystems / website

Odoo Website builder related addons
GNU Affero General Public License v3.0
10 stars 33 forks source link

10.0 wip website sale osc #73

Closed reinka closed 7 years ago

reinka commented 7 years ago

Migrated v8 OSC to v10.

Additional major changes:

rruebner commented 7 years ago

@reinka In general it works like expected (we already test it). But because of our future approach to provide an e-commerce suite I think we should remove 2 parts of this module and create two separate modules. Part 1 is the terms and condition handling, here we already have an internal ticket. Part 2 is the country selection limitation, I will create an internal ticket for it.

Next to the commented parts above please consider the following points:

rruebner commented 7 years ago

@reinka Besides of some minor issues please look at the following points.

Replace "website_sale_one_step_checkout/static/description/icon.png" and "website_sale_one_step_checkout_delivery/static/description/icon.png" with https://github.com/blooparksystems/website/blob/8.0/website_compress_html/static/description/icon.png to avoid image distortion.

Can you check some "strange" behaviour. Maybe it is OK, maybe not. If I complete a checkout I see the line "/shop/payment/get_status/12" 5 times in the server log before the checkout success page is loaded. I would say that line should be logged only once. Below you see the server log after I cklick on "Pay now".

2017-03-13 08:55:08,484 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:08] "POST /shop/checkout/validate_address_form HTTP/1.1" 200 -
2017-03-13 08:55:08,541 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:08] "POST /shop/checkout/proceed_payment/ HTTP/1.1" 200 -
2017-03-13 08:55:08,587 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:08] "POST /shop/payment/transaction/5 HTTP/1.1" 200 -
2017-03-13 08:55:08,602 2865 INFO test_osc odoo.addons.payment_transfer.controllers.main: Beginning form_feedback with post data {'amount': u'60.32',
 'csrf_token': u'b600aac43ff97aba1938556a016196ca89f4e81bo1489398908',
 'currency': u'USD',
 'reference': u'SO011',
 'return_url': u'/shop/payment/validate'}
2017-03-13 08:55:08,608 2865 INFO test_osc odoo.addons.payment_transfer.models.payment: Validated transfer payment for tx SO011: set as pending
2017-03-13 08:55:08,610 2865 INFO test_osc odoo.addons.website_portal_sale.models.payment: <transfer> transaction processed: tx ref:SO011, tx amount: 60.32
2017-03-13 08:55:08,612 2865 INFO test_osc odoo.addons.website_portal_sale.models.payment: <transfer> transaction pending/to confirm manually, sending quote email for order SO011 (ID 12)
2017-03-13 08:55:08,803 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:08] "POST /longpolling/poll HTTP/1.1" 200 -
2017-03-13 08:55:09,668 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:09] "POST /payment/transfer/feedback HTTP/1.1" 302 -
2017-03-13 08:55:09,693 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:09] "GET /shop/payment/validate HTTP/1.1" 302 -
2017-03-13 08:55:09,786 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:09] "GET /shop/confirmation HTTP/1.1" 200 -
2017-03-13 08:55:09,857 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:09] "POST /web/dataset/call_kw/web_tour.tour/get_consumed_tours HTTP/1.1" 200 -
2017-03-13 08:55:09,883 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:09] "POST /web/dataset/call HTTP/1.1" 200 -
2017-03-13 08:55:09,992 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:09] "POST /web/dataset/call HTTP/1.1" 200 -
2017-03-13 08:55:10,079 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:10] "POST /web/dataset/call HTTP/1.1" 200 -
2017-03-13 08:55:10,708 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:10] "POST /shop/payment/get_status/12 HTTP/1.1" 200 -
2017-03-13 08:55:10,711 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:10] "POST /web/dataset/call_kw/web.planner/search_read HTTP/1.1" 200 -
2017-03-13 08:55:10,719 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:10] "POST /shop/tracking_last_order/ HTTP/1.1" 200 -
2017-03-13 08:55:10,738 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:10] "POST /website/translations HTTP/1.1" 200 -
2017-03-13 08:55:10,766 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:10] "POST /web/dataset/call_kw/web.planner/render HTTP/1.1" 200 -
2017-03-13 08:55:11,732 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:11] "POST /shop/payment/get_status/12 HTTP/1.1" 200 -
2017-03-13 08:55:12,752 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:12] "POST /shop/payment/get_status/12 HTTP/1.1" 200 -
2017-03-13 08:55:13,771 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:13] "POST /shop/payment/get_status/12 HTTP/1.1" 200 -
2017-03-13 08:55:14,792 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:14] "POST /shop/payment/get_status/12 HTTP/1.1" 200 -
2017-03-13 08:55:15,813 2865 INFO test_osc werkzeug: 10.0.0.1 - - [13/Mar/2017 08:55:15] "POST /shop/payment/get_status/12 HTTP/1.1" 200 -
reinka commented 7 years ago

If I complete a checkout I see the line "/shop/payment/get_status/12" 5 times in the server log before the checkout success page is loaded. I would say that line should be logged only once.

I checked the checkout process with both OSC deactivated and the OSC modules uninstalled. That line is still 5x present, so it seems to be Odoo's default behaviour

rruebner commented 7 years ago

@reinka I found some code styling issues and still one case that you are redirected to the shop instead of the confirmation page after the checkout.

Code styling issues:

Wrong redirect:

  1. tested with admin user (both modules are installed)
  2. go to shop page and put one "Apple In-Ear Kopfhörer" in cart
  3. got to checkout from cart page, click on "change" to go back to the cart and remove the product
  4. go to shop page and put one "Apple Wireless Keyboard" in cart
  5. complete checkout without changing payment or delivery
  6. after checkout you are redirected to shop page instead of checkout confirmation page
jholze commented 7 years ago

@reinka just a question, did you checked that the checkout also works in a multi website environment ? even all the redirects etc. ?

rruebner commented 7 years ago

@reinka All fine now except of the travis errors. We should fix them now because we have to do it when we provide a PR for the OCA at the latest.

rruebner commented 7 years ago

@reinka Well done. :+1: Just some small replacements left.