From fcdb50ae3b5beb5f990fd951239861d0cab3e73d Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 21 Feb 2017 19:37:57 +0100 Subject: [PATCH] [FIX] website_sale: "Ship to the same address" - Create a partner with an invoicing and a delivery address. - Connect to the website as this partner, create an order - In the "Shipping & Billing" page, the delivery address is selected automatically. Change and set to "Ship to the same address", and confirm. The "Ship To" address is still the delivery address, while it should be the same than the "Bill To" address. This reintroduces the v8 behavior: `order_info.update(partner_shipping_id=checkout.get('shipping_id') or partner_id)` https://github.com/odoo/odoo/blob/8.0/addons/website_sale/controllers/main.py#L623 --- addons/website_sale/controllers/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 8c81dcfa2a4..e7820976747 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -640,11 +640,10 @@ class website_sale(http.Controller): shipping_info['lang'] = partner_lang shipping_info['parent_id'] = partner_id checkout['shipping_id'] = orm_partner.create(cr, SUPERUSER_ID, shipping_info, context) - if checkout.get('shipping_id'): - order.write({'partner_shipping_id': checkout['shipping_id']}) order_info = { 'message_partner_ids': [(4, partner_id), (3, request.website.partner_id.id)], + 'partner_shipping_id': checkout.get('shipping_id') or partner_id, } order_obj.write(cr, SUPERUSER_ID, [order.id], order_info, context=context)