fix: validate accounting dimension company in Journal Entry & Stock Entry (backport #46204) (#46369)

fix: validate accounting dimension company in Journal Entry & Stock Entry (#46204)

* fix: validate accounting dimension company in journal entry and stock entry

* test: update test cases to validate company-based accounting dimension

* fix(test): ensure 'Pick List' company matches 'Delivery Note' to prevent test failures

* chore: remove redundant lines of code

(cherry picked from commit 7b6ebad9e6)

Co-authored-by: Bhavansathru <122002510+Bhavan23@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2025-03-06 18:12:06 +05:30
committed by GitHub
parent 5cc251a172
commit c816f9bd0a
9 changed files with 29 additions and 3 deletions

View File

@@ -419,7 +419,7 @@ class AccountsController(TransactionBase):
.where(doc_field.fieldname == "company")
).run(as_list=True)
dimension_list = sum(dimension_list, ["Project"])
dimension_list = sum(dimension_list, ["Project", "Cost Center"])
self.validate_company(dimension_list)
for child in self.get_all_children() or []: