Do not create accounting move for period without method when updating product cost price
issue11393 review411611003
This commit is contained in:
+4
-2
@@ -221,8 +221,10 @@ class Product(metaclass=PoolMeta):
|
||||
amount = company.currency.round(
|
||||
Decimal(str(quantity)) * difference)
|
||||
if amount:
|
||||
moves.append(product._update_cost_price_move(
|
||||
amount, company))
|
||||
move = product._update_cost_price_move(
|
||||
amount, company)
|
||||
if move.period.fiscalyear.account_stock_method:
|
||||
moves.append(move)
|
||||
Move.save(moves)
|
||||
Move.post(moves)
|
||||
super().update_cost_price(costs)
|
||||
|
||||
Reference in New Issue
Block a user