fix: production plan issue with sales order (backport #39901) (#39904)

fix:  production plan issue with sales order (#39901)

(cherry picked from commit d0df5df4a609a04d98ee97c9e56931672143587d)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot] 2024-02-14 16:58:28 +05:30 committed by GitHub
parent a548f12941
commit 88a7248888
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -652,7 +652,10 @@ class ProductionPlan(Document):
"project": self.project,
}
key = (d.item_code, d.sales_order, d.warehouse)
key = (d.item_code, d.sales_order, d.sales_order_item, d.warehouse)
if self.combine_items:
key = (d.item_code, d.sales_order, d.warehouse)
if not d.sales_order:
key = (d.name, d.item_code, d.warehouse)