fix: inter transfer delivery note issue with batch (backport #42552) (#42556)

fix: inter transfer delivery note issue with batch (#42552)

(cherry picked from commit f620ef20ae)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-08-01 13:22:33 +05:30
committed by GitHub
parent b7b4de7c8d
commit 97cc3082e1
2 changed files with 119 additions and 1 deletions

View File

@@ -539,7 +539,9 @@ class SellingController(StockController):
def get_sle_for_source_warehouse(self, item_row):
serial_and_batch_bundle = (
item_row.serial_and_batch_bundle if not self.is_internal_transfer() else None
item_row.serial_and_batch_bundle
if not self.is_internal_transfer() or self.docstatus == 1
else None
)
if serial_and_batch_bundle and self.is_internal_transfer() and self.is_return:
if self.docstatus == 1: