Do not call write with no parameters
fifo_moves could be empty and so be also to_write but calling write without parameter is not allowed. This was introduced in changeset 8237f9e3afaf issue6196 review33811002
This commit is contained in:
@@ -71,7 +71,8 @@ class Move:
|
||||
to_write.extend(([self.__class__(move.id)], {
|
||||
'fifo_quantity': new_quantity,
|
||||
}))
|
||||
self.__class__.write(*to_write)
|
||||
if to_write:
|
||||
self.__class__.write(*to_write)
|
||||
|
||||
if Decimal(str(consumed_qty)) != Decimal("0"):
|
||||
cost_price = cost_price / Decimal(str(consumed_qty))
|
||||
|
||||
Reference in New Issue
Block a user