From 5b9e28761b542534846665ab8df431eafb5375e6 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Wed, 15 Sep 2021 10:24:26 +0530 Subject: [PATCH] fix: Autoname for customer and supplier (#27398) (cherry picked from commit 759f2b7920f6bf017df555bfaba9d06fccc66d40) # 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 --- .../doctype/buying_settings/buying_settings.json | 4 ++++ erpnext/buying/doctype/supplier/supplier.py | 4 ++++ erpnext/selling/doctype/customer/customer.py | 4 ++++ .../doctype/selling_settings/selling_settings.json | 14 ++++++++++++++ 4 files changed, 26 insertions(+) diff --git a/erpnext/buying/doctype/buying_settings/buying_settings.json b/erpnext/buying/doctype/buying_settings/buying_settings.json index 52465c1a962..316a0b1acda 100644 --- a/erpnext/buying/doctype/buying_settings/buying_settings.json +++ b/erpnext/buying/doctype/buying_settings/buying_settings.json @@ -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", diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py index 3cfb796c591..f5ec5a6e80f 100644 --- a/erpnext/buying/doctype/supplier/supplier.py +++ b/erpnext/buying/doctype/supplier/supplier.py @@ -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) diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index fe6e03b12ba..0344bed5805 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -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) diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.json b/erpnext/selling/doctype/selling_settings/selling_settings.json index a51993ff7ff..63a008aa72f 100644 --- a/erpnext/selling/doctype/selling_settings/selling_settings.json +++ b/erpnext/selling/doctype/selling_settings/selling_settings.json @@ -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",