Skip to content

Commit

Permalink
[FIX] stock_inventory: only set to done adjustment if there is an adj…
Browse files Browse the repository at this point in the history
…ustment
  • Loading branch information
JoanSForgeFlow committed Apr 24, 2024
1 parent 0136490 commit 8e67edf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stock_inventory/models/stock_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def _apply_inventory(self):
}
)
rec.to_do = False
if self.env.company.stock_inventory_auto_complete:
adjustment.action_auto_state_to_done()
if adjustment and self.env.company.stock_inventory_auto_complete:
adjustment.action_auto_state_to_done()
return res

def _get_inventory_fields_write(self):
Expand Down

0 comments on commit 8e67edf

Please sign in to comment.