Skip to content
Snippets Groups Projects
Commit ff5e7a74 authored by Jamin Shah's avatar Jamin Shah Committed by Martin Trigaux
Browse files

[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
parent 89501535
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment