fix: minor issue

(cherry picked from commit b60c57a97dee1ab1a2b1654d4cc2d146e0141ff2)
This commit is contained in:
vishal 2023-10-27 11:22:55 +05:30 committed by Mergify
parent fff294fb37
commit 24be04427c

View File

@ -841,7 +841,11 @@ class ReceivablePayableReport(object):
if self.filters.get("customer_group"):
groups = get_customer_group_with_children(self.filters.customer_group)
customers = qb.from_(self.customer).select(self.customer.name).where(self.customer['customer_group'].isin(groups))
customers = (
qb.from_(self.customer)
.select(self.customer.name)
.where(self.customer["customer_group"].isin(groups))
)
self.qb_selection_filter.append(self.ple.party.isin(customers))
if self.filters.get("territory"):
@ -1135,6 +1139,7 @@ class ReceivablePayableReport(object):
)
self.err_journals = [x[0] for x in results] if results else []
def get_customer_group_with_children(customer_groups):
if not isinstance(customer_groups, list):
customer_groups = [d.strip() for d in customer_groups.strip().split(",") if d]