[naming series] create, remove Property Setters to set naming fixes webnotes/erpnext#854

This commit is contained in:
Rushabh Mehta
2013-10-18 17:23:50 +05:30
parent 5566bcaa0e
commit 70d7c481e9
13 changed files with 67 additions and 34 deletions

View File

@@ -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)

View File

@@ -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']);