Doctype Mapper Removed: Problems mapping differently named custom fields

Hi,


With the new erpnext, doctype mapper has been removed which I feel was a good feature may be it was doing something redundant but it generally helped people with implementing rules without the need for a code.

Anyhow I think we have to live with it.

I have a custom field excise_number in Sales Order which was getting mapped easily earlier to DN and to invoices but now it is not getting mapped. The reason is that the custom field in the DN is excise_no (there is a difference).

Now how can I map these fields to DN from SO or to SI from SO if their names are different or would it be possible to rename a custom field then I think we could just rename it the way it is in Sales Order.



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.

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

     

     

On 25-Jul-2013, at 12:47 PM, Addy wrote:

Hi,

With the new erpnext, doctype mapper has been removed which I feel was a good feature may be it was doing something redundant but it generally helped people with implementing rules without the need for a code.

Anyhow I think we have to live with it.

I have a custom field excise_number in Sales Order which was getting mapped easily earlier to DN and to invoices but now it is not getting mapped. The reason is that the custom field in the DN is excise_no (there is a difference).

Now how can I map these fields to DN from SO or to SI from SO if their names are different or would it be possible to rename a custom field then I think we could just rename it the way it is in Sales Order.




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.

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

     

     



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.

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

     

     
To map different field name you have to overwrite the relevant code. You can found the function for SO to DN mapping named "make_delivery_note" in sales_order.py

Otherwise, You can create a new "Custom Field" for DN with same name as SO. And then copy the existing values from old column to new column through mysql query. After successful copy, you can delete the old field from custom field.

On 25-Jul-2013, at 12:47 PM, Addy wrote:

Hi,

With the new erpnext, doctype mapper has been removed which I feel was a good feature may be it was doing something redundant but it generally helped people with implementing rules without the need for a code.

Anyhow I think we have to live with it.

I have a custom field excise_number in Sales Order which was getting mapped easily earlier to DN and to invoices but now it is not getting mapped. The reason is that the custom field in the DN is excise_no (there is a difference).

Now how can I map these fields to DN from SO or to SI from SO if their names are different or would it be possible to rename a custom field then I think we could just rename it the way it is in Sales Order.




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.

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

     

     



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.

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

     

     
You can also use ALTER TABLE query to change the column name in your database. Also create a new Custom Field with the same fieldname.


T: @rushabh_mehta

On 25-Jul-2013, at 1:51 PM, Nabin Hait <na...@gmail.com> wrote:


On 25-Jul-2013, at 12:47 PM, Addy wrote:

Hi,

With the new erpnext, doctype mapper has been removed which I feel was a good feature may be it was doing something redundant but it generally helped people with implementing rules without the need for a code.

Anyhow I think we have to live with it.

I have a custom field excise_number in Sales Order which was getting mapped easily earlier to DN and to invoices but now it is not getting mapped. The reason is that the custom field in the DN is excise_no (there is a difference).

Now how can I map these fields to DN from SO or to SI from SO if their names are different or would it be possible to rename a custom field then I think we could just rename it the way it is in Sales Order.




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.

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

     

     




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.

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

     

     



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.

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

     

     
I think the system console is out of bounds then how could I do any of the things like ALTER TABLE or even copy the existing fields' to the new Custom Field.


On Thu, Jul 25, 2013 at 2:58 PM, Rushabh Mehta <rm...@gmail.com> wrote:
You can also use ALTER TABLE query to change the column name in your database. Also create a new Custom Field with the same fieldname.

On 25-Jul-2013, at 1:51 PM, Nabin Hait <na...@gmail.com> wrote:


On 25-Jul-2013, at 12:47 PM, Addy wrote:

Hi,

With the new erpnext, doctype mapper has been removed which I feel was a good feature may be it was doing something redundant but it generally helped people with implementing rules without the need for a code.

Anyhow I think we have to live with it.

I have a custom field excise_number in Sales Order which was getting mapped easily earlier to DN and to invoices but now it is not getting mapped. The reason is that the custom field in the DN is excise_no (there is a difference).

Now how can I map these fields to DN from SO or to SI from SO if their names are different or would it be possible to rename a custom field then I think we could just rename it the way it is in Sales Order.




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.

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








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.

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







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.

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







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.

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

     

     
Just log-in to your mysql console and run the query!

$ mysql -u root -p[your root password]

use [database name]

alter table ...


- Rushabh


T: @rushabh_mehta

On 25-Jul-2013, at 3:16 PM, Aditya Duggal <ad...@rigpl.com> wrote:

I think the system console is out of bounds then how could I do any of the things like ALTER TABLE or even copy the existing fields' to the new Custom Field.


On Thu, Jul 25, 2013 at 2:58 PM, Rushabh Mehta <rm...@gmail.com> wrote:
You can also use ALTER TABLE query to change the column name in your database. Also create a new Custom Field with the same fieldname.

On 25-Jul-2013, at 1:51 PM, Nabin Hait <na...@gmail.com> wrote:


On 25-Jul-2013, at 12:47 PM, Addy wrote:

Hi,

With the new erpnext, doctype mapper has been removed which I feel was a good feature may be it was doing something redundant but it generally helped people with implementing rules without the need for a code.

Anyhow I think we have to live with it.

I have a custom field excise_number in Sales Order which was getting mapped easily earlier to DN and to invoices but now it is not getting mapped. The reason is that the custom field in the DN is excise_no (there is a difference).

Now how can I map these fields to DN from SO or to SI from SO if their names are different or would it be possible to rename a custom field then I think we could just rename it the way it is in Sales Order.




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.

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

 

 





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.

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

 

 





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.

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

 

 





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.

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

     

     



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.

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