Script to auto populate required date on material request

Since I pulled out a good bit of hair over this, I thought I'd post it for somebody else.

Default Behavior... Sales Order has a Delivery Date. But when you create a material request and try to save it, it tells you that required date is missing... you have to go find it in the individual items, though as soon as you update one they all change to the same value.

So I created a custom field for material request. Label = Delivery Date and type = date.

This field is auto populated from the identical field on the sales order.  So now to update the items... I added this as a custom script to material request.

Thanks to the many folks who have posted before.

http://pastebin.com/L7QR5WTD

Might I say that having a "Delivery Date", a "Scheduled Date", and a "Required Date" is confusing!

--Don



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/01519b99-4d5f-4e11-a7c6-86b84657b5b1%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Thanks! Might be a good idea to add the delivery date in the product itself. Can you add a GitHub issue for this?

@rushabh_mehta
via mobile

On 12-Sep-2014, at 12:40 PM, Don Blackowiak <do...@gmail.com> wrote:

Since I pulled out a good bit of hair over this, I thought I'd post it for somebody else.

Default Behavior... Sales Order has a Delivery Date. But when you create a material request and try to save it, it tells you that required date is missing... you have to go find it in the individual items, though as soon as you update one they all change to the same value.

So I created a custom field for material request. Label = Delivery Date and type = date.

This field is auto populated from the identical field on the sales order.  So now to update the items... I added this as a custom script to material request.

Thanks to the many folks who have posted before.


Might I say that having a "Delivery Date", a "Scheduled Date", and a "Required Date" is confusing!

--Don



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/01519b99-4d5f-4e11-a7c6-86b84657b5b1%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/4F900A9A-796F-4C68-9632-3D7336270401%40gmail.com.

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