Stock Entry TypeError: cannot unpack non-iterable NoneType object

facing error how to resolve kindly help

App Versions

{
	"agriculture": "0.0.1",
	"changemakers": "1.0.0",
	"education": "0.0.1",
	"erpnext": "14.8.0",
	"frappe": "14.16.0",
	"healthcare": "15.0.0-dev",
	"hospitality": "0.0.1",
	"hrms": "1.0.0",
	"non_profit": "0.0.1",
	"payments": "0.0.1"
}

Route

Form/Stock Entry/MAT-STE-2023-00010

Trackeback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1587, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 21, in savedocs
    doc.submit()
  File "apps/frappe/frappe/model/document.py", line 999, in submit
    return self._submit()
  File "apps/frappe/frappe/model/document.py", line 978, in _submit
    return self.save()
  File "apps/frappe/frappe/model/document.py", line 303, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 354, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1079, in run_post_save_methods
    self.run_method("on_submit")
  File "apps/frappe/frappe/model/document.py", line 908, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1260, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1242, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 905, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 164, in on_submit
    self.make_gl_entries()
  File "apps/erpnext/erpnext/controllers/stock_controller.py", line 73, in make_gl_entries
    gl_entries = self.get_gl_entries(warehouse_account)
  File "apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 1138, in get_gl_entries
    gl_entries = super(StockEntry, self).get_gl_entries(warehouse_account)
  File "apps/erpnext/erpnext/controllers/stock_controller.py", line 164, in get_gl_entries
    self.get_gl_dict(
  File "apps/erpnext/erpnext/controllers/accounts_controller.py", line 741, in get_gl_dict
    account_currency = get_account_currency(gl_dict.account)
  File "apps/erpnext/erpnext/accounts/doctype/account/account.py", line 346, in get_account_currency
    return frappe.local_cache("account_currency", account, generator)
  File "apps/frappe/frappe/__init__.py", line 2121, in local_cache
    local.cache[namespace][key] = generator()
  File "apps/erpnext/erpnext/accounts/doctype/account/account.py", line 338, in generator
    account_currency, company = frappe.get_cached_value(
TypeError: cannot unpack non-iterable NoneType object

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"name\":\"MAT-STE-2023-00010\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":0,\"naming_series\":\"MAT-STE-.YYYY.-\",\"stock_entry_type\":\"Material Receipt\",\"purpose\":\"Material Receipt\",\"add_to_transit\":0,\"company\":\"Tesoro\",\"posting_date\":\"2023-08-29\",\"posting_time\":\"12:47:24.670251\",\"set_posting_time\":0,\"inspection_required\":0,\"from_bom\":0,\"apply_putaway_rule\":0,\"fg_completed_qty\":0,\"use_multi_level_bom\":1,\"to_warehouse\":\"Finished Goods - T\",\"total_outgoing_value\":0,\"total_incoming_value\":1650,\"value_difference\":1650,\"total_additional_costs\":0,\"letter_head\":\"Tesoro\",\"is_opening\":\"No\",\"per_transferred\":0,\"total_amount\":1650,\"is_return\":0,\"doctype\":\"Stock Entry\",\"additional_costs\":[],\"items\":[{\"name\":\"cd67d3a423\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":1,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FGS00021\",\"item_name\":\"Sandwich Club Full\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Sandwich Club Full\",\"item_group\":\"FG Snacks\",\"qty\":2,\"transfer_qty\":2,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":100,\"amount\":100,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"76d0b4ba6a\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":2,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FGS00020\",\"item_name\":\"Fry Sandwich Half\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Fry Sandwich Half\",\"item_group\":\"FG Snacks\",\"qty\":1,\"transfer_qty\":1,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":50,\"amount\":50,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"f93f14de4d\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":3,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FGS00009\",\"item_name\":\"Mini Pizza\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Mini Pizza\",\"item_group\":\"FG Snacks\",\"qty\":8,\"transfer_qty\":8,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":400,\"amount\":400,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"86d2926bb4\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":4,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FGS00008\",\"item_name\":\"Single Slice Pizza\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Single Slice Pizza\",\"item_group\":\"FG Snacks\",\"qty\":6,\"transfer_qty\":6,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":300,\"amount\":300,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"daea421cfb\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":5,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FGS00005\",\"item_name\":\"Herb Roll\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Herb Roll\",\"item_group\":\"FG Snacks\",\"qty\":2,\"transfer_qty\":2,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":100,\"amount\":100,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"43afd802af\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":6,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FBR00017\",\"item_name\":\"Plain Bread Small\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Plain Bread Small\",\"item_group\":\"FG Bread & Rusk\",\"qty\":2,\"transfer_qty\":2,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":100,\"amount\":100,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"806024ba4f\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":7,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FBR00018\",\"item_name\":\"Milky Bread Large\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Milky Bread Large\",\"item_group\":\"FG Bread & Rusk\",\"qty\":2,\"transfer_qty\":2,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":100,\"amount\":100,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"e2f49e19e6\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":8,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FBR00016\",\"item_name\":\"Milky Bread Small\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Milky Bread Small\",\"item_group\":\"FG Bread & Rusk\",\"qty\":5,\"transfer_qty\":5,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":250,\"amount\":250,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"},{\"name\":\"42c229108e\",\"owner\":\"prince_sohaib@yahoo.com\",\"creation\":\"2023-08-29 12:47:24.591875\",\"modified\":\"2023-08-29 12:47:24.591875\",\"modified_by\":\"prince_sohaib@yahoo.com\",\"docstatus\":0,\"idx\":9,\"has_item_scanned\":0,\"t_warehouse\":\"Finished Goods - T\",\"item_code\":\"FBR00002\",\"item_name\":\"Sheer Mall\",\"is_finished_item\":0,\"is_scrap_item\":0,\"is_process_loss\":0,\"description\":\"Sheer Mall\",\"item_group\":\"FG Bread & Rusk\",\"qty\":5,\"transfer_qty\":5,\"retain_sample\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"sample_quantity\":0,\"basic_rate\":50,\"additional_cost\":0,\"valuation_rate\":50,\"allow_zero_valuation_rate\":0,\"set_basic_rate_manually\":0,\"basic_amount\":250,\"amount\":250,\"expense_account\":\"Stock Adjustment - T\",\"cost_center\":\"Main - T\",\"actual_qty\":0,\"transferred_qty\":0,\"allow_alternative_item\":0,\"parent\":\"MAT-STE-2023-00010\",\"parentfield\":\"items\",\"parenttype\":\"Stock Entry\",\"doctype\":\"Stock Entry Detail\"}],\"__last_sync_on\":\"2023-08-29T08:30:04.250Z\",\"address_display\":null,\"purchase_receipt_no\":null,\"supplier_address\":null,\"supplier_name\":null,\"supplier\":null,\"sales_invoice_no\":null,\"delivery_note_no\":null,\"customer_address\":null,\"customer_name\":null,\"customer\":null}",
		"action": "Submit"
	},
	"btn": {
		"jQuery360073798506313435011": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 3953,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs"
}

Response Data

{
	"exc_type": "DoesNotExistError",
	"exception": "TypeError: cannot unpack non-iterable NoneType object"
}

Sir @NCP kindly check

No idea, sorry @GGR