The line being deleted in this revision looks to have been useful when it was introduced in this commit:36fc910As 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...