Skip to content

Commit

Permalink
[FIX] budget_control_expense: no return tax line
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed Sep 24, 2024
1 parent a19d3f2 commit 561ee88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion budget_control/models/budget_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ def check_budget_precommit(self, doclines, doc_type="account"):
if budget_move:
budget_moves.append(budget_move)
# Update database, so we can check budget with query
budget_move.flush_model()
if budget_move:
budget_move.flush_model()
# Check Budget
self.env["budget.period"].check_budget(doclines, doc_type=doc_type)
# Remove commits
Expand Down
2 changes: 1 addition & 1 deletion budget_control_expense/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Budget Control on Expense",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"license": "AGPL-3",
"author": "Ecosoft, Odoo Community Association (OCA)",
"website": "https://github.com/ecosoft-odoo/budgeting",
Expand Down
3 changes: 2 additions & 1 deletion budget_control_expense/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def uncommit_expense_budget(self):
Expense = self.env["hr.expense"]
for ml in self:
inv_state = ml.move_id.state
if not ml.move_id.expense_sheet_id:
# Skip if not expense or tax line
if not ml.move_id.expense_sheet_id or ml.display_type == "tax":
continue
if inv_state == "posted":
expense = ml.expense_id.filtered("amount_commit")
Expand Down

0 comments on commit 561ee88

Please sign in to comment.