Help needed: Printing Custom field

let said  I have created a custom field name tax_number for Customer. How do I access that data from Quotation, Sales Order, Invoice etc. 

scenario 2: custom field name requisition_num for Opportunity. I can access it using (doc.requisition_num) from a Quotation make from that Opportunity. But How do I access it from Sales Order ( created from that Quotation)?

I do not want to modify the value or anything. I just need to print those custom field value onto difference Document.

Thanks in advance.



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/9497d7e5-eb00-47c4-8bd8-50f604126e10%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Scenario 1: Check https://frappe.io/apps/erpnext/user-guide/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master

Scenario 2: You should create custom field "requisition_num" for all documents with same name. In that way, when you create a quotation from opportunity or So from Quotation, the custom field value should automatically mapped from previous doc. Then you can easily access the value using doc.requisition_num.


On 19-May-2014, at 4:26 pm, Nonnatee Kanjana <no...@ps-groups.com> wrote:

let said  I have created a custom field name tax_number for Customer. How do I access that data from Quotation, Sales Order, Invoice etc. 

scenario 2: custom field name requisition_num for Opportunity. I can access it using (doc.requisition_num) from a Quotation make from that Opportunity. But How do I access it from Sales Order ( created from that Quotation)?

I do not want to modify the value or anything. I just need to print those custom field value onto difference Document.

Thanks in advance.



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/9497d7e5-eb00-47c4-8bd8-50f604126e10%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/D5FAF6A5-76F5-4728-83DC-ADD5654ADE6A%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Just tested both scenarios, works nicely. Thank you so much.

However, what if we just wanted to create custom field just once for Customer. Can the value still be refer to from any doc which have Customer doctype link to. much like referring to an attribute/ variable of a child object (e.g.’ objA.childObj.var_x or doc.customer.vat_id). Perhaps, a similar function call to addfetch but return and store value into variable rather than target_fieldname? If their isn’t any, then it’s ok. 

Note. I’m trying to create dynamic print format template which can be use on many document  such as Quotation, SO, Delivery Note, Invoice etc. 

On Monday, May 19, 2014 9:25:50 PM UTC+7, Nabin Hait wrote:
Scenario 1: Check https://frappe.io/apps/erpnext/user-guide/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master

Scenario 2: You should create custom field "requisition_num" for all documents with same name. In that way, when you create a quotation from opportunity or So from Quotation, the custom field value should automatically mapped from previous doc. Then you can easily access the value using doc.requisition_num.


On 19-May-2014, at 4:26 pm, Nonnatee Kanjana <no...@ps-groups.com> wrote:

let said  I have created a custom field name tax_number for Customer. How do I access that data from Quotation, Sales Order, Invoice etc. 

scenario 2: custom field name requisition_num for Opportunity. I can access it using (doc.requisition_num) from a Quotation make from that Opportunity. But How do I access it from Sales Order ( created from that Quotation)?

I do not want to modify the value or anything. I just need to print those custom field value onto difference Document.

Thanks in advance.



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/9497d7e5-eb00-47c4-8bd8-50f604126e10%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/b882a22a-21df-43d0-9bcc-9e2f8830049e%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
NO, custom field value of customer does not get copied automatically in other document. You have to create custom field for all docs and then write add_fetch code to fetch value.

On 19-May-2014, at 11:08 pm, Nonnatee Kanjana <no...@ps-groups.com> wrote:

Just tested both scenarios, works nicely. Thank you so much.

However, what if we just wanted to create custom field just once for Customer. Can the value still be refer to from any doc which have Customer doctype link to. much like referring to an attribute/ variable of a child object (e.g.’ objA.childObj.var_x or doc.customer.vat_id). Perhaps, a similar function call to addfetch but return and store value into variable rather than target_fieldname? If their isn’t any, then it’s ok. 

Note. I’m trying to create dynamic print format template which can be use on many document  such as Quotation, SO, Delivery Note, Invoice etc. 

On Monday, May 19, 2014 9:25:50 PM UTC+7, Nabin Hait wrote:
Scenario 1: Check https://frappe.io/apps/erpnext/user-guide/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master

Scenario 2: You should create custom field "requisition_num" for all documents with same name. In that way, when you create a quotation from opportunity or So from Quotation, the custom field value should automatically mapped from previous doc. Then you can easily access the value using doc.requisition_num.


On 19-May-2014, at 4:26 pm, Nonnatee Kanjana <nonn...@ps-groups.com> wrote:

let said  I have created a custom field name tax_number for Customer. How do I access that data from Quotation, Sales Order, Invoice etc. 

scenario 2: custom field name requisition_num for Opportunity. I can access it using (doc.requisition_num) from a Quotation make from that Opportunity. But How do I access it from Sales Order ( created from that Quotation)?

I do not want to modify the value or anything. I just need to print those custom field value onto difference Document.

Thanks in advance.

-- 
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/9497d7e5-eb00-47c4-8bd8-50f604126e10%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/b882a22a-21df-43d0-9bcc-9e2f8830049e%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/EA0163A3-E08B-405E-A017-C9C3D600579D%40gmail.com.

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