Skip to content

Commit

Permalink
[FIX] budget_control_advance_clearing: reset clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed Aug 2, 2024
1 parent ceeea51 commit 839ab22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion budget_control_advance_clearing/models/hr_expense.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def write(self, vals):
"""Clearing for its Advance and Cancel payment expense"""
doc_cancel = self.filtered(lambda l: l.state == "cancel")
res = super().write(vals)
if vals.get("state") in ("approve", "cancel"):
if vals.get("state") in ("approve", "cancel", "draft"):
# If this is a clearing, return commit to the advance
advances = self.mapped("advance_sheet_id.expense_line_ids")
if advances:
Expand Down

0 comments on commit 839ab22

Please sign in to comment.