Merge pull request #31977 from ruthra-kumar/ar_ap_report_filter_on_party_type

fix: restrict party types to Supplier/Customer for AR/AP report
This commit is contained in:
ruthra kumar 2022-08-25 16:19:50 +05:30 committed by GitHub
commit 902797d0f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -731,6 +731,7 @@ class ReceivablePayableReport(object):
def prepare_conditions(self): def prepare_conditions(self):
self.qb_selection_filter = [] self.qb_selection_filter = []
party_type_field = scrub(self.party_type) party_type_field = scrub(self.party_type)
self.qb_selection_filter.append(self.ple.party_type == self.party_type)
self.add_common_filters(party_type_field=party_type_field) self.add_common_filters(party_type_field=party_type_field)