Fixing issues

I'm looking at fixing the issue #856
https://github.com/webnotes/erpnext/issues/856

This is my first one for erpnext.

This requires changes to 2 files I believe. The stock_settings.txt & stock_ledger_entry.py

stock/doctype/stock_settings/stock_settings.txt
 I edited the dict for fieldname stock_frozen_upto to this:
{
  "doctype": "DocField",
  "fieldname": "stock_frozen_upto",
  "fieldtype": "Int",
  "label": "Stock Frozen 2 Upto"
 },

earlier, the fieldtype was "Date". I restart the development server after making these changes, but the changes don't reflect. THe field still drops down a calendar.
I changed the label just to make sure it doesn't require any changes to database. The label is also not showing up to the changed value.

With Regards,
Shilpa



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.

Dont modify the existing "stock frozen upto" field, instead add a new field for the number of days, the existing feature is also useful for other users. If you are adding the field directly in the txt file, you have to change modfied datetime as well.

On 27 Jan 2014 02:22, <sh...@gmail.com> wrote:
I'm looking at fixing the issue #856
https://github.com/webnotes/erpnext/issues/856

This is my first one for erpnext.

This requires changes to 2 files I believe. The stock_settings.txt & stock_ledger_entry.py

stock/doctype/stock_settings/stock_settings.txt
I edited the dict for fieldname stock_frozen_upto to this:
{
"doctype": "DocField",
"fieldname": "stock_frozen_upto",
"fieldtype": "Int",
"label": "Stock Frozen 2 Upto"
},

earlier, the fieldtype was "Date". I restart the development server after making these changes, but the changes don't reflect. THe field still drops down a calendar.
I changed the label just to make sure it doesn't require any changes to database. The label is also not showing up to the changed value.

With Regards,
Shilpa



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.
Nabin,

Yes, I did see the comment from rmehta on that issue, wherein he mentions about adding a new field. 

But, because this is my first defect, i thought i'll first try modifying the existing field. The final check-in would be a new field and not modified existing field.

"If you are adding the field directly in the txt file, you have to change modfied datetime as well."  --- this is not clear. Could you please explain. Also, is there any other way of doing this other than adding the field directly in the txt file.

Incase you have some documentation regarding the code layout and architecture could you please share it.

With Regards
Shilpa.

On Monday, January 27, 2014 9:47:42 AM UTC+5:30, Nabin Hait wrote:

Dont modify the existing "stock frozen upto" field, instead add a new field for the number of days, the existing feature is also useful for other users. If you are adding the field directly in the txt file, you have to change modfied datetime as well.

On 27 Jan 2014 02:22, <sh...@gmail.com> wrote:
I'm looking at fixing the issue #856
https://github.com/webnotes/erpnext/issues/856

This is my first one for erpnext.

This requires changes to 2 files I believe. The stock_settings.txt & stock_ledger_entry.py

stock/doctype/stock_settings/stock_settings.txt
 I edited the dict for fieldname stock_frozen_upto to this:
{
  "doctype": "DocField",
  "fieldname": "stock_frozen_upto",
  "fieldtype": "Int",
  "label": "Stock Frozen 2 Upto"
 },

earlier, the fieldtype was "Date". I restart the development server after making these changes, but the changes don't reflect. THe field still drops down a calendar.
I changed the label just to make sure it doesn't require any changes to database. The label is also not showing up to the changed value.

With Regards,
Shilpa



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 add the field from inside the system, open the Stock Settings doctype, add the desired field and save the doctype. If you have set developer_mode=1 in the conf file already, system will modify stock_settings.txt file automatically.
Otherwise, if you add the field directly in the txt file, you will find keys "modified"  and "modified_by" in the first dict of the txt file, you have to modify those values as well. After changing txt file, you should run lib/wnf.py --latest , to sync the system as per txt file. System only sync those txt files which are modified (identified based on modified value in txt file).

On 27-Jan-2014, at 11:25 AM, sh...@gmail.com wrote:

Nabin,

Yes, I did see the comment from rmehta on that issue, wherein he mentions about adding a new field. 

But, because this is my first defect, i thought i'll first try modifying the existing field. The final check-in would be a new field and not modified existing field.

"If you are adding the field directly in the txt file, you have to change modfied datetime as well."  --- this is not clear. Could you please explain. Also, is there any other way of doing this other than adding the field directly in the txt file.

Incase you have some documentation regarding the code layout and architecture could you please share it.

With Regards
Shilpa.

On Monday, January 27, 2014 9:47:42 AM UTC+5:30, Nabin Hait wrote:

Dont modify the existing "stock frozen upto" field, instead add a new field for the number of days, the existing feature is also useful for other users. If you are adding the field directly in the txt file, you have to change modfied datetime as well.

On 27 Jan 2014 02:22, <sh...@gmail.com> wrote:
I'm looking at fixing the issue #856
https://github.com/webnotes/erpnext/issues/856

This is my first one for erpnext.

This requires changes to 2 files I believe. The stock_settings.txt & stock_ledger_entry.py

stock/doctype/stock_settings/stock_settings.txt
 I edited the dict for fieldname stock_frozen_upto to this:
{
  "doctype": "DocField",
  "fieldname": "stock_frozen_upto",
  "fieldtype": "Int",
  "label": "Stock Frozen 2 Upto"
 },

earlier, the fieldtype was "Date". I restart the development server after making these changes, but the changes don't reflect. THe field still drops down a calendar.
I changed the label just to make sure it doesn't require any changes to database. The label is also not showing up to the changed value.

With Regards,
Shilpa



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.
Nabin,

I tried adding the field by opening the StockSettings doctype. It gets added, reflects on the stock settings page as well as in the database. But the schema file stock_settings.txt is not getting updated with this field. I've set developer_mode=1 in lib/conf/conf.py. Is there anything else to be done?

Also, how to get to the list of doctypes page from the main(home) page.

With Regards,
Shilpa

On Monday, January 27, 2014 11:47:51 AM UTC+5:30, Nabin Hait wrote:
You can add the field from inside the system, open the Stock Settings doctype, add the desired field and save the doctype. If you have set developer_mode=1 in the conf file already, system will modify stock_settings.txt file automatically.
Otherwise, if you add the field directly in the txt file, you will find keys "modified"  and "modified_by" in the first dict of the txt file, you have to modify those values as well. After changing txt file, you should run lib/wnf.py --latest , to sync the system as per txt file. System only sync those txt files which are modified (identified based on modified value in txt file).

On 27-Jan-2014, at 11:25 AM, sh...@gmail.com wrote:

Nabin,

Yes, I did see the comment from rmehta on that issue, wherein he mentions about adding a new field. 

But, because this is my first defect, i thought i'll first try modifying the existing field. The final check-in would be a new field and not modified existing field.

"If you are adding the field directly in the txt file, you have to change modfied datetime as well."  --- this is not clear. Could you please explain. Also, is there any other way of doing this other than adding the field directly in the txt file.

Incase you have some documentation regarding the code layout and architecture could you please share it.

With Regards
Shilpa.

On Monday, January 27, 2014 9:47:42 AM UTC+5:30, Nabin Hait wrote:

Dont modify the existing "stock frozen upto" field, instead add a new field for the number of days, the existing feature is also useful for other users. If you are adding the field directly in the txt file, you have to change modfied datetime as well.

On 27 Jan 2014 02:22, <sh...@gmail.com> wrote:
I'm looking at fixing the issue #856
https://github.com/webnotes/erpnext/issues/856

This is my first one for erpnext.

This requires changes to 2 files I believe. The stock_settings.txt & stock_ledger_entry.py

stock/doctype/stock_settings/stock_settings.txt
 I edited the dict for fieldname stock_frozen_upto to this:
{
  "doctype": "DocField",
  "fieldname": "stock_frozen_upto",
  "fieldtype": "Int",
  "label": "Stock Frozen 2 Upto"
 },

earlier, the fieldtype was "Date". I restart the development server after making these changes, but the changes don't reflect. THe field still drops down a calendar.
I changed the label just to make sure it doesn't require any changes to database. The label is also not showing up to the changed value.

With Regards,
Shilpa



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.
lib/conf/conf.py is just a sample conf file, there should be another conf.py file in main directory where app and lib directory exists.

On 29-Jan-2014, at 8:41 PM, sh...@gmail.com wrote:

developer_mode



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.
Thanks Nabin. It works. I can see the new field on the screen, in the schema file and the table as well.

But I stumbled upon this query on the forum:
https://groups.google.com/forum/#!topic/erpnext-developer-forum/tGRaxDZ6Wjw

You mention that editing the doctype is not a right way to do this.

Also, when I go to set up -> custom field , and add a new field. In the dropdown for document, i don't get "stock settings" in the dropdown. Why is it?

With Regards,
Shilpa.



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.

As you are a developer and want to contribute to the main product, you can directly change in main doctype. But in case if it is a customization requirement, and it is not going to be a part of product, you should add a custom field.

We do not allow customization in single type doctype, that's why Stock Settings doctype is not available in Custom Field form.

On 30 Jan 2014 21:41, <sh...@gmail.com> wrote:
Thanks Nabin. It works. I can see the new field on the screen, in the schema file and the table as well.

But I stumbled upon this query on the forum:
https://groups.google.com/forum/#!topic/erpnext-developer-forum/tGRaxDZ6Wjw

You mention that editing the doctype is not a right way to do this.

Also, when I go to set up -> custom field , and add a new field. In the dropdown for document, i don't get "stock settings" in the dropdown. Why is it?

With Regards,
Shilpa.



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.