Merge pull request #15238 from rohitwaghchaure/customer-added-id-override-while-creating-records

fix: record name creating based on naming series and not as per the user input
This commit is contained in:
rohitwaghchaure 2021-12-09 22:28:48 +05:30 committed by GitHub
commit a3c3699a79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,7 +199,7 @@ class Importer:
new_doc = frappe.new_doc(self.doctype)
new_doc.update(doc)
if (meta.autoname or "").lower() != "prompt":
if not doc.name and (meta.autoname or "").lower() != "prompt":
# name can only be set directly if autoname is prompt
new_doc.set("name", None)