minor fix
This commit is contained in:
parent
a46568c798
commit
94194da39d
|
@ -1 +0,0 @@
|
|||
,presik,presik,23.09.2023 12:38,file:///home/presik/.config/libreoffice/4;
|
2
stock.py
2
stock.py
|
@ -93,7 +93,7 @@ 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:
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue