[IMP] website_sale : avoid duplicated order lines

Add line id to while calling _cart_update() from sale_get_order()
The missing line_id parametre was making the _cart_find_product_line() call to fail as it was linked to an option while searching for lines without options (making the method recreate new lines).
Fixes #2573
This commit is contained in:
Jamin Shah 2014-09-24 12:36:42 +05:30 committed by Martin Trigaux
parent 8950153555
commit ff5e7a749c
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ class website(orm.Model):
values.update(sale_order.onchange_pricelist_id(pricelist_id, None)['value'])
sale_order.write(values)
for line in sale_order.order_line:
sale_order._cart_update(product_id=line.product_id.id, add_qty=0)
sale_order._cart_update(product_id=line.product_id.id, line_id=line.id, add_qty=0)
# update browse record
if (code and code != sale_order.pricelist_id.code) or sale_order.partner_id.id != partner.id: