[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
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user