feat: inventory dimension for rejected materials (backport #44156) (#44165)

feat: inventory dimension for rejected materials (#44156)

(cherry picked from commit 9bf16df41e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-11-15 17:28:41 +05:30
committed by GitHub
parent 725d107288
commit d61f696f85
3 changed files with 58 additions and 6 deletions

View File

@@ -839,6 +839,15 @@ class StockController(AccountsController):
if not dimension:
continue
if (
self.doctype in ["Purchase Invoice", "Purchase Receipt"]
and row.get("rejected_warehouse")
and sl_dict.get("warehouse") == row.get("rejected_warehouse")
):
fieldname = f"rejected_{dimension.source_fieldname}"
sl_dict[dimension.target_fieldname] = row.get(fieldname)
continue
if self.doctype in [
"Purchase Invoice",
"Purchase Receipt",