minor fix in move do
This commit is contained in:
parent
63ebe591fa
commit
82468fdcd8
12
stock.py
12
stock.py
|
@ -94,12 +94,12 @@ class Move(metaclass=PoolMeta):
|
|||
product.cost_price = move.unit_price
|
||||
product.save()
|
||||
move.set_average_cost()
|
||||
if hasattr(product, 'standard_margin') and product.standard_margin and product.standard_margin > 0 and move.product.cost_price > 0:
|
||||
template = product.template
|
||||
percentage_calculation = round(move.product.cost_price * Decimal(move.product.standard_margin/100), 4)
|
||||
template.list_price = product.cost_price + percentage_calculation
|
||||
template.on_change_list_price()
|
||||
template.save()
|
||||
if hasattr(product, 'standard_margin') and product.standard_margin and product.standard_margin > 0 and move.product.cost_price > 0:
|
||||
template = product.template
|
||||
percentage_calculation = round(move.product.cost_price * Decimal(move.product.standard_margin/100), 4)
|
||||
template.list_price = product.cost_price + percentage_calculation
|
||||
template.on_change_list_price()
|
||||
template.save()
|
||||
|
||||
def set_average_cost(self):
|
||||
AverageCost = Pool().get('product.average_cost')
|
||||
|
|
Loading…
Reference in New Issue