Custom Scripts

69 views
Skip to first unread message

Luis Fernandes

unread,
Sep 18, 2014, 2:09:13 PM9/18/14
to erpnext-dev...@googlegroups.com
I Erpnext Team.

I would like to know if there is another way of integrate client side script in a core doctype instead of custom scripts.

I mean, to write a little script it is ok, but a medium script it is not.

I constantly copy and past from my ide to the space of custom script. 

Can i make something like this?:

<% include path/to/my/script/somefile.js %>

In this particular case i'm trying to do some custom script in Customer doctype.


Thanks.

Y Y

unread,
Sep 18, 2014, 10:45:00 PM9/18/14
to erpnext-dev...@googlegroups.com
It shall auto add <script> tag around wrote script. If it is your include js, i'm afraid the browse will just take it as a txt instead of script.




在 2014年9月19日星期五UTC+8上午2时09分13秒,Luis Fernandes写道:

Rushabh Mehta

unread,
Sep 19, 2014, 12:32:09 AM9/19/14
to erpnext-dev...@googlegroups.com
On 18-Sep-2014, at 11:39 pm, Luis Fernandes <luisfmf...@gmail.com> wrote:

I Erpnext Team.

I would like to know if there is another way of integrate client side script in a core doctype instead of custom scripts.

I mean, to write a little script it is ok, but a medium script it is not.

I constantly copy and past from my ide to the space of custom script. 

Can i make something like this?:

<% include path/to/my/script/somefile.js %>

2 options:

1. Add it in hooks.py of your file as "app_include_js"


2. Create a build .json for your app and build it along with erpnext.min.js





In this particular case i'm trying to do some custom script in Customer doctype.


Thanks.

--
Note:
 
If you are posting an issue,
 
1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/cf286164-87ae-4287-ae17-18fa1a5778cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luis Fernandes

unread,
Sep 19, 2014, 3:54:00 AM9/19/14
to erpnext-dev...@googlegroups.com
Thank you both. I will try second option of rushabh. It seems the perfect option for what i want.
Reply all
Reply to author
Forward
0 new messages