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