mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
[naming series] create, remove Property Setters to set naming fixes webnotes/erpnext#854
This commit is contained in:
@@ -13,4 +13,7 @@ class DocType:
|
||||
def validate(self):
|
||||
for key in ["supplier_type", "supp_master_name", "maintain_same_rate", "buying_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("Supplier", "supplier_name",
|
||||
self.doc.get("supp_master_name")=="Naming Series", hide_name_field=False)
|
||||
|
||||
@@ -9,10 +9,7 @@ cur_frm.cscript.onload = function(doc,dt,dn){
|
||||
|
||||
cur_frm.cscript.refresh = function(doc,dt,dn) {
|
||||
cur_frm.cscript.make_dashboard(doc);
|
||||
if(sys_defaults.supp_master_name == 'Supplier Name')
|
||||
hide_field('naming_series');
|
||||
else
|
||||
unhide_field('naming_series');
|
||||
erpnext.hide_naming_series();
|
||||
|
||||
if(doc.__islocal){
|
||||
hide_field(['address_html','contact_html']);
|
||||
|
||||
Reference in New Issue
Block a user