Re: [erpnext-dev] Insert a custom document (DocType) in Stock module

To show your custom doctype in stock module home page, put an entry in stock.py file.

And for controller methods, check existing controllers, it will give you a fair idea.

On 23 Sep 2014 01:06, "Luis Fernandes" <lu...@gmail.com> wrote:
I.

I need, for what i'm doing, to add a custom doctype in Stock module (Is what is more obvious). I try to create my custom doctype and in the module field i put Stock.

It is ok and in a doctype folder of stock module was created one folder with my custom doctype name.

1. The problem is that the name of my custom doctype doesn't show in Stock Documents (see image below).
2. What if i update erpnext?
3. This method create a controller file in doctype folder of Stock module . How to write code for the diferents methods (validate, on_update, etc.) in my module?


If this sound complicate, then i just need to put an entry in the stock module document (see the following image), so i need to create a doctype in Stock module, and i need that doctype to show in the Stock module but i want to control validation, updates and inserts in my new module.

Thanks.


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



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7a4ed92e-76df-410b-b6d9-52eb9b7b20dc%40googlegroups.com.

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


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



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CA%2BCj7tiiAmqq7fb3aiO8TuZryF9Ny5hP3LsBDMnY_GYJfK%3Dx3Q%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
I thanks for your answer. But sorry i don't know how to do what you are saying.

What do you mean by put an entry in stock.py. Did you mean make in my module one file called stock.py? And do what?


Thanks.

Terça-feira, 23 de Setembro de 2014 5:10:12 UTC+1, Nabin Hait escreveu:

To show your custom doctype in stock module home page,  put an entry in stock.py file.

And for controller methods, check existing controllers, it will give you a fair idea.

On 23 Sep 2014 01:06, "Luis Fernandes" <lu...@gmail.com> wrote:
I.

I need, for what i'm doing, to add a custom doctype in Stock module (Is what is more obvious). I try to create my custom doctype and in the module field i put Stock.

It is ok and in a doctype folder of stock module was created one folder with my custom doctype name.

1. The problem is that the name of my custom doctype doesn't show in Stock Documents (see image below).
2. What if i update erpnext?
3. This method create a controller file in doctype folder of Stock module . How to write code for the diferents methods (validate, on_update, etc.) in my module?


If this sound complicate, then i just need to put an entry in the stock module document (see the following image), so i need to create a doctype in Stock module, and i need that doctype to show in the Stock module but i want to control validation, updates and inserts in my new module. 

Thanks.


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



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7a4ed92e-76df-410b-b6d9-52eb9b7b20dc%40googlegroups.com.

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


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



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5db7f90d-b174-45e6-87cb-625be81049c1%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Check https://github.com/frappe/erpnext/blob/develop/erpnext/config/stock.py


On Sep 23, 2014, at 2:15 PM, Luis Fernandes <lu...@gmail.com> wrote:

I. Thanks you for your answer.

Sorry, but i don't know what do you mean by put an entry in stock.py.

1. stock.py is a file i have to created in my module?
2. what do you mean by put an entry?

Thanks.


Terça-feira, 23 de Setembro de 2014 5:10:12 UTC+1, Nabin Hait escreveu:

To show your custom doctype in stock module home page,  put an entry in stock.py file.

And for controller methods, check existing controllers, it will give you a fair idea.

On 23 Sep 2014 01:06, "Luis Fernandes" <lu...@gmail.com> wrote:
I.

I need, for what i'm doing, to add a custom doctype in Stock module (Is what is more obvious). I try to create my custom doctype and in the module field i put Stock.

It is ok and in a doctype folder of stock module was created one folder with my custom doctype name.

1. The problem is that the name of my custom doctype doesn't show in Stock Documents (see image below).
2. What if i update erpnext?
3. This method create a controller file in doctype folder of Stock module . How to write code for the diferents methods (validate, on_update, etc.) in my module?


If this sound complicate, then i just need to put an entry in the stock module document (see the following image), so i need to create a doctype in Stock module, and i need that doctype to show in the Stock module but i want to control validation, updates and inserts in my new module. 

Thanks.


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



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7a4ed92e-76df-410b-b6d9-52eb9b7b20dc%40googlegroups.com.

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


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



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f450c7e5-e6e3-4f69-a83d-ff3c56fe47bd%40googlegroups.com.

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


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



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/13139C2A-3A1A-4191-B2D6-6F028080BDEA%40gmail.com.

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

On 23-Sep-2014, at 2:22 pm, Nabin Hait <na...@gmail.com> wrote:

Check https://github.com/frappe/erpnext/blob/develop/erpnext/config/stock.py


On Sep 23, 2014, at 2:15 PM, Luis Fernandes <lu...@gmail.com> wrote:

I. Thanks you for your answer.

Sorry, but i don't know what do you mean by put an entry in stock.py.

1. stock.py is a file i have to created in my module?

Create a stock.py in the config folder of your app and add your list.


2. what do you mean by put an entry?

Thanks.


Terça-feira, 23 de Setembro de 2014 5:10:12 UTC+1, Nabin Hait escreveu:

To show your custom doctype in stock module home page,  put an entry in stock.py file.

And for controller methods, check existing controllers, it will give you a fair idea.

On 23 Sep 2014 01:06, "Luis Fernandes" <lu...@gmail.com> wrote:
I.

I need, for what i'm doing, to add a custom doctype in Stock module (Is what is more obvious). I try to create my custom doctype and in the module field i put Stock.

It is ok and in a doctype folder of stock module was created one folder with my custom doctype name.

1. The problem is that the name of my custom doctype doesn't show in Stock Documents (see image below).
2. What if i update erpnext?
3. This method create a controller file in doctype folder of Stock module . How to write code for the diferents methods (validate, on_update, etc.) in my module?


If this sound complicate, then i just need to put an entry in the stock module document (see the following image), so i need to create a doctype in Stock module, and i need that doctype to show in the Stock module but i want to control validation, updates and inserts in my new module. 

Thanks.


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



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7a4ed92e-76df-410b-b6d9-52eb9b7b20dc%40googlegroups.com.

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


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



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f450c7e5-e6e3-4f69-a83d-ff3c56fe47bd%40googlegroups.com.

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



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



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/13139C2A-3A1A-4191-B2D6-6F028080BDEA%40gmail.com.

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


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



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/4334CD1E-FBC3-4F46-8574-7D7E259337D7%40gmail.com.

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