Client Side - Fetching Custom Field and Calculations

Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede







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/4876b0f7-5b7a-4a20-897c-fbe156243faa%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede







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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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/5C98D7CF-6149-4AF8-8E0E-8EDCE8286EA6%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across. 

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Have you also tagged your field as "No Copy"?
On 30-Jun-2014, at 10:40 am, Federico Torreti <to...@gmail.com> wrote:

The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across. 

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%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/F279F652-ED3C-4734-8D8C-3584D9DD4F8E%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
The "no copy" option in the custom field is not ticked off. Do you mean that it should be ticked off?

Fede


On Monday, 30 June 2014 13:17:32 UTC+8, rushabh wrote:
Have you also tagged your field as "No Copy"?
On 30-Jun-2014, at 10:40 am, Federico Torreti <to...@gmail.com> wrote:

The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across. 

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%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/ff5685fd-9ca2-46c4-9f72-59a77d2f048c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
No it should not be ticked (both in the source and destination) - otherwise it should work.



@rushabh_mehta

On 30-Jun-2014, at 11:19 am, Federico Torreti <to...@gmail.com> wrote:

The "no copy" option in the custom field is not ticked off. Do you mean that it should be ticked off?

Fede


On Monday, 30 June 2014 13:17:32 UTC+8, rushabh wrote:
Have you also tagged your field as "No Copy"?
On 30-Jun-2014, at 10:40 am, Federico Torreti <to...@gmail.com> wrote:

The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across. 

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%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/ff5685fd-9ca2-46c4-9f72-59a77d2f048c%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/2FFBEE98-9FF5-44D6-A60B-A62AEE99FC1E%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Hi Rushabh - None are ticked off.

What can we do to debug this so we can check where the problem is?

Thanks,
Fede


On Monday, 30 June 2014 14:18:15 UTC+8, rushabh wrote:
No it should not be ticked (both in the source and destination) - otherwise it should work.



@rushabh_mehta

On 30-Jun-2014, at 11:19 am, Federico Torreti <to...@gmail.com> wrote:

The "no copy" option in the custom field is not ticked off. Do you mean that it should be ticked off?

Fede


On Monday, 30 June 2014 13:17:32 UTC+8, rushabh wrote:
Have you also tagged your field as "No Copy"?
On 30-Jun-2014, at 10:40 am, Federico Torreti <to...@gmail.com> wrote:

The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across. 

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%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/ff5685fd-9ca2-46c4-9f72-59a77d2f048c%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/5eed717f-a1c4-4c48-94b3-15d64a0b1a2e%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Item table does not get mapped from Delivery Note to Packing Slip. For that you have to modify make_packing_slip function in https://github.com/frappe/erpnext/blob/develop/erpnext/stock/doctype/delivery_note/delivery_note.py#L356. Please check other mapping function and mapper.py, to know how it works



On Tue, Jul 1, 2014 at 7:07 AM, Federico Torreti <to...@gmail.com> wrote:
Hi Rushabh - None are ticked off.

What can we do to debug this so we can check where the problem is?

Thanks,
Fede


On Monday, 30 June 2014 14:18:15 UTC+8, rushabh wrote:
No it should not be ticked (both in the source and destination) - otherwise it should work.



@rushabh_mehta

On 30-Jun-2014, at 11:19 am, Federico Torreti <to...@gmail.com> wrote:

The "no copy" option in the custom field is not ticked off. Do you mean that it should be ticked off?

Fede


On Monday, 30 June 2014 13:17:32 UTC+8, rushabh wrote:
Have you also tagged your field as "No Copy"?
On 30-Jun-2014, at 10:40 am, Federico Torreti <to...@gmail.com> wrote:

The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across.

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment.

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip.


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






--
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/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%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/ff5685fd-9ca2-46c4-9f72-59a77d2f048c%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/5eed717f-a1c4-4c48-94b3-15d64a0b1a2e%40googlegroups.com.

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



--
Regards,
Nabin Hait



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/CA%2BCj7thPnbpNcOoM6-SbJDAufNQBicRnqP4dOcoSKDTSCOk2MQ%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Hi Nabin - I developed a work around for this which I posted earlier as I am not able to edit the pyton as I am hosted on frappecloud.

Thanks for the input though.

On Tuesday, 1 July 2014 13:07:13 UTC+8, Nabin Hait wrote:
Item table does not get mapped from Delivery Note to Packing Slip. For that you have to modify make_packing_slip function in https://github.com/frappe/erpnext/blob/develop/erpnext/stock/doctype/delivery_note/delivery_note.py#L356. Please check other mapping function and mapper.py, to know how it works



On Tue, Jul 1, 2014 at 7:07 AM, Federico Torreti <to...@gmail.com> wrote:
Hi Rushabh - None are ticked off.

What can we do to debug this so we can check where the problem is?

Thanks,
Fede


On Monday, 30 June 2014 14:18:15 UTC+8, rushabh wrote:
No it should not be ticked (both in the source and destination) - otherwise it should work.



@rushabh_mehta

On 30-Jun-2014, at 11:19 am, Federico Torreti <to...@gmail.com> wrote:

The "no copy" option in the custom field is not ticked off. Do you mean that it should be ticked off?

Fede


On Monday, 30 June 2014 13:17:32 UTC+8, rushabh wrote:
Have you also tagged your field as "No Copy"?
On 30-Jun-2014, at 10:40 am, Federico Torreti <to...@gmail.com> wrote:

The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across. 

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/ff5685fd-9ca2-46c4-9f72-59a77d2f048c%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/5eed717f-a1c4-4c48-94b3-15d64a0b1a2e%40googlegroups.com.

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



--
Regards,
Nabin Hait



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/1fcc4cf5-3424-4f33-85ba-4e9aede2fce5%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Federico - same name fields should be mapped - we will fix this. Since you are a subscriber, please send an email to su...@erpnext.com we will do it on priority.


On 01-Jul-2014, at 11:41 am, Federico Torreti <to...@gmail.com> wrote:

Hi Nabin - I developed a work around for this which I posted earlier as I am not able to edit the pyton as I am hosted on frappecloud.

Thanks for the input though.

On Tuesday, 1 July 2014 13:07:13 UTC+8, Nabin Hait wrote:
Item table does not get mapped from Delivery Note to Packing Slip. For that you have to modify make_packing_slip function in https://github.com/frappe/erpnext/blob/develop/erpnext/stock/doctype/delivery_note/delivery_note.py#L356. Please check other mapping function and mapper.py, to know how it works



On Tue, Jul 1, 2014 at 7:07 AM, Federico Torreti <to...@gmail.com> wrote:
Hi Rushabh - None are ticked off.

What can we do to debug this so we can check where the problem is?

Thanks,
Fede


On Monday, 30 June 2014 14:18:15 UTC+8, rushabh wrote:
No it should not be ticked (both in the source and destination) - otherwise it should work.



@rushabh_mehta

On 30-Jun-2014, at 11:19 am, Federico Torreti <to...@gmail.com> wrote:

The "no copy" option in the custom field is not ticked off. Do you mean that it should be ticked off?

Fede


On Monday, 30 June 2014 13:17:32 UTC+8, rushabh wrote:
Have you also tagged your field as "No Copy"?
On 30-Jun-2014, at 10:40 am, Federico Torreti <to...@gmail.com> wrote:

The field in the packing slip has the same fieldname. I was under the same impression but it just doesn't seem to copy across. 

Any suggestions on how can I debug it more accurately?


On Monday, 30 June 2014 13:06:40 UTC+8, rushabh wrote:
Create an additional field in Packing Slip and make sure it has the same fieldname.

Fields with the same fieldname, get copied into the mapped document.

You will have to change the Print Format appropriately


On 29-Jun-2014, at 4:56 pm, Federico Torreti <to...@gmail.com> wrote:

Quick update for the delivery note.

I just realized that using this code I was able to get it work. So now I can get box quantity per Item and total box quantity per shipment. 

Open question is how to get the packing slip to fetch the packaging quantity and the nr of boxes when it is created from the delivery note. Thoughts?




On Sunday, 29 June 2014 16:55:22 UTC+8, Federico Torreti wrote:
Folks I have then been trying to find a way to get on the packing slip to print how many boxes are being shipped given the total quantity ordered for a given item and its packaging quantity.
Rushabh suggested me to try with custom fields as in to have Packaging Quantity on Item master and having this packaging quantity fetched from packing slip. Now while Sales Order and Delivery Note are "almost" OK, I am having troubles with customization of the packing slip. 


What I am trying to do:
Track for each order how many boxes are being shipped out and what is the packaging qty for each item. (Each item has a fixed packaging qty and price does not change with qty sold).
I can only use client side scripting as we are hosted on frappe.

For Example:

Item 1 with packaging quantity 100
If the order is for 200pcs in the packing slip there should be Quantity = 200, Total Box = 2 and Packaging Quantity = 100 (this is to comply with custom regulations when importing/exporting in/from certain countries)

What I have done:
For Packaging Quantity:
I have created custom fields in Item master, in Sales Order Item, Delivery Note Item and Packing Slip Item all with the same name.
For Total Nr Boxes:
I have created custom fields in Delivery Note Item and Packing Slip Item all with the same name.

Results
Sales Order
When I create a Sales Order, everything works fine. Packaging Quantity is populated from the Item Master using this code and it is OK.

Delivery Note
When I create a Delivery Note, if I pull from a Sales Order "Packaging Quantity" is not populated automatically. I need to use this code and it is OK.
However I cannot access the custom field "boxes" in the Deliver Note Items to put the Total Boxes = Item Quantity / Item Packaging Quantity.

Packing Slip
When I create a Packing Slip from a Delivery Note "Packaging Quantity" remains blank and I cannot figure out a way to get this solved.


Questions

1. Is it possible to have the custom field from Delivery Note to be populated automatically when a Delivery Note is created from a Sales Order which has the custom field populated from the Item Master?
2. How do I get the packaging quantity from the Item Master to Packing Slip via the Delivery Note? I am puzzled that this is not behaving in the same way as it does for the delivery note.
3. How can I do a calculation on table items to determine the actual nr of boxes? I looked at this wiki but I can't get it to work as I receive the error wn is undefined.
4. I also noticed that in the packing slip if I try to add a new row or pick another item in the entry populated from the delivery note I get a Internal Server Error 500. Is this a possible bug? The packing slip in my logic should be attached to the delivery note, so no real need to edit the packing slip, but I wasn't expecting a server error.


Thanks a lot in advance!

Fede






-- 
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3d85929c-b5a2-40ae-af85-82cbd6bc7945%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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/2f3ceea0-34bb-4434-aad5-9baa5b6254ae%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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/ff5685fd-9ca2-46c4-9f72-59a77d2f048c%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/5eed717f-a1c4-4c48-94b3-15d64a0b1a2e%40googlegroups.com.

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



--
Regards,
Nabin Hait



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/1fcc4cf5-3424-4f33-85ba-4e9aede2fce5%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/5D450AB5-B28F-444A-A13A-4D93E6CF7046%40gmail.com.

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