fix: include cost_center and project upon accounting dimension fetch

(cherry picked from commit 4680295303)
This commit is contained in:
l0gesh29
2025-11-04 18:30:53 +05:30
committed by Mergify
parent b545b69e4b
commit 3f490f11d5
2 changed files with 3 additions and 3 deletions

View File

@@ -309,8 +309,8 @@ def get_dimensions(with_cost_center_and_project=False):
if with_cost_center_and_project:
dimension_filters.extend(
[
{"fieldname": "cost_center", "document_type": "Cost Center"},
{"fieldname": "project", "document_type": "Project"},
frappe._dict({"fieldname": "cost_center", "document_type": "Cost Center"}),
frappe._dict({"fieldname": "project", "document_type": "Project"}),
]
)

View File

@@ -72,7 +72,7 @@ class PaymentReconciliation(Document):
self.common_filter_conditions = []
self.accounting_dimension_filter_conditions = []
self.ple_posting_date_filter = []
self.dimensions = get_dimensions()[0]
self.dimensions = get_dimensions(with_cost_center_and_project=True)[0]
def load_from_db(self):
# 'modified' attribute is required for `run_doc_method` to work properly.