Merge branch 'shf_rename'
This commit is contained in:
commit
ae4fc41e61
@ -49,5 +49,5 @@ class DocType:
|
||||
if res:
|
||||
if res[0][1]:
|
||||
msgprint("POS Setting '%s' already created for user: '%s' and company: '%s'"%(res[0][0], res[0][1], self.doc.company), raise_exception=1)
|
||||
else:
|
||||
msgprint("Global POS Setting already created - %s for this company: '%s'" % (res[0][0], self.doc.company), raise_exception=1)
|
||||
else:
|
||||
msgprint("Global POS Setting already created - %s for this company: '%s'" % (res[0][0], self.doc.company), raise_exception=1)
|
||||
|
30
erpnext/patches/may_2012/std_pf_readonly.py
Normal file
30
erpnext/patches/may_2012/std_pf_readonly.py
Normal file
@ -0,0 +1,30 @@
|
||||
def execute():
|
||||
"""Make standard print formats readonly for system manager"""
|
||||
import webnotes.model.doc
|
||||
new_perms = [
|
||||
{
|
||||
'parent': 'Print Format',
|
||||
'parentfield': 'permissions',
|
||||
'parenttype': 'DocType',
|
||||
'role': 'System Manager',
|
||||
'permlevel': 1,
|
||||
'read': 1,
|
||||
},
|
||||
{
|
||||
'parent': 'Print Format',
|
||||
'parentfield': 'permissions',
|
||||
'parenttype': 'DocType',
|
||||
'role': 'Administrator',
|
||||
'permlevel': 1,
|
||||
'read': 1,
|
||||
'write': 1
|
||||
},
|
||||
]
|
||||
for perms in new_perms:
|
||||
doc = webnotes.model.doc.Document('DocPerm')
|
||||
doc.fields.update(perms)
|
||||
doc.save()
|
||||
webnotes.conn.commit()
|
||||
webnotes.conn.begin()
|
||||
import webnotes.model.sync
|
||||
webnotes.model.sync.sync('core', 'print_format')
|
@ -357,5 +357,10 @@ patch_list = [
|
||||
'patch_file': 'reload_sales_invoice_pf',
|
||||
'description': 'Reload sales invoice print formats'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.may_2012',
|
||||
'patch_file': 'std_pf_readonly',
|
||||
'description': 'Make standard print formats readonly for system manager'
|
||||
},
|
||||
|
||||
]
|
||||
|
@ -1351,8 +1351,7 @@ return df;else if(user_defaults[fn])
|
||||
return user_defaults[fn][0];else if(sys_defaults[fn])
|
||||
return sys_defaults[fn];}
|
||||
LocalDB.add_child=function(doc,childtype,parentfield){var n=LocalDB.create(childtype);var d=locals[childtype][n];d.parent=doc.name;d.parentfield=parentfield;d.parenttype=doc.doctype;return d;}
|
||||
LocalDB.no_copy_list=['amended_from','amendment_date','cancel_reason'];LocalDB.copy=function(dt,dn,from_amend){var newdoc=LocalDB.create(dt);for(var key in locals[dt][dn]){if(key!=='name'&&key.substr(0,2)!='__'){locals[dt][newdoc][key]=locals[dt][dn][key];}
|
||||
var df=get_field(dt,key);if(df&&((!from_amend&&cint(df.no_copy)==1)||in_list(LocalDB.no_copy_list,df.fieldname))){locals[dt][newdoc][key]='';}}
|
||||
LocalDB.no_copy_list=['amended_from','amendment_date','cancel_reason'];LocalDB.copy=function(dt,dn,from_amend){var newdoc=LocalDB.create(dt);for(var key in locals[dt][dn]){var df=get_field(dt,key);if(key!=='name'&&key.substr(0,2)!='__'&&!(df&&((!from_amend&&cint(df.no_copy)==1)||in_list(LocalDB.no_copy_list,df.fieldname)))){locals[dt][newdoc][key]=locals[dt][dn][key];}}
|
||||
return locals[dt][newdoc];}
|
||||
function make_doclist(dt,dn,deleted){var dl=[];dl[0]=locals[dt][dn];for(var ndt in locals){if(locals[ndt]){for(var ndn in locals[ndt]){var doc=locals[ndt][ndn];if(doc&&doc.parenttype==dt&&(doc.parent==dn||(deleted&&doc.__oldparent==dn))){dl[dl.length]=doc;}}}}
|
||||
return dl;}
|
||||
@ -2335,4 +2334,4 @@ msgprint('Grid "'+fort+'" does not exists');}}}}})
|
||||
* conf.js
|
||||
*/
|
||||
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2'});}
|
||||
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
||||
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
||||
|
@ -653,8 +653,7 @@ return df;else if(user_defaults[fn])
|
||||
return user_defaults[fn][0];else if(sys_defaults[fn])
|
||||
return sys_defaults[fn];}
|
||||
LocalDB.add_child=function(doc,childtype,parentfield){var n=LocalDB.create(childtype);var d=locals[childtype][n];d.parent=doc.name;d.parentfield=parentfield;d.parenttype=doc.doctype;return d;}
|
||||
LocalDB.no_copy_list=['amended_from','amendment_date','cancel_reason'];LocalDB.copy=function(dt,dn,from_amend){var newdoc=LocalDB.create(dt);for(var key in locals[dt][dn]){if(key!=='name'&&key.substr(0,2)!='__'){locals[dt][newdoc][key]=locals[dt][dn][key];}
|
||||
var df=get_field(dt,key);if(df&&((!from_amend&&cint(df.no_copy)==1)||in_list(LocalDB.no_copy_list,df.fieldname))){locals[dt][newdoc][key]='';}}
|
||||
LocalDB.no_copy_list=['amended_from','amendment_date','cancel_reason'];LocalDB.copy=function(dt,dn,from_amend){var newdoc=LocalDB.create(dt);for(var key in locals[dt][dn]){var df=get_field(dt,key);if(key!=='name'&&key.substr(0,2)!='__'&&!(df&&((!from_amend&&cint(df.no_copy)==1)||in_list(LocalDB.no_copy_list,df.fieldname)))){locals[dt][newdoc][key]=locals[dt][dn][key];}}
|
||||
return locals[dt][newdoc];}
|
||||
function make_doclist(dt,dn,deleted){var dl=[];dl[0]=locals[dt][dn];for(var ndt in locals){if(locals[ndt]){for(var ndn in locals[ndt]){var doc=locals[ndt][ndn];if(doc&&doc.parenttype==dt&&(doc.parent==dn||(deleted&&doc.__oldparent==dn))){dl[dl.length]=doc;}}}}
|
||||
return dl;}
|
||||
@ -736,4 +735,4 @@ erpnext.hide_naming_series=function(){if(cur_frm.fields_dict.naming_series){hide
|
||||
* conf.js
|
||||
*/
|
||||
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2'});}
|
||||
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
||||
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
||||
|
Loading…
x
Reference in New Issue
Block a user