Customization of print format

Hi,

I'm trying to add a couple of fields to my sales invoice print format. Specifically, I am trying to add these two fields:

"Customer Details" from the linked Customer
"Customer Company" from the linked Billing address

What I tried is this:

<script>doc.customer.customer_details</script>
<script>doc.customer_address.customer_company</script>

This does not throw any error but it also does not give me any output.

There doesn't seem to be any useful documentation on the API for this. Or am I just not finding it?

Thanks for any help!
André



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0847eba5-543a-4021-90bc-28ccbcd3a5cc%40googlegroups.com.

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


On 11-Sep-2014, at 8:35 pm, André <an...@gmail.com> wrote:

Hi,

I'm trying to add a couple of fields to my sales invoice print format. Specifically, I am trying to add these two fields:

"Customer Details" from the linked Customer
"Customer Company" from the linked Billing address

What I tried is this:

<script>doc.customer.customer_details</script>
<script>doc.customer_address.customer_company</script>

Which version are you using?

In the latest version, use server side print formats.

You can set / unset fields by setting Print Hide


This does not throw any error but it also does not give me any output.

There doesn't seem to be any useful documentation on the API for this. Or am I just not finding it?

Thanks for any help!
André



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0847eba5-543a-4021-90bc-28ccbcd3a5cc%40googlegroups.com.

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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/00CA65F0-087B-46E9-9545-E56873CA72AD%40gmail.com.

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

I don't know how to see which version I'm on, but it's definitely not the latest. I think it's 3.8.x.



On Friday, September 12, 2014 7:11:19 AM UTC+2, rushabh wrote:


On 11-Sep-2014, at 8:35 pm, André <an...@gmail.com> wrote:

Hi,

I'm trying to add a couple of fields to my sales invoice print format. Specifically, I am trying to add these two fields:

"Customer Details" from the linked Customer
"Customer Company" from the linked Billing address

What I tried is this:

<script>doc.customer.customer_details</script>
<script>doc.customer_address.customer_company</script>

Which version are you using?

In the latest version, use server side print formats.

You can set / unset fields by setting Print Hide


This does not throw any error but it also does not give me any output.

There doesn't seem to be any useful documentation on the API for this. Or am I just not finding it?

Thanks for any help!
André



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0847eba5-543a-4021-90bc-28ccbcd3a5cc%40googlegroups.com.

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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f2995d35-293d-413a-8606-2aa43f8f07d6%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
You can only access fields the form

You will have to add customer_details in the invoice form. Search for add_fetch

@rushabh_mehta
via mobile

On 12-Sep-2014, at 4:07 PM, André <an...@gmail.com> wrote:


I don't know how to see which version I'm on, but it's definitely not the latest. I think it's 3.8.x.



On Friday, September 12, 2014 7:11:19 AM UTC+2, rushabh wrote:


On 11-Sep-2014, at 8:35 pm, André <an...@gmail.com> wrote:

Hi,

I'm trying to add a couple of fields to my sales invoice print format. Specifically, I am trying to add these two fields:

"Customer Details" from the linked Customer
"Customer Company" from the linked Billing address

What I tried is this:

<script>doc.customer.customer_details</script>
<script>doc.customer_address.customer_company</script>

Which version are you using?

In the latest version, use server side print formats.

You can set / unset fields by setting Print Hide


This does not throw any error but it also does not give me any output.

There doesn't seem to be any useful documentation on the API for this. Or am I just not finding it?

Thanks for any help!
André



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0847eba5-543a-4021-90bc-28ccbcd3a5cc%40googlegroups.com.

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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f2995d35-293d-413a-8606-2aa43f8f07d6%40googlegroups.com.

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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/99B9799F-DF8E-4A8D-A170-4185CA239DCD%40gmail.com.

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