–
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 post to this group, send email to er...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b0472065-021a-4946-b504-24e2f97de4b3%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Hi,like Addy posted in user-forum in january me too would like to use address_title.Simply adding it to address_display in transaction_base.py wouldn't be nice becauseit stops nice injection of contact's name.Am I missing any way to get this fields content in my document?Or do i have to add new method to transaction_base.py, to documents'js and fetch to a new field?Wouldn't this be a nice addition for future release, should i give pull-request once tested?Best regards,Sören–
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 post to this group, send email to er…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b0472065-021a-4946-b504-24e2f97de4b3%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/B4E914CC-184F-4A1F-8CD0-6CDFE6E1798D%40erpnext.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
On Tuesday, May 28, 2013 11:50:37 AM UTC+2, Anand Doshi wrote:
Hi Sören,In your custom script (client), you can use:wn.model.with_doc("Address", address_name, function() {var address = wn.model.get_doc("Address", address_name);// now access address[fieldname]});Thanks,Anand.On 28-May-2013, at 3:11 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:Hi,like Addy posted in user-forum in january me too would like to use address_title.Simply adding it to address_display in transaction_base.py wouldn't be nice becauseit stops nice injection of contact's name.Am I missing any way to get this fields content in my document?Or do i have to add new method to transaction_base.py, to documents'js and fetch to a new field?Wouldn't this be a nice addition for future release, should i give pull-request once tested?Best regards,Sören–
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 post to this group, send email to erpnext-dev…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b0472065-021a-4946-b504-24e2f97de4b3%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a2ec92f6-ee09-4928-8b66-d2afa1307676%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
wn.model.with_doc("Address", doc.customer_address, function() {
var address = wn.model.get_doc("Address", doc.customer_address);
doc.anschrift = address["address_title"];
}
);
}
On Tuesday, May 28, 2013 11:50:37 AM UTC+2, Anand Doshi wrote:
Hi Sören,In your custom script (client), you can use:wn.model.with_doc("Address", address_name, function() {var address = wn.model.get_doc("Address", address_name);// now access address[fieldname]});Thanks,Anand.On 28-May-2013, at 3:11 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:Hi,like Addy posted in user-forum in january me too would like to use address_title.Simply adding it to address_display in transaction_base.py wouldn't be nice becauseit stops nice injection of contact's name.Am I missing any way to get this fields content in my document?Or do i have to add new method to transaction_base.py, to documents'js and fetch to a new field?Wouldn't this be a nice addition for future release, should i give pull-request once tested?Best regards,Sören–
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 post to this group, send email to erpnext-dev…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b0472065-021a-4946-b504-24e2f97de4b3%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/fe8cf446-337e-45bb-b07c-f7d828bfa485%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
On Thursday, May 30, 2013 3:35:33 PM UTC+2, Sören H. Biere wrote:
Hi,I would like to fill my field 'anschrift' with the address_title and used the refresh-function with the lines you gave me.It works it fills the Anschrift-field only on save or next refresh. Great would be if it fills me 'anschrift' when i choose the new customer.Like it ist with cur_frm.add_fetch. Could you give me a hint where i might have to look at.In the moment i choose the customer and it refreshs customer_address still seems to be empty.Thank you very much!Sörencur_frm.cscript.refresh = function(doc, cdt, cdn) {if(doc.customer_address) {
wn.model.with_doc("Address", doc.customer_address, function() {
var address = wn.model.get_doc("Address", doc.customer_address);
doc.anschrift = address["address_title"];
}
);
}}
On Tuesday, May 28, 2013 11:50:37 AM UTC+2, Anand Doshi wrote:Hi Sören,In your custom script (client), you can use:wn.model.with_doc("Address", address_name, function() {var address = wn.model.get_doc("Address", address_name);// now access address[fieldname]});Thanks,Anand.On 28-May-2013, at 3:11 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:Hi,like Addy posted in user-forum in january me too would like to use address_title.Simply adding it to address_display in transaction_base.py wouldn't be nice becauseit stops nice injection of contact's name.Am I missing any way to get this fields content in my document?Or do i have to add new method to transaction_base.py, to documents'js and fetch to a new field?Wouldn't this be a nice addition for future release, should i give pull-request once tested?Best regards,Sören–
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 post to this group, send email to er…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b0472065-021a-4946-b504-24e2f97de4b3%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/45c92469-6fae-4c16-93eb-c219ecb6af8f%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
if(doc.customer_address) {
wn.model.with_doc("Address", doc.customer_address, function() {
var address = wn.model.get_doc("Address", doc.customer_address);
doc.anschrift = address["address_title"];
}
);
}
perhaps i should use the function loading the default_address to ensure customer_address is filled - but my tests didn't work out as well.Greets from Germany,Sören
On Thursday, May 30, 2013 3:35:33 PM UTC+2, Sören H. Biere wrote:Hi,I would like to fill my field 'anschrift' with the address_title and used the refresh-function with the lines you gave me.It works it fills the Anschrift-field only on save or next refresh. Great would be if it fills me 'anschrift' when i choose the new customer.Like it ist with cur_frm.add_fetch. Could you give me a hint where i might have to look at.In the moment i choose the customer and it refreshs customer_address still seems to be empty.Thank you very much!Sörencur_frm.cscript.refresh = function(doc, cdt, cdn) {if(doc.customer_address) {
wn.model.with_doc("Address", doc.customer_address, function() {
var address = wn.model.get_doc("Address", doc.customer_address);
doc.anschrift = address["address_title"];
}
);
}}
On Tuesday, May 28, 2013 11:50:37 AM UTC+2, Anand Doshi wrote:Hi Sören,In your custom script (client), you can use:wn.model.with_doc("Address", address_name, function() {var address = wn.model.get_doc("Address", address_name);// now access address[fieldname]});Thanks,Anand.On 28-May-2013, at 3:11 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:Hi,like Addy posted in user-forum in january me too would like to use address_title.Simply adding it to address_display in transaction_base.py wouldn't be nice becauseit stops nice injection of contact's name.Am I missing any way to get this fields content in my document?Or do i have to add new method to transaction_base.py, to documents'js and fetch to a new field?Wouldn't this be a nice addition for future release, should i give pull-request once tested?Best regards,Sören–
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 post to this group, send email to er…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b0472065-021a-4946-b504-24e2f97de4b3%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/45c92469-6fae-4c16-93eb-c219ecb6af8f%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/37F85072-2A27-421E-9510-421410DBDAD9%40erpnext.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
T: @rushabh_mehta
Hi Sören,Please don't override the default refresh function. You should use cur_frm.cscript.custom_(existing_function_name) instead.You can use:cur_frm.cscript.custom_validate = function(doc) {if(doc.customer_address) {
wn.model.with_doc("Address", doc.customer_address, function() {
var address = wn.model.get_doc("Address", doc.customer_address);
doc.anschrift = address["address_title"];
}
);
}}so that it gets stored on save. (or custom_on_submit for before submit)I can't think of a straightforward way of setting your values on customer trigger without changing the server side function. The customer_address value is fetched on change of customer and only when this value is available can you get the Address document and set anschrift.Thanks,Anand.On 30-May-2013, at 7:09 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:perhaps i should use the function loading the default_address to ensure customer_address is filled - but my tests didn't work out as well.Greets from Germany,Sören
On Thursday, May 30, 2013 3:35:33 PM UTC+2, Sören H. Biere wrote:Hi,I would like to fill my field 'anschrift' with the address_title and used the refresh-function with the lines you gave me.It works it fills the Anschrift-field only on save or next refresh. Great would be if it fills me 'anschrift' when i choose the new customer.Like it ist with cur_frm.add_fetch. Could you give me a hint where i might have to look at.In the moment i choose the customer and it refreshs customer_address still seems to be empty.Thank you very much!Sörencur_frm.cscript.refresh = function(doc, cdt, cdn) {if(doc.customer_address) {
wn.model.with_doc("Address", doc.customer_address, function() {
var address = wn.model.get_doc("Address", doc.customer_address);
doc.anschrift = address["address_title"];
}
);
}}
On Tuesday, May 28, 2013 11:50:37 AM UTC+2, Anand Doshi wrote:Hi Sören,In your custom script (client), you can use:wn.model.with_doc("Address", address_name, function() {var address = wn.model.get_doc("Address", address_name);// now access address[fieldname]});Thanks,Anand.On 28-May-2013, at 3:11 PM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:Hi,like Addy posted in user-forum in january me too would like to use address_title.Simply adding it to address_display in transaction_base.py wouldn't be nice becauseit stops nice injection of contact's name.Am I missing any way to get this fields content in my document?Or do i have to add new method to transaction_base.py, to documents'js and fetch to a new field?Wouldn't this be a nice addition for future release, should i give pull-request once tested?Best regards,Sören–
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 post to this group, send email to er…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b0472065-021a-4946-b504-24e2f97de4b3%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/45c92469-6fae-4c16-93eb-c219ecb6af8f%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/37F85072-2A27-421E-9510-421410DBDAD9%40erpnext.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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 post to this group, send email to er...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5E635B6A-2CD4-4895-B6F8-7C1BBFAEB4E2%40erpnext.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.