mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
[naming series] create, remove Property Setters to set naming fixes webnotes/erpnext#854
This commit is contained in:
@@ -20,10 +20,7 @@ cur_frm.add_fetch('default_sales_partner','commission_rate','default_commission_
|
||||
|
||||
cur_frm.cscript.refresh = function(doc,dt,dn) {
|
||||
cur_frm.cscript.setup_dashboard(doc);
|
||||
if(sys_defaults.cust_master_name == 'Customer Name')
|
||||
hide_field('naming_series');
|
||||
else
|
||||
unhide_field('naming_series');
|
||||
erpnext.hide_naming_series();
|
||||
|
||||
if(doc.__islocal){
|
||||
hide_field(['address_html','contact_html']);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-06-11 14:26:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-10 10:50:50",
|
||||
"modified": "2013-10-18 16:49:20",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -48,6 +48,16 @@
|
||||
"permlevel": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "naming_series",
|
||||
"fieldtype": "Select",
|
||||
"label": "Document Numbering Series",
|
||||
"no_copy": 1,
|
||||
"options": "\nCUST\nCUSTMUM",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_name",
|
||||
@@ -76,16 +86,6 @@
|
||||
"permlevel": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "naming_series",
|
||||
"fieldtype": "Select",
|
||||
"label": "Document Numbering Series",
|
||||
"no_copy": 1,
|
||||
"options": "\nCUST\nCUSTMUM",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0
|
||||
},
|
||||
{
|
||||
"description": "Fetch lead which will be converted into customer.",
|
||||
"doctype": "DocField",
|
||||
|
||||
@@ -14,3 +14,7 @@ class DocType:
|
||||
for key in ["cust_master_name", "customer_group", "territory", "maintain_same_sales_rate",
|
||||
"editable_price_list_rate", "selling_price_list"]:
|
||||
webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
|
||||
|
||||
from setup.doctype.naming_series.naming_series import set_by_naming_series
|
||||
set_by_naming_series("Customer", "customer_name",
|
||||
self.doc.get("cust_master_name")=="Naming Series", hide_name_field=False)
|
||||
|
||||
Reference in New Issue
Block a user