Customization of print format

51 views
Skip to first unread message

André

unread,
Sep 11, 2014, 11:05:34 AM9/11/14
to erpnext-dev...@googlegroups.com
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é

Rushabh Mehta

unread,
Sep 12, 2014, 1:11:19 AM9/12/14
to erpnext-dev...@googlegroups.com
On 11-Sep-2014, at 8:35 pm, André <andre....@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...@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.

André

unread,
Sep 12, 2014, 6:37:26 AM9/12/14
to erpnext-dev...@googlegroups.com

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.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Rushabh Mehta

unread,
Sep 12, 2014, 12:25:16 PM9/12/14
to erpnext-dev...@googlegroups.com
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
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f2995d35-293d-413a-8606-2aa43f8f07d6%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages