[FIX] website_sale_options: Total in shopping cart
The unit price of each option of a product must be recompute when the quantity of the product changes.
This commit is contained in:
parent
08d69774b0
commit
0687a5e67d
|
@ -48,13 +48,11 @@ class sale_order(osv.Model):
|
|||
})
|
||||
|
||||
# select linked product
|
||||
option_ids = [l.id for l in so.order_line if l.linked_line_id.id == line.id]
|
||||
option_ids = [l for l in so.order_line if l.linked_line_id.id == line.id]
|
||||
|
||||
if option_ids:
|
||||
# update line
|
||||
sol.write(cr, SUPERUSER_ID, option_ids, {
|
||||
'product_uom_qty': value.get('quantity')
|
||||
}, context=context)
|
||||
# update line
|
||||
for l in option_ids:
|
||||
super(sale_order, self)._cart_update(cr, uid, ids, l.product_id.id, l.id, add_qty, set_qty, context=context, **kwargs)
|
||||
|
||||
value['option_ids'] = option_ids
|
||||
value['option_ids'] = [l.id for l in option_ids]
|
||||
return value
|
||||
|
|
Loading…
Reference in New Issue