minor fix

This commit is contained in:
wilsongomez 2022-04-28 10:54:03 -05:00
parent 001bfac455
commit 0ceed608ed
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class Move(metaclass=PoolMeta):
def do(cls, moves):
super(Move, cls).do(moves)
for move in moves:
if move.origin.__name__ in ('purchase.line', 'stock.inventory.line'):
if move.origin and move.origin.__name__ in ('purchase.line', 'stock.inventory.line'):
move.set_average_cost()
def set_average_cost(self):