doctype.py: custom code fix
This commit is contained in:
parent
626bdd8b50
commit
0e122002e1
1 changed files with 6 additions and 1 deletions
|
|
@ -263,8 +263,13 @@ class _DocType:
|
|||
doclist = self._load_from_cache()
|
||||
|
||||
from webnotes.modules import Module
|
||||
|
||||
# add custom script if present
|
||||
from webnotes.model.code import get_custom_script
|
||||
custom = get_custom_script(dt, 'Client') or ''
|
||||
|
||||
doc = doclist[0]
|
||||
doc.fields['__client_script'] = Module(doc.module).get_doc_file('doctype', doc.name, '.js').read()
|
||||
doc.fields['__client_script'] = Module(doc.module).get_doc_file('doctype', doc.name, '.js').read() + custom
|
||||
self._load_select_options(doclist)
|
||||
self._clear_code(doclist)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue