parent
8878661b14
commit
b4da9536ec
|
@ -86,6 +86,9 @@ class GalateaUser(metaclass=PoolMeta):
|
|||
to_save = []
|
||||
with Transaction().set_context(context):
|
||||
for line in lines:
|
||||
if not line.party:
|
||||
line.party = user.party
|
||||
|
||||
prices = Product.get_sale_price([line.product], line.quantity or 0)
|
||||
price = prices[line.product.id]
|
||||
|
||||
|
@ -95,6 +98,9 @@ class GalateaUser(metaclass=PoolMeta):
|
|||
else:
|
||||
line.unit_price = price
|
||||
|
||||
# recalculate line data (taxes,...)
|
||||
line.on_change_product()
|
||||
|
||||
to_save.append(line)
|
||||
|
||||
if to_save:
|
||||
|
|
Loading…
Reference in New Issue