fix: production plan date filters for orders (backport #39702) (#39720)

fix: production plan date filters for orders (#39702)

(cherry picked from commit 407045a1dee4d5d1e4f08f0e78871942ded9e709)

Co-authored-by: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com>
This commit is contained in:
mergify[bot] 2024-02-05 10:14:42 +05:30 committed by GitHub
parent 5fe40ac085
commit 3eac436e7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1334,10 +1334,10 @@ def get_sales_orders(self):
)
date_field_mapper = {
"from_date": self.from_date >= so.transaction_date,
"to_date": self.to_date <= so.transaction_date,
"from_delivery_date": self.from_delivery_date >= so_item.delivery_date,
"to_delivery_date": self.to_delivery_date <= so_item.delivery_date,
"from_date": so.transaction_date >= self.from_date,
"to_date": so.transaction_date <= self.to_date,
"from_delivery_date": so_item.delivery_date >= self.from_delivery_date,
"to_delivery_date": so_item.delivery_date <= self.to_delivery_date,
}
for field, value in date_field_mapper.items():