fix: Autoname for customer and supplier (#27398)

(cherry picked from commit 759f2b7920)

# Conflicts:
#	erpnext/buying/doctype/buying_settings/buying_settings.json
#	erpnext/buying/doctype/supplier/supplier.py
#	erpnext/selling/doctype/customer/customer.py
#	erpnext/selling/doctype/selling_settings/selling_settings.json
This commit is contained in:
Deepesh Garg
2021-09-15 10:24:26 +05:30
committed by Mergify
parent f5160dc83d
commit 5b9e28761b
4 changed files with 26 additions and 0 deletions

View File

@@ -131,7 +131,11 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
<<<<<<< HEAD
"modified": "2023-03-22 13:01:49.640869",
=======
"modified": "2021-09-08 19:26:23.548837",
>>>>>>> 759f2b7920 (fix: Autoname for customer and supplier (#27398))
"modified_by": "Administrator",
"module": "Buying",
"name": "Buying Settings",

View File

@@ -43,7 +43,11 @@ class Supplier(TransactionBase):
supp_master_name = frappe.defaults.get_global_default("supp_master_name")
if supp_master_name == "Supplier Name":
self.name = self.supplier_name
<<<<<<< HEAD
elif supp_master_name == "Naming Series":
=======
elif supp_master_name == 'Naming Series':
>>>>>>> 759f2b7920 (fix: Autoname for customer and supplier (#27398))
set_name_by_naming_series(self)
else:
self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self)

View File

@@ -43,7 +43,11 @@ class Customer(TransactionBase):
cust_master_name = frappe.defaults.get_global_default("cust_master_name")
if cust_master_name == "Customer Name":
self.name = self.get_customer_name()
<<<<<<< HEAD
elif cust_master_name == "Naming Series":
=======
elif cust_master_name == 'Naming Series':
>>>>>>> 759f2b7920 (fix: Autoname for customer and supplier (#27398))
set_name_by_naming_series(self)
else:
self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self)

View File

@@ -49,6 +49,16 @@
"in_list_view": 1,
"label": "Customer Naming By",
"options": "Customer Name\nNaming Series\nAuto Name"
<<<<<<< HEAD
=======
},
{
"fieldname": "campaign_naming_by",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Campaign Naming By",
"options": "Campaign Name\nNaming Series\nAuto Name"
>>>>>>> 759f2b7920 (fix: Autoname for customer and supplier (#27398))
},
{
"fieldname": "customer_group",
@@ -221,7 +231,11 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
<<<<<<< HEAD
"modified": "2023-03-22 13:09:38.513317",
=======
"modified": "2021-09-08 19:38:10.175989",
>>>>>>> 759f2b7920 (fix: Autoname for customer and supplier (#27398))
"modified_by": "Administrator",
"module": "Selling",
"name": "Selling Settings",