I have tried creating a new warehouse via the API, the response is 200 but if i refresh my warehouse list the new entry is not there. I have tried both methods both of them produce the same results
@frappe.whitelist()
def createFeedsWarehouse(company):
#Create New Warehouse
doc = frappe.get_doc({
“doctype”: “Warehouse”,
“warehouse_name”: “Feeds”,
“company”: company,
“is_group”:0
})try:
doc.insert()
return doc.name
except Exception as err:
return err
@frappe.whitelist()
def createFeedsWarehouse(company):
#Create FeedsWarehouse
doc = frappe.new_doc(“Warehouse”)
doc.warehouse_name = “Feeds”
doc.company = company
doc.is_group = 0
try:
doc.insert()
return doc.name
except Exception as err:
return err