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