[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:
parent
8950153555
commit
ff5e7a749c
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue