From 4a7d75b5cc89063b5bd230251d13598d7d51e3b6 Mon Sep 17 00:00:00 2001 From: saeedkola Date: Sat, 24 Jun 2023 19:58:31 +0530 Subject: [PATCH] fix: Set Asset cost center default as PR or PI Item Cost Center while auto creating (#35844) * fix: Set Asset cost center default as PR or PI Item Cost Center while auto creating * chore: Linting Issues --------- Co-authored-by: Deepesh Garg --- erpnext/controllers/buying_controller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 1ace3bf44f2c..04636de6406a 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -709,6 +709,7 @@ def make_asset(self, row, is_grouped_asset=False): "asset_quantity": row.qty if is_grouped_asset else 0, "purchase_receipt": self.name if self.doctype == "Purchase Receipt" else None, "purchase_invoice": self.name if self.doctype == "Purchase Invoice" else None, + "cost_center": row.cost_center, } )