[FIX] website_sale_delivery: unset delivery line before update

When removing the last line (apart from the delivery line) from the
cart, it is necessary to remove the delivery line before updating
the cart; otherwise the carrier is contacted with a 0 weight order
and crashes.
This commit is contained in:
Damien Bouvy
2016-05-06 13:07:26 +02:00
parent 3cdcc670fc
commit e4e1e571c2
@@ -160,6 +160,7 @@ class SaleOrder(orm.Model):
def _cart_update(self, cr, uid, ids, product_id=None, line_id=None, add_qty=0, set_qty=0, context=None, **kwargs):
""" Override to update carrier quotation if quantity changed """
self._delivery_unset(cr, uid, ids, context=context)
values = super(SaleOrder, self)._cart_update(
cr, uid, ids, product_id, line_id, add_qty, set_qty, context, **kwargs)