Sales Order Item doctype inserting

I’m trying to insert all mandatory fields that are required in the Sales Order Item doctype which are (item_code, item_name, description and qty) and image field but it still raise me that error:

Traceback (most recent call last):
File “/home/ahmed/frappe-bench/apps/frappe/frappe/”, line 60, in application
response = frappe.api.handle()
File “/home/ahmed/frappe-bench/apps/frappe/frappe/”, line 54, in handle
return frappe.handler.handle()
File “/home/ahmed/frappe-bench/apps/frappe/frappe/”, line 19, in handle
File “/home/ahmed/frappe-bench/apps/frappe/frappe/”, line 36, in execute_cmd
ret =, **frappe.form_dict)
File “/home/ahmed/frappe-bench/apps/frappe/frappe/”, line 887, in call
return fn(*args, **newargs)
File “/home/ahmed/frappe-bench/apps/myproducts/myproducts/www/”, line 40, in addToShopcart
“image”: item[0].thumbnail
File “/home/ahmed/frappe-bench/apps/frappe/frappe/model/”, line 190, in insert
File “/home/ahmed/frappe-bench/apps/frappe/frappe/model/”, line 384, in _validate
File “/home/ahmed/frappe-bench/apps/frappe/frappe/model/”, line 604, in _validate_mandatory
MandatoryError: [Sales Order Item, 5ac31ef15d]: parent, parenttype

Please advice @mostafa @rmehta

1 Like

@random.1 please don’t @-tag users. This is a voluntary forum and no one is obligated to reply