Re: [erpnext-dev] image field in Sales Order Item

Hi, Satish!

You are using a custom script in Setup, or you modified the "sales_order.js" ?



2014-04-12 1:31 GMT-03:00 Satish <sa…@gmail.com>:

Hi

I have already asked it on Users forum but only now I realize that this may be the right place to post it.

I am trying to add an Image field to Sales Order Item to attach images specific the order only. This may be useful while doing custom work where creation of a new item may feel unnecessary and the image could be added in the order iteself just for the reference. So I feel that the approach being used in Item master could be used here i.e. we attach a photograph, write the description and then generate HTML description combining both.

To achieve this, have created 3 custom fields in doctype "Sales Order Item"

1. image option: attach_files: Field type: Select
2. ref_image Field type: Small Text
3. attach_image Field type: Button


and I have the following custom script



cur_frm.cscript.attach_image = function(doc, dt, dn) {
if(!doc.image) {
msgprint(wn._('Please select an "Image" first'));
return;
}

doc.ref_image = repl('<table style="width: 100%; table-layout: fixed;">'+
'<tr><td style="width:110px"><img src="%(imgurl)s" width="100px"></td>'+
'</table>', {imgurl: wn.utils.get_file_link(doc.image)});

refresh_field('ref_image');
}




The script is not working. When I click the button nothing happens.
I suspect something is wrong with the script.
I must mention that I have no idea about writing scripts and have tried using the script being used in item master in erpnext.

Could someone please point out the mistake in the script? I somehow feel that it would work with little correction.

Further, to avoid another ref_image field which would take up another column in the sales order item table, is it possible to replace the contents of the description field with the HTML description containing both description and image??

Regards
Satish



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9bfca4c4-3741-4310-b67a-7d375e5958ab%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3
+55 11 954329659




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CABK1YkN5WOkruqDj1%2B2ggzWuGw-2nGBbYxdbeDiv6Z7BSrw56Q%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
When you open the form with custom code, are showed any message on browser console?


2014-04-14 6:52 GMT-03:00 Satish <sa...@gmail.com>:
Can someone help??

Regards


On Saturday, 12 April 2014 13:20:23 UTC+5:30, Satish wrote:
I am using a custom script in Setup

Regards
Satish


On Saturday, 12 April 2014 12:03:50 UTC+5:30, Maxwell wrote:
Hi, Satish!

You are using a custom script in Setup, or you modified the "sales_order.js" ?



2014-04-12 1:31 GMT-03:00 Satish <sa…@gmail.com>:

Hi

I have already asked it on Users forum but only now I realize that this may be the right place to post it.

I am trying to add an Image field to Sales Order Item to attach images specific the order only. This may be useful while doing custom work where creation of a new item may feel unnecessary and the image could be added in the order iteself just for the reference. So I feel that the approach being used in Item master could be used here i.e. we attach a photograph, write the description and then generate HTML description combining both.

To achieve this, have created 3 custom fields in doctype "Sales Order Item"

1. image option: attach_files: Field type: Select
2. ref_image Field type: Small Text
3. attach_image Field type: Button


and I have the following custom script



cur_frm.cscript.attach_image = function(doc, dt, dn) {
if(!doc.image) {
msgprint(wn._('Please select an "Image" first'));
return;
}

doc.ref_image = repl('<table style="width: 100%; table-layout: fixed;">'+
'<tr><td style="width:110px"><img src="%(imgurl)s" width="100px"></td>'+
'</table>', {imgurl: wn.utils.get_file_link(doc.image)});

refresh_field('ref_image');
}




The script is not working. When I click the button nothing happens.
I suspect something is wrong with the script.
I must mention that I have no idea about writing scripts and have tried using the script being used in item master in erpnext.

Could someone please point out the mistake in the script? I somehow feel that it would work with little correction.

Further, to avoid another ref_image field which would take up another column in the sales order item table, is it possible to replace the contents of the description field with the HTML description containing both description and image??

Regards
Satish



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9bfca4c4-3741-4310-b67a-7d375e5958ab%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/41925dc7-7d6d-486e-8b20-8b9114741c98%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3
+55 11 954329659




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CABK1YkMrOqSkeOKQ7FfrC7DspoiZmh6Feeu3HPUvZ0j%3DdOMcrw%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.

Y

our code can not be running for a reference error, such as a simple spelling error, the button is labeled “atach_image” and you put in your code “attach_image”.

Or something is preventing the loading of custom code, to verify this, go to “Setup”> “Custom Code” and add the line below before the “cur_frm.cscript.attach_image”
console.log (" Custom code working fine ") and check if the message are Showed in browser console When You refresh the page.



2014-04-14 10:49 GMT-03:00 Satish <sa...@gmail.com>:
Hi

When I just open the form no message in shown in console.
However, when I attach an image and press the button to generate HTML description i get the following in the console:

Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 104, in run_server_obj raise Exception, 'No method %s' % method_name Exception: No method




On Monday, 14 April 2014 18:47:17 UTC+5:30, Maxwell wrote:

When you open the form with custom code, are showed any message on browser console?


2014-04-14 6:52 GMT-03:00 Satish <sa...@gmail.com>:

Can someone help??

Regards


On Saturday, 12 April 2014 13:20:23 UTC+5:30, Satish wrote:
I am using a custom script in Setup

Regards
Satish


On Saturday, 12 April 2014 12:03:50 UTC+5:30, Maxwell wrote:
Hi, Satish!

You are using a custom script in Setup, or you modified the "sales_order.js" ?



2014-04-12 1:31 GMT-03:00 Satish <sa…@gmail.com>:

Hi

I have already asked it on Users forum but only now I realize that this may be the right place to post it.

I am trying to add an Image field to Sales Order Item to attach images specific the order only. This may be useful while doing custom work where creation of a new item may feel unnecessary and the image could be added in the order iteself just for the reference. So I feel that the approach being used in Item master could be used here i.e. we attach a photograph, write the description and then generate HTML description combining both.

To achieve this, have created 3 custom fields in doctype "Sales Order Item"

1. image option: attach_files: Field type: Select
2. ref_image Field type: Small Text
3. attach_image Field type: Button


and I have the following custom script



cur_frm.cscript.attach_image = function(doc, dt, dn) {
if(!doc.image) {
msgprint(wn._('Please select an "Image" first'));
return;
}

doc.ref_image = repl('<table style="width: 100%; table-layout: fixed;">'+
'<tr><td style="width:110px"><img src="%(imgurl)s" width="100px"></td>'+
'</table>', {imgurl: wn.utils.get_file_link(doc.image)});

refresh_field('ref_image');
}




The script is not working. When I click the button nothing happens.
I suspect something is wrong with the script.
I must mention that I have no idea about writing scripts and have tried using the script being used in item master in erpnext.

Could someone please point out the mistake in the script? I somehow feel that it would work with little correction.

Further, to avoid another ref_image field which would take up another column in the sales order item table, is it possible to replace the contents of the description field with the HTML description containing both description and image??

Regards
Satish



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+unsubscr…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9bfca4c4-3741-4310-b67a-7d375e5958ab%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/41925dc7-7d6d-486e-8b20-8b9114741c98%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/c2a9be68-5327-429c-9f0f-59f76a16fb56%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3
+55 11 954329659




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CABK1YkOfHK0yKQrdyRrxLHopzzCDsi0jhVsg6ujR1rLkkS4mjA%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
There does not seem to be any error. If you console messages do no show up, its because the script is not being triggered.

What type of field is "attach_image" ? Are you sure the spelling is correct?


On Friday, April 18, 2014 6:39:26 PM UTC+5:30, Satish wrote:
Hi Maxwell,

Thanks for the help and sorry for replying late.

I think you are right. The custom code doesn't seem to be loading. I added the line as suggested by you and refreshed the page. I got the following output in the console window:

Error: Invalid value for <svg> attribute preserveAspectRatio="xMidyMid meet" app.html:26
Cleared localstorage all-app.min.js:162
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.min.js:2
Cleared Cache - New Metadata all-app.min.js:363
Starting up... all-app.min.js:2425
Error: Invalid value for <svg> attribute preserveAspectRatio="xMidyMid meet" app/images/splash.svg:15
Attr.specified is deprecated. Its value is always true.



what could this error mean??

Regards



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/2bc42c6e-7960-40d6-b6bd-b00d072a7277%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Satish, maybe the Custom Scripts is not loaded because an unreported error.


Try add you custom code on sales_order.js, if you have access to the access code.


2014-04-28 1:07 GMT-03:00 Satish <sa…@gmail.com>:

Any guidance?

Regards
Satish Gupta


On Wednesday, 23 April 2014 09:57:56 UTC+5:30, Satish wrote:
Hi Rushabh,

Thanks for replying.
I have rechecked the fields, names and spellings. I don't see anything wrong.
attach_image is a button field. No other configuration.





Regards



On Monday, 21 April 2014 12:10:11 UTC+5:30, rushabh wrote:
There does not seem to be any error. If you console messages do no show up, its because the script is not being triggered.

What type of field is "attach_image" ? Are you sure the spelling is correct?


On Friday, April 18, 2014 6:39:26 PM UTC+5:30, Satish wrote:
Hi Maxwell,


Thanks for the help and sorry for replying late.

I think you are right. The custom code doesn't seem to be loading. I added the line as suggested by you and refreshed the page. I got the following output in the console window:


Error: Invalid value for <svg> attribute preserveAspectRatio="xMidyMid meet" app.html:26

Cleared localstorage all-app.min.js:162

event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.min.js:2

Cleared Cache - New Metadata all-app.min.js:363

Starting up… all-app.min.js:2425

Error: Invalid value for <svg> attribute preserveAspectRatio="xMidyMid meet" app/images/splash.svg:15

Attr.specified is deprecated. Its value is always true.




what could this error mean??

Regards




Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/74036215-c732-435a-8bcf-6448d30ef383%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CABK1YkMGn1zoF-id9CCsJo8C4KZ7NvhjWwtuoG_Co4rQq%2Bw4Zg%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.

Hi Satish,

One possibility of script not loading could be that you have multiple client scripts for the same doctype and it is loding the other one.

body{font-family:Helvetica,Arial;font-size:13px}body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding:1em; margin:auto; background:#fefefe; }

h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}

h1 {
color: #000000;
font-size: 28pt;
}

h2 {
border-bottom: 1px solid #CCCCCC;
color: #000000;
font-size: 24px;
}

h3 {
font-size: 18px;
}

h4 {
font-size: 16px;
}

h5 {
font-size: 14px;
}

h6 {
color: #777777;
background-color: inherit;
font-size: 14px;
}

hr {
height: 0.2em;
border: 0;
color: #CCCCCC;
background-color: #CCCCCC;
}

p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0;
}

a, a:visited {
color: #4183C4;
background-color: inherit;
text-decoration: none;
}

#message {
border-radius: 6px;
border: 1px solid #ccc;
display:block;
width:100%;
height:60px;
margin:6px 0px;
}

button, #ws {
font-size: 12 pt;
padding: 4px 6px;
border-radius: 5px;
border: 1px solid #bbb;
background-color: #eee;
}

code, pre, #ws, #message {
font-family: Monaco;
font-size: 10pt;
border-radius: 3px;
background-color: #F8F8F8;
color: inherit;
}

code {
border: 1px solid #EAEAEA;
margin: 0 2px;
padding: 0 5px;
}

pre {
border: 1px solid #CCCCCC;
overflow: auto;
padding: 4px 8px;
}

pre > code {
border: 0;
margin: 0;
padding: 0;
}

#ws { background-color: #f8f8f8; }

table {
border-collapse: collapse;
font-family: Helvetica, arial, freesans, clean, sans-serif;
color: rgb(51, 51, 51);
font-size: 15px; line-height: 25px;
padding: 0; }

table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }

table tr:nth-child(2n) {
background-color: #f8f8f8; }

table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

table tr th :first-child, table tr td :first-child {
margin-top: 0; }

table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }

.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }


Thanks,
Anand Doshi.

On 29 April 2014 at 10:17:21 am, Satish (sa…@gmail.com) wrote:

Thanks for replying Maxwell.
How do I add code sales_order.js??

Regards
Satish Gupta


On Monday, 28 April 2014 15:59:21 UTC+5:30, Maxwell wrote:
Satish, maybe the Custom Scripts is not loaded because an unreported error.

Try add you custom code on sales_order.js, if you have access to the access code.


2014-04-28 1:07 GMT-03:00 Satish <sa...@gmail.com>:
Any guidance?

Regards
Satish Gupta


On Wednesday, 23 April 2014 09:57:56 UTC+5:30, Satish wrote:
Hi Rushabh,

Thanks for replying.
I have rechecked the fields, names and spellings. I don't see anything wrong. 
attach_image is a button field. No other configuration.





Regards



On Monday, 21 April 2014 12:10:11 UTC+5:30, rushabh wrote:
There does not seem to be any error. If you console messages do no show up, its because the script is not being triggered.

What type of field is "attach_image" ? Are you sure the spelling is correct?


On Friday, April 18, 2014 6:39:26 PM UTC+5:30, Satish wrote:
Hi Maxwell,

Thanks for the help and sorry for replying late.

I think you are right. The custom code doesn't seem to be loading. I added the line as suggested by you and refreshed the page. I got the following output in the console window:

Error: Invalid value for <svg> attribute preserveAspectRatio="xMidyMid meet" app.html:26
Cleared localstorage all-app.min.js:162
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.min.js:2
Cleared Cache - New Metadata all-app.min.js:363
Starting up... all-app.min.js:2425
Error: Invalid value for <svg> attribute preserveAspectRatio="xMidyMid meet" app/images/splash.svg:15
Attr.specified is deprecated. Its value is always true.



what could this error mean??

Regards

--
Note:
 
If you are posting an issue,
1. 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.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. 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-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/74036215-c732-435a-8bcf-6448d30ef383%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3
--
Note:
 
If you are posting an issue,
1. 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.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. 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-forum+un...@googlegroups.com.

To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/6ece7991-e7e2-404d-976a-ea5800ff86c7%40googlegroups.com
.

For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/etPan.535f5b2b.19495cff.18e%40apdmacbook.local.

    For more options, visit https://groups.google.com/d/optout.
Sales Order - Custom scripts are not executed for Table DocTypes

On Tuesday, April 29, 2014 7:37:55 PM UTC+5:30, Satish wrote:
Hi Anand,

This is the only custom script I have. There are no other scripts.
However, your comment set me thinking that should the script be associated with doctype  Sales Order Item   or should it be on doctype  Sales Order?

Regards
Satish




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/503d7de0-43bc-4765-a781-75dceecfc7ba%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Can you share your latest script via pastebin?

Also can you check whether the property exists via checking "cur_frm.doc.image" from your js console?

On Wednesday, April 30, 2014 11:40:21 AM UTC+5:30, Satish wrote:
Thanks Rushabh.
I think there is some progress. I changed the doctype to Sales Order.
Now I can see in the console that the script is loading. However, now when I click on the button it gives an error saying  "Please select an "Image" first".  The image is already selected.
What could be wrong?

Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0ae45cec-d147-4655-8851-652c30c35621%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
If you are in child doc,

start your function with

child = locals[dt][dn];

and check child.image



On Thursday, May 1, 2014 12:21:18 PM UTC+5:30, Satish wrote:
The pastebin url is    http://pastebin.com/HfaLqmhZ

I am not sure how to check if the property exists or not....but I did type "cur_frm.doc.image"  without quotes in the console and it returned "underfied"
However, console is showing undefined for all the fields of the  "Sales Order Item". It is showing only the fields on the form Sales Order.
So it means  "Sales Order Item" subform needs to be accessed first to access all its fields. But I am not aware how to do that. 

Regards
Satish Gupta






Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/6cc30be3-b29f-4b5a-b87f-f01aa70b40f6%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
the parameters dt, dn are the reference to the child record on the trigger

to get access to the child document you can use locals[dt][dn]

what do you get as dt, dn and locals[dt][dn]?

that should help you.

On Monday, May 5, 2014 10:32:27 AM UTC+5:30, Satish wrote:
Thanks for replying.

Sorry to drag it on but I can't seem to get the child reference right. 
I have tried child.image but it returns undefined.

I have tried   "cur_frm.fields_dict.sales_order_details"    but past this I can't get the fields list inside the sales_order_details table. I have searched internet but couldn't get the proper references to be used.


Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a335a07c-10d1-4919-bae4-0363972d5d89%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
The trace is from an unrelated error. Do you get the value of d correct? try printing it out on console.log(d)


On Tuesday, May 6, 2014 11:28:42 AM UTC+5:30, Satish wrote:
Hi

I have changed my script to the following:

// for image from attachment
// takes the selected image and creates
// a table with image in HTML
// in the "ref_image" field

cur_frm.doc.attach_image = function(doc, dt, dn) {
var d = locals[dt][dn];
          if(!d.image) {
msgprint(wn._('Please select an "Image" first'));
return;
}

d.ref_image = repl('<table style="width: 100%; table-layout: fixed;">'+
'<tr><td style="width:110px"><img src="%(imgurl)s" width="100px"></td></tr>'+
'</table>', {imgurl: wn.utils.get_file_link(!d.image)});

refresh_field('ref_image');
}


But I am getting the following error:


Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 104, in run_server_obj raise Exception, 'No method %s' % method_name Exception: No method 



Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/fe451783-52a0-42e3-b387-3b566198fed1%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
yes your custom script is not being executed/

If there is a field called "attach_image" in both parent and child, I think it will not execute for child. Can you name your child field differently ?

On Wednesday, May 7, 2014 11:04:13 AM UTC+5:30, Satish wrote:
Hi

I have added line   'console.log(d)'    after   defining   'var d'   but I don't get any output in the console. As I press the button I get the same error as earlier.
Directly typing  console.log(d)  in the console window returns that   d is not defined.

Another interesting thing I noticed is that even if I remove the script and I press the button, I get the same error as told in earlier post. So it seems to me that pressing the button doesn't even trigger the script. It is as if the script doesn't exist at all. Though not sure but I think the reference of attach_image button needs to be changed in the begging of the script. which means the line

"cur_frm.doc.attach_image"    needs to be changed to something else. This seems to be pointing to a field which doesn't exist. The field "attach_image" actually exists on the child table  sales_order_details


Regards
Satish Gupta




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5eb5f3c2-b4f1-4c45-9cac-f4d57e16f0e1%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Satish,

I am unable to follow what trials you are doing. You need to share your scripts so that we know what you are doing.



@rushabh_mehta

On 19-May-2014, at 8:11 pm, Satish <sa...@gmail.com> wrote:

Hi

I have come back to this thread after a lot of searching and trials but without success. Can someone give me pointers in what I want to achieve? This is really important for us. 

Regards
Satish Gupta


On Wednesday, 7 May 2014 11:25:39 UTC+5:30, Satish wrote:
There is no custom field on main form. Neither is there any field with the same name. Also I have tried changing the field name but no success.
Don't you think the  reference   cur_frm.doc.attach_image   needs to be changed to something else?? Will it work even for the field on child table if there is no similarly named field on main form??

Regards
Satish Gupta



On Wednesday, 7 May 2014 11:14:05 UTC+5:30, rushabh wrote:
yes your custom script is not being executed/

If there is a field called "attach_image" in both parent and child, I think it will not execute for child. Can you name your child field differently ?

On Wednesday, May 7, 2014 11:04:13 AM UTC+5:30, Satish wrote:
Hi

I have added line   'console.log(d)'    after   defining   'var d'   but I don't get any output in the console. As I press the button I get the same error as earlier.
Directly typing  console.log(d)  in the console window returns that   d is not defined.

Another interesting thing I noticed is that even if I remove the script and I press the button, I get the same error as told in earlier post. So it seems to me that pressing the button doesn't even trigger the script. It is as if the script doesn't exist at all. Though not sure but I think the reference of attach_image button needs to be changed in the begging of the script. which means the line

"cur_frm.doc.attach_image"    needs to be changed to something else. This seems to be pointing to a field which doesn't exist. The field "attach_image" actually exists on the child table  sales_order_details


Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/99c149ea-93b1-4bc0-9c0d-7de78aef793c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/BCA4DEB1-A6D4-4598-A310-DB99A2657DCD%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.

Hi

I am taking the script I earlier shared as the base and making small changes to it to see the effect. I am assuming that the script is basically correct and I just need to make some changes to control references to get it right. The link to script is   http://pastebin.com/HfaLqmhZ  
I may be grossly wrong and if I am please do indicate. Then I might stop banging my head over it.


doc will never work in the child table. Are you running this on a child table or main form?


1. First of all if I start the script with    cur_frm.doc.add_new_image (i have changed the custom field names)   instead of   cur_frm.cscript.add_new_image  the script is not triggered at all. I gives the following error:

Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 104, in run_server_obj raise Exception, 'No method %s' % method_name Exception: No method



Seems unrelated

2. When I use cur_frm.cscript.add_new_image it returns "Please select and image first" even though the image is already selected.

3. If I declare a variable d with var d = locals(dt, dn) then it gives the following error:

  1. Uncaught TypeError: object is not a function VM325:1698
    1. cur_frm.cscript.add_new_imageVM325:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle


Seems like an error in the script. Click on the VM325:1698 and see where it is stuck.

4. If I declare variable using  var d = locals[dt][dn]   then nothing happens. I click the button and no error is shown either in pop-up or in console.

5. If I declare variable using poing 4  and remove   dt, dn   from   function i.e.   cur_frm.cscript.add_new_image = function (doc)  then I get the following error:

  1. Uncaught ReferenceError: dt is not defined VM492:1698
    1. cur_frm.cscript.add_new_imageVM492:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

6. Taking a clue from error in point 5, I tried replacing dt with "Sales Order". But now it says dn is not defined

7. Now if I replace dn with "SO/14-15/00041" it again starts giving me an error that "Please select an image first".

8. I went through the Client Side Cookbook and used doc.doctype and doc.docname in place of dt and dn but get the following error:

  1. Uncaught TypeError: Cannot read property 'new_image' of undefined VM678:1699
    1. cur_frm.cscript.add_new_imageVM678:1699
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

9. Similarly searching through forums and google searches I have been trying to make changes to the top 3 lines of the script but with same results.

So this is basically what I have been trying without success. Any pointers from this point forward?

Regards

On Monday, 19 May 2014 21:24:57 UTC+5:30, rushabh wrote:
Satish,

I am unable to follow what trials you are doing. You need to share your scripts so that we know what you are doing.



@rushabh_mehta

On 19-May-2014, at 8:11 pm, Satish <sa...@gmail.com> wrote:

Hi

I have come back to this thread after a lot of searching and trials but without success. Can someone give me pointers in what I want to achieve? This is really important for us. 

Regards
Satish Gupta


On Wednesday, 7 May 2014 11:25:39 UTC+5:30, Satish wrote:
There is no custom field on main form. Neither is there any field with the same name. Also I have tried changing the field name but no success.
Don't you think the  reference   cur_frm.doc.attach_image   needs to be changed to something else?? Will it work even for the field on child table if there is no similarly named field on main form??

Regards
Satish Gupta



On Wednesday, 7 May 2014 11:14:05 UTC+5:30, rushabh wrote:
yes your custom script is not being executed/

If there is a field called "attach_image" in both parent and child, I think it will not execute for child. Can you name your child field differently ?

On Wednesday, May 7, 2014 11:04:13 AM UTC+5:30, Satish wrote:
Hi

I have added line   'console.log(d)'    after   defining   'var d'   but I don't get any output in the console. As I press the button I get the same error as earlier.
Directly typing  console.log(d)  in the console window returns that   d is not defined.

Another interesting thing I noticed is that even if I remove the script and I press the button, I get the same error as told in earlier post. So it seems to me that pressing the button doesn't even trigger the script. It is as if the script doesn't exist at all. Though not sure but I think the reference of attach_image button needs to be changed in the begging of the script. which means the line

"cur_frm.doc.attach_image"    needs to be changed to something else. This seems to be pointing to a field which doesn't exist. The field "attach_image" actually exists on the child table  sales_order_details


Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/99c149ea-93b1-4bc0-9c0d-7de78aef793c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/851006d3-d192-415c-948e-c6a76c021d75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/270440F3-51B4-4D1C-8820-968481E73DAD%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.


Hi

I have all three of my custom fields on child table "Sales Order Item" under the main form "Sales Order". So maybe that explains why doc won't work.
However, I have associated the script with Doctype "Sales Order" and not "Sales Order Item" as you said earlier that the script needs to be associated with the main form only.

Clicking on VM325:1698 doesn't help. It just shows the my written script. Nothing else.

Which line does it show the error in?


Regards
Satish Gupta



On Thursday, 22 May 2014 18:04:51 UTC+5:30, rushabh wrote:

Hi

I am taking the script I earlier shared as the base and making small changes to it to see the effect. I am assuming that the script is basically correct and I just need to make some changes to control references to get it right. The link to script is   http://pastebin.com/HfaLqmhZ  
I may be grossly wrong and if I am please do indicate. Then I might stop banging my head over it.


doc will never work in the child table. Are you running this on a child table or main form?


1. First of all if I start the script with    cur_frm.doc.add_new_image (i have changed the custom field names)   instead of   cur_frm.cscript.add_new_image  the script is not triggered at all. I gives the following error:

Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 104, in run_server_obj raise Exception, 'No method %s' % method_name Exception: No method



Seems unrelated

2. When I use cur_frm.cscript.add_new_image it returns "Please select and image first" even though the image is already selected.

3. If I declare a variable d with var d = locals(dt, dn) then it gives the following error:

  1. Uncaught TypeError: object is not a function VM325:1698
    1. cur_frm.cscript.add_new_imageVM325:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle


Seems like an error in the script. Click on the VM325:1698 and see where it is stuck.

4. If I declare variable using  var d = locals[dt][dn]   then nothing happens. I click the button and no error is shown either in pop-up or in console.

5. If I declare variable using poing 4  and remove   dt, dn   from   function i.e.   cur_frm.cscript.add_new_image = function (doc)  then I get the following error:

  1. Uncaught ReferenceError: dt is not defined VM492:1698
    1. cur_frm.cscript.add_new_imageVM492:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

6. Taking a clue from error in point 5, I tried replacing dt with "Sales Order". But now it says dn is not defined

7. Now if I replace dn with "SO/14-15/00041" it again starts giving me an error that "Please select an image first".

8. I went through the Client Side Cookbook and used doc.doctype and doc.docname in place of dt and dn but get the following error:

  1. Uncaught TypeError: Cannot read property 'new_image' of undefined VM678:1699
    1. cur_frm.cscript.add_new_imageVM678:1699
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

9. Similarly searching through forums and google searches I have been trying to make changes to the top 3 lines of the script but with same results.

So this is basically what I have been trying without success. Any pointers from this point forward?

Regards

On Monday, 19 May 2014 21:24:57 UTC+5:30, rushabh wrote:
Satish,

I am unable to follow what trials you are doing. You need to share your scripts so that we know what you are doing.



@rushabh_mehta

On 19-May-2014, at 8:11 pm, Satish <sa...@gmail.com> wrote:

Hi

I have come back to this thread after a lot of searching and trials but without success. Can someone give me pointers in what I want to achieve? This is really important for us. 

Regards
Satish Gupta


On Wednesday, 7 May 2014 11:25:39 UTC+5:30, Satish wrote:
There is no custom field on main form. Neither is there any field with the same name. Also I have tried changing the field name but no success.
Don't you think the  reference   cur_frm.doc.attach_image   needs to be changed to something else?? Will it work even for the field on child table if there is no similarly named field on main form??

Regards
Satish Gupta



On Wednesday, 7 May 2014 11:14:05 UTC+5:30, rushabh wrote:
yes your custom script is not being executed/

If there is a field called "attach_image" in both parent and child, I think it will not execute for child. Can you name your child field differently ?

On Wednesday, May 7, 2014 11:04:13 AM UTC+5:30, Satish wrote:
Hi

I have added line   'console.log(d)'    after   defining   'var d'   but I don't get any output in the console. As I press the button I get the same error as earlier.
Directly typing  console.log(d)  in the console window returns that   d is not defined.

Another interesting thing I noticed is that even if I remove the script and I press the button, I get the same error as told in earlier post. So it seems to me that pressing the button doesn't even trigger the script. It is as if the script doesn't exist at all. Though not sure but I think the reference of attach_image button needs to be changed in the begging of the script. which means the line

"cur_frm.doc.attach_image"    needs to be changed to something else. This seems to be pointing to a field which doesn't exist. The field "attach_image" actually exists on the child table  sales_order_details


Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/99c149ea-93b1-4bc0-9c0d-7de78aef793c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/851006d3-d192-415c-948e-c6a76c021d75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/26a3e4f2-4350-4407-806c-9f8930757b4b%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/BBC76AA9-3B4F-4388-8258-73DEDEDA9582%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
should be 

d = locals[dt][dn]



@rushabh_mehta

On 22-May-2014, at 7:10 pm, Satish <sa...@gmail.com> wrote:

Well a white highlighter blinks once on the line  var d = locals(dt, dn);

Regards
Satish Gupta

On Thursday, 22 May 2014 18:56:40 UTC+5:30, rushabh wrote:


Hi

I have all three of my custom fields on child table "Sales Order Item" under the main form "Sales Order". So maybe that explains why doc won't work.
However, I have associated the script with Doctype "Sales Order" and not "Sales Order Item" as you said earlier that the script needs to be associated with the main form only.

Clicking on VM325:1698 doesn't help. It just shows the my written script. Nothing else.

Which line does it show the error in?


Regards
Satish Gupta



On Thursday, 22 May 2014 18:04:51 UTC+5:30, rushabh wrote:

Hi

I am taking the script I earlier shared as the base and making small changes to it to see the effect. I am assuming that the script is basically correct and I just need to make some changes to control references to get it right. The link to script is   http://pastebin.com/HfaLqmhZ  
I may be grossly wrong and if I am please do indicate. Then I might stop banging my head over it.


doc will never work in the child table. Are you running this on a child table or main form?


1. First of all if I start the script with    cur_frm.doc.add_new_image (i have changed the custom field names)   instead of   cur_frm.cscript.add_new_image  the script is not triggered at all. I gives the following error:

Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 104, in run_server_obj raise Exception, 'No method %s' % method_name Exception: No method



Seems unrelated

2. When I use cur_frm.cscript.add_new_image it returns "Please select and image first" even though the image is already selected.

3. If I declare a variable d with var d = locals(dt, dn) then it gives the following error:

  1. Uncaught TypeError: object is not a function VM325:1698
    1. cur_frm.cscript.add_new_imageVM325:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle


Seems like an error in the script. Click on the VM325:1698 and see where it is stuck.

4. If I declare variable using  var d = locals[dt][dn]   then nothing happens. I click the button and no error is shown either in pop-up or in console.

5. If I declare variable using poing 4  and remove   dt, dn   from   function i.e.   cur_frm.cscript.add_new_image = function (doc)  then I get the following error:

  1. Uncaught ReferenceError: dt is not defined VM492:1698
    1. cur_frm.cscript.add_new_imageVM492:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

6. Taking a clue from error in point 5, I tried replacing dt with "Sales Order". But now it says dn is not defined

7. Now if I replace dn with "SO/14-15/00041" it again starts giving me an error that "Please select an image first".

8. I went through the Client Side Cookbook and used doc.doctype and doc.docname in place of dt and dn but get the following error:

  1. Uncaught TypeError: Cannot read property 'new_image' of undefined VM678:1699
    1. cur_frm.cscript.add_new_imageVM678:1699
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

9. Similarly searching through forums and google searches I have been trying to make changes to the top 3 lines of the script but with same results.

So this is basically what I have been trying without success. Any pointers from this point forward?

Regards

On Monday, 19 May 2014 21:24:57 UTC+5:30, rushabh wrote:
Satish,

I am unable to follow what trials you are doing. You need to share your scripts so that we know what you are doing.



@rushabh_mehta

On 19-May-2014, at 8:11 pm, Satish <sa...@gmail.com> wrote:

Hi

I have come back to this thread after a lot of searching and trials but without success. Can someone give me pointers in what I want to achieve? This is really important for us. 

Regards
Satish Gupta


On Wednesday, 7 May 2014 11:25:39 UTC+5:30, Satish wrote:
There is no custom field on main form. Neither is there any field with the same name. Also I have tried changing the field name but no success.
Don't you think the  reference   cur_frm.doc.attach_image   needs to be changed to something else?? Will it work even for the field on child table if there is no similarly named field on main form??

Regards
Satish Gupta



On Wednesday, 7 May 2014 11:14:05 UTC+5:30, rushabh wrote:
yes your custom script is not being executed/

If there is a field called "attach_image" in both parent and child, I think it will not execute for child. Can you name your child field differently ?

On Wednesday, May 7, 2014 11:04:13 AM UTC+5:30, Satish wrote:
Hi

I have added line   'console.log(d)'    after   defining   'var d'   but I don't get any output in the console. As I press the button I get the same error as earlier.
Directly typing  console.log(d)  in the console window returns that   d is not defined.

Another interesting thing I noticed is that even if I remove the script and I press the button, I get the same error as told in earlier post. So it seems to me that pressing the button doesn't even trigger the script. It is as if the script doesn't exist at all. Though not sure but I think the reference of attach_image button needs to be changed in the begging of the script. which means the line

"cur_frm.doc.attach_image"    needs to be changed to something else. This seems to be pointing to a field which doesn't exist. The field "attach_image" actually exists on the child table  sales_order_details


Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/99c149ea-93b1-4bc0-9c0d-7de78aef793c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/851006d3-d192-415c-948e-c6a76c021d75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/26a3e4f2-4350-4407-806c-9f8930757b4b%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b9f9621c-b97f-445c-8ad3-b2c531d78498%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/EE5712B1-2765-4D3D-8B78-967B1B9E51C6%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Satish,

It is really hard to visualize to me what you are trying to do, others please try. I would recommend that you hire a freelancer to help you out.

best,
Rushabh



@rushabh_mehta

On 22-May-2014, at 7:30 pm, Satish <sa...@gmail.com> wrote:

I have changed   var d = locals(dt, dn)   to    d = locals[dt][dn]

Now it is not doing anything. Not even an error.

Regards
Satish 

On Thursday, 22 May 2014 19:11:31 UTC+5:30, rushabh wrote:
should be 

d = locals[dt][dn]



@rushabh_mehta

On 22-May-2014, at 7:10 pm, Satish <sa...@gmail.com> wrote:

Well a white highlighter blinks once on the line  var d = locals(dt, dn);

Regards
Satish Gupta

On Thursday, 22 May 2014 18:56:40 UTC+5:30, rushabh wrote:


Hi

I have all three of my custom fields on child table "Sales Order Item" under the main form "Sales Order". So maybe that explains why doc won't work.
However, I have associated the script with Doctype "Sales Order" and not "Sales Order Item" as you said earlier that the script needs to be associated with the main form only.

Clicking on VM325:1698 doesn't help. It just shows the my written script. Nothing else.

Which line does it show the error in?


Regards
Satish Gupta



On Thursday, 22 May 2014 18:04:51 UTC+5:30, rushabh wrote:

Hi

I am taking the script I earlier shared as the base and making small changes to it to see the effect. I am assuming that the script is basically correct and I just need to make some changes to control references to get it right. The link to script is   http://pastebin.com/HfaLqmhZ  
I may be grossly wrong and if I am please do indicate. Then I might stop banging my head over it.


doc will never work in the child table. Are you running this on a child table or main form?


1. First of all if I start the script with    cur_frm.doc.add_new_image (i have changed the custom field names)   instead of   cur_frm.cscript.add_new_image  the script is not triggered at all. I gives the following error:

Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 104, in run_server_obj raise Exception, 'No method %s' % method_name Exception: No method



Seems unrelated

2. When I use cur_frm.cscript.add_new_image it returns "Please select and image first" even though the image is already selected.

3. If I declare a variable d with var d = locals(dt, dn) then it gives the following error:

  1. Uncaught TypeError: object is not a function VM325:1698
    1. cur_frm.cscript.add_new_imageVM325:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle


Seems like an error in the script. Click on the VM325:1698 and see where it is stuck.

4. If I declare variable using  var d = locals[dt][dn]   then nothing happens. I click the button and no error is shown either in pop-up or in console.

5. If I declare variable using poing 4  and remove   dt, dn   from   function i.e.   cur_frm.cscript.add_new_image = function (doc)  then I get the following error:

  1. Uncaught ReferenceError: dt is not defined VM492:1698
    1. cur_frm.cscript.add_new_imageVM492:1698
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

6. Taking a clue from error in point 5, I tried replacing dt with "Sales Order". But now it says dn is not defined

7. Now if I replace dn with "SO/14-15/00041" it again starts giving me an error that "Please select an image first".

8. I went through the Client Side Cookbook and used doc.doctype and doc.docname in place of dt and dn but get the following error:

  1. Uncaught TypeError: Cannot read property 'new_image' of undefined VM678:1699
    1. cur_frm.cscript.add_new_imageVM678:1699
    2. wn.ui.form.ScriptManager.Class.extend.triggerall-app.min.js:2078
    3. wn.ui.form.ControlButton.wn.ui.form.ControlData.extend.onclickall-app.min.js:2134
    4. (anonymous function)all-app.min.js:2134
    5. b.event.dispatchjquery.min.js:2
    6. v.handle

9. Similarly searching through forums and google searches I have been trying to make changes to the top 3 lines of the script but with same results.

So this is basically what I have been trying without success. Any pointers from this point forward?

Regards

On Monday, 19 May 2014 21:24:57 UTC+5:30, rushabh wrote:
Satish,

I am unable to follow what trials you are doing. You need to share your scripts so that we know what you are doing.



@rushabh_mehta

On 19-May-2014, at 8:11 pm, Satish <sa...@gmail.com> wrote:

Hi

I have come back to this thread after a lot of searching and trials but without success. Can someone give me pointers in what I want to achieve? This is really important for us. 

Regards
Satish Gupta


On Wednesday, 7 May 2014 11:25:39 UTC+5:30, Satish wrote:
There is no custom field on main form. Neither is there any field with the same name. Also I have tried changing the field name but no success.
Don't you think the  reference   cur_frm.doc.attach_image   needs to be changed to something else?? Will it work even for the field on child table if there is no similarly named field on main form??

Regards
Satish Gupta



On Wednesday, 7 May 2014 11:14:05 UTC+5:30, rushabh wrote:
yes your custom script is not being executed/

If there is a field called "attach_image" in both parent and child, I think it will not execute for child. Can you name your child field differently ?

On Wednesday, May 7, 2014 11:04:13 AM UTC+5:30, Satish wrote:
Hi

I have added line   'console.log(d)'    after   defining   'var d'   but I don't get any output in the console. As I press the button I get the same error as earlier.
Directly typing  console.log(d)  in the console window returns that   d is not defined.

Another interesting thing I noticed is that even if I remove the script and I press the button, I get the same error as told in earlier post. So it seems to me that pressing the button doesn't even trigger the script. It is as if the script doesn't exist at all. Though not sure but I think the reference of attach_image button needs to be changed in the begging of the script. which means the line

"cur_frm.doc.attach_image"    needs to be changed to something else. This seems to be pointing to a field which doesn't exist. The field "attach_image" actually exists on the child table  sales_order_details


Regards
Satish Gupta





Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/99c149ea-93b1-4bc0-9c0d-7de78aef793c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/851006d3-d192-415c-948e-c6a76c021d75%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/26a3e4f2-4350-4407-806c-9f8930757b4b%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b9f9621c-b97f-445c-8ad3-b2c531d78498%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/580dcec1-2cd0-45c0-9e0b-0d9980f6b81d%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7AEFE7BE-A52D-4E97-87F6-DFEA17AF0BBE%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.