Skip to content

Commit

Permalink
[FIX] domain carry forward
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed Jul 30, 2024
1 parent 842c216 commit 4504cad
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions budget_control_purchase_request/models/budget_commit_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,11 @@ def _get_document_number(self, doc):
return f"{doc.request_id._name},{doc.request_id.id}"
return super()._get_document_number(doc)

def _get_commit_docline(self, res_model):
def _get_base_domain_extension(self, res_model):
"""For module extension"""
if res_model == "purchase.request.line":
domain = self._get_base_domain()
domain.extend(
[
("analytic_account_id", "!=", False),
("request_state", "!=", "rejected"),
]
)
return self.env[res_model].search(domain)
return super()._get_commit_docline(res_model)
return " AND a.request_state != 'rejected'"
return super()._get_base_domain_extension(res_model)


class BudgetCommitForwardLine(models.Model):
Expand Down

0 comments on commit 4504cad

Please sign in to comment.