[FIX] website_sale: apply reduction code
authorDenis Ledoux <dle@odoo.com>
Fri, 21 Nov 2014 14:51:54 +0000 (15:51 +0100)
committerDenis Ledoux <dle@odoo.com>
Fri, 21 Nov 2014 14:56:37 +0000 (15:56 +0100)
The line being deleted in this revision looks to have been useful when it was introduced in this commit:
36fc910

As the sale order was updated right away through the update_pricelist method
But since this rev. 22f4c31, the sale order is updated later, and reset the sale_order_code_pricelist_id value in the session right after setting it prevent to apply the pricelist of the promotional code...

addons/website_sale/models/sale_order.py

index 6b329a1..5e62c29 100644 (file)
@@ -158,7 +158,6 @@ class website(orm.Model):
                     pricelist_id = pricelist_ids[0]
                     request.session['sale_order_code_pricelist_id'] = pricelist_id
                     update_pricelist = True
-                request.session['sale_order_code_pricelist_id'] = False
 
             pricelist_id = request.session.get('sale_order_code_pricelist_id') or partner.property_product_pricelist.id