mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
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:
@@ -131,7 +131,11 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
|
<<<<<<< HEAD
|
||||||
"modified": "2023-03-22 13:01:49.640869",
|
"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",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Buying Settings",
|
"name": "Buying Settings",
|
||||||
|
|||||||
@@ -43,7 +43,11 @@ class Supplier(TransactionBase):
|
|||||||
supp_master_name = frappe.defaults.get_global_default("supp_master_name")
|
supp_master_name = frappe.defaults.get_global_default("supp_master_name")
|
||||||
if supp_master_name == "Supplier Name":
|
if supp_master_name == "Supplier Name":
|
||||||
self.name = self.supplier_name
|
self.name = self.supplier_name
|
||||||
|
<<<<<<< HEAD
|
||||||
elif supp_master_name == "Naming Series":
|
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)
|
set_name_by_naming_series(self)
|
||||||
else:
|
else:
|
||||||
self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self)
|
self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self)
|
||||||
|
|||||||
@@ -43,7 +43,11 @@ class Customer(TransactionBase):
|
|||||||
cust_master_name = frappe.defaults.get_global_default("cust_master_name")
|
cust_master_name = frappe.defaults.get_global_default("cust_master_name")
|
||||||
if cust_master_name == "Customer Name":
|
if cust_master_name == "Customer Name":
|
||||||
self.name = self.get_customer_name()
|
self.name = self.get_customer_name()
|
||||||
|
<<<<<<< HEAD
|
||||||
elif cust_master_name == "Naming Series":
|
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)
|
set_name_by_naming_series(self)
|
||||||
else:
|
else:
|
||||||
self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self)
|
self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self)
|
||||||
|
|||||||
@@ -49,6 +49,16 @@
|
|||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Customer Naming By",
|
"label": "Customer Naming By",
|
||||||
"options": "Customer Name\nNaming Series\nAuto Name"
|
"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",
|
"fieldname": "customer_group",
|
||||||
@@ -221,7 +231,11 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
|
<<<<<<< HEAD
|
||||||
"modified": "2023-03-22 13:09:38.513317",
|
"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",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Selling Settings",
|
"name": "Selling Settings",
|
||||||
|
|||||||
Reference in New Issue
Block a user