'Make' Button is not visible in Sales Order

Hello,

In ‘Submitted’ Sales Order, ‘Make’ button is not loading as per the code.
When I checked the code, I noticed that
this._super()
line is commented, the control goes further down, executes and shows the ‘Make’ button.

Why? Can I Solve this?

I know, super() method is used to call parent type’s functions. So commenting that line will affect other functions. So how can I make the ‘MAKE’ button visible?

Can anyone know about this?

@Amalendu do you have customizations? What version are you using?

@rmehta I am using version v6.27.17
Yes,I am customizing…

Share your custom script. Hard to say what is going wrong without seeing it.

@rmehta
I have added some functions to sales_order.py
Not changed sales_order.js file
Below is the code:

def on_submit(self):		
	self.check_credit_limit()
	self.update_reserved_qty()
	
	frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.base_grand_total, self)
	self.update_prevdoc_status('submit')
	
	#Automatically create customer when Sales Order is created
	if self.customer_type == "Create New Customer" :
		self.create_customer_from_sales_order()
	#Automatically create project when Sales Order is created
	self.create_project_from_sales_order()
	
	#Update Opportunity Status if SO is created from Opportunity
	self.update_opportunity_status()
	
#Update Opportunity Status if SO is created from Opportunity
def update_opportunity_status(self):
	if self.from_opportunity:
		frappe.db.sql("""update `tabOpportunity` set status = %s where name=%s""",("Sales Order",self.from_opportunity))
		frappe.msgprint(_("Updated Opportunity Status"))
		
#Automatically create project when Sales Order is created
def create_project_from_sales_order(self):	
	if self.name_of_customer and not self.customer:
		cust=self.name_of_customer
	elif self.customer:	
		cust=self.customer		
	doc_project= frappe.new_doc("Project") 
	doc_project.update({ 	
		"project_name": self.project_name,
		"status": "Open",
		"project_type":self.project_type,
		"is_active":"Yes",
		"priority":"Medium",
		"customer": cust,
		"sales_order":self.name,
		"customer_type":"Individual"})
	doc_project.save()	
	
#Automatically create customer when Sales Order is created
def create_customer_from_sales_order(self):				
	#cname= frappe.db.get_value("Customer", {"name": self.name, "customer_name": self.customer_name, "lead_name":self.lead},"customer_name")
	#counts=frappe.db.sql("""select count(*) from tabCustomer where lead_name = '%s' and customer_name='%s'"""%(self.lead, self.customer_name))
	
	#if counts == 0 :			
	doc_customer_project = frappe.new_doc("Customer") 
	doc_customer_project.update({ 	
		"customer_name": self.name_of_customer,
		"territory": "All Territories",
		"customer_group":"Individual",
		"status":"Opportunity",
		# "lead_name":self.lead,
		"customer_type":"Individual"})
	doc_customer_project.save()

In Purchase Order doctype also, ‘Make’ button is not visible!!!