Disable Editing of Custom Field and Enable HTML formatted Small Text Field

Dear Experts,

I am trying to disable editing of a custom field I created in the Sales Invoice screen.

For example, in the Sales Order screen are shipping_address and shipping_address_name fields (hidden by default). The shipping_address field is of type "Small Text" but is specifically disabled in that form.

I created a custom field in the Sales Invoice screen using the type "Small Text" but it provides me with an editable Text Area. Is there a way I can:
1) Disable the text area from editing
2) Allow it to be HTML formatted so that tags like <br> etc. will output accordingly

Thanks so much once again.


Javier


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/ac8771e4-af34-47ef-b1a0-b6c9153cf354%40googlegroups.com.

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


On 23-Sep-2014, at 1:41 pm, Javier Wong <bo...@gmail.com> wrote:

Dear Experts,

I am trying to disable editing of a custom field I created in the Sales Invoice screen.

For example, in the Sales Order screen are shipping_address and shipping_address_name fields (hidden by default). The shipping_address field is of type "Small Text" but is specifically disabled in that form.

I created a custom field in the Sales Invoice screen using the type "Small Text" but it provides me with an editable Text Area. Is there a way I can:
1) Disable the text area from editing
2) Allow it to be HTML formatted so that tags like <br> etc. will output accordingly

Create an HTML field (?)

Thanks so much once again.


Javier


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/ac8771e4-af34-47ef-b1a0-b6c9153cf354%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/FBFE0047-C191-4B1F-990D-51DE1C64A9C4%40gmail.com.

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

Thanks for the reply, however that didn't work.

Perhaps I can give you more details on what I am trying to do. Basically I want to create shipping address fields in the Sales Invoice screen like how it works in the Sales Order screen (once you unhide those fields)

I created the following fields:
1) 
Label: Shipping Address
Type: Link
Name: shipping_address_name
Options: Address

2)
Label: Shipping Address
Type: Small Text
Name: shipping_address

This works wonders and when I select the shipping address in shipping_address_name drop down list, the shipping_address field is populated with html code of the shipping address. Instead of showing the HTML code, I would like to be formatted and if possible non editable --> This is exactly the behaviour of the exact same shipping_address and shipping_address_name fields as in the Sales Order screen.

Any chance this can be done?

Thank you very very much.


Javier


On Tuesday, September 23, 2014 4:38:02 PM UTC+8, rushabh wrote:


On 23-Sep-2014, at 1:41 pm, Javier Wong <bo...@gmail.com> wrote:

Dear Experts,

I am trying to disable editing of a custom field I created in the Sales Invoice screen.

For example, in the Sales Order screen are shipping_address and shipping_address_name fields (hidden by default). The shipping_address field is of type "Small Text" but is specifically disabled in that form.

I created a custom field in the Sales Invoice screen using the type "Small Text" but it provides me with an editable Text Area. Is there a way I can:
1) Disable the text area from editing
2) Allow it to be HTML formatted so that tags like <br> etc. will output accordingly 

Create an HTML field (?)

Thanks so much once again.


Javier


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/ac8771e4-af34-47ef-b1a0-b6c9153cf354%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/33fba873-cf09-4167-af8a-7f3cc47bda9a%40googlegroups.com.

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

On 23-Sep-2014, at 2:32 pm, Javier Wong <bo...@gmail.com> wrote:

Dear Rushabh,

Thanks for the reply, however that didn't work.

Perhaps I can give you more details on what I am trying to do. Basically I want to create shipping address fields in the Sales Invoice screen like how it works in the Sales Order screen (once you unhide those fields)

I created the following fields:
1) 
Label: Shipping Address
Type: Link
Name: shipping_address_name
Options: Address

2)
Label: Shipping Address
Type: Small Text
Name: shipping_address

This works wonders and when I select the shipping address in shipping_address_name drop down list, the shipping_address field is populated with html code of the shipping address. Instead of showing the HTML code, I would like to be formatted and if possible non editable --> This is exactly the behaviour of the exact same shipping_address and shipping_address_name fields as in the Sales Order screen.

Any chance this can be done?

Just re-do this from Sales Order and send a pull-request.


Thank you very very much.


Javier


On Tuesday, September 23, 2014 4:38:02 PM UTC+8, rushabh wrote:


On 23-Sep-2014, at 1:41 pm, Javier Wong <bo...@gmail.com> wrote:

Dear Experts,

I am trying to disable editing of a custom field I created in the Sales Invoice screen.

For example, in the Sales Order screen are shipping_address and shipping_address_name fields (hidden by default). The shipping_address field is of type "Small Text" but is specifically disabled in that form.

I created a custom field in the Sales Invoice screen using the type "Small Text" but it provides me with an editable Text Area. Is there a way I can:
1) Disable the text area from editing
2) Allow it to be HTML formatted so that tags like <br> etc. will output accordingly 

Create an HTML field (?)

Thanks so much once again.


Javier


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/ac8771e4-af34-47ef-b1a0-b6c9153cf354%40googlegroups.com.

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



  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/33fba873-cf09-4167-af8a-7f3cc47bda9a%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/C6E4DDD9-3602-4402-A3CB-3E30E9FF2EB7%40gmail.com.

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