From 8416dc713c5197f71ea5deae2794bee1e10dfe0b Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Thu, 31 Mar 2022 14:36:26 +0530 Subject: [PATCH] fix: unexpected keyword argument 'pluck' --- erpnext/controllers/accounts_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 61db921f9cc..0dbff48f02a 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1269,8 +1269,10 @@ class AccountsController(TransactionBase): item_codes = list(set(item.item_code for item in self.get("items"))) if item_codes: stock_items = frappe.db.get_values( - "Item", {"name": ["in", item_codes], "is_stock_item": 1}, pluck="name", cache=True + "Item", {"name": ["in", item_codes], "is_stock_item": 1}, as_dict=True, cache=True ) + if stock_items: + stock_items = [d.get("name") for d in stock_items] return stock_items