Skip to content

Commit

Permalink
[FIX] budget_control: commit budget revenue case
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed Jun 7, 2024
1 parent 72d8aa2 commit 6df815f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions budget_control/models/base_budget_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ def _update_budget_commitment(self, budget_vals, reverse=False):
amount = self._get_amount_convert_currency(
budget_vals["amount_currency"], currency, company, date_commit or today
)

# NOTE: This is to handle the case of budget revenue.
if (
self._name == "account.move.line"
and self.move_id.move_type == "out_invoice"
):
reverse = True

# By default, commit date is equal to document date
# this is correct for normal case, but may require different date
# in case of budget that carried to new period/year
Expand Down

0 comments on commit 6df815f

Please sign in to comment.