Extend ERPNext 4.0

Hi, 

Last time on ERPNext website, there was a link for tutorial on creating plugins (for example a custom DocType, or a custom Report). 
With ERPNext 4.0, i supposed we should do it as an app like what was told here:
But the tutorial seems to be about create a totally new app, not extend or customise ERPNext. 
Do you guys know of any pointer for me to create a plugins or customise ERPNext ?

Thank you!



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/58803461-5454-4be5-acfc-e4b0efd62e3b%40googlegroups.com.

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

Hi Nguyen,

On Tue, May 6, 2014 at 3:09 PM, Nguyen Do Le Bao na...@gmail.com wrote:

Hi,

Last time on ERPNext website, there was a link for tutorial on creating
plugins (for example a custom DocType, or a custom Report).
http://erpnext.org/plugins‎
With ERPNext 4.0, i supposed we should do it as an app like what was told
here:
https://frappe.io/apps/frappe-framework/developer-guide/app-development
But the tutorial seems to be about create a totally new app, not extend or
customise ERPNext.
Do you guys know of any pointer for me to create a plugins or customise
ERPNext ?

We’re working on the docs at the moment. We’ll release it on frappe.io
and annoince on the mailing list when done.

Thank you!


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/58803461-5454-4be5-acfc-e4b0efd62e3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks,

Pratik
erpnext

Hi Pratik, 

Is there any update on this ? 
I am customising the ERPNext version 3 latest but i am worried without using plugins if I upgrade to 4, everything will be overwritten. 
Is there a way ? Any direction separate the custom code ?

Like in version 3, i can use command to create a script @ erpnext/stock/doctype/stock_entry/stock_entry.py. Its content will be 

from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, cstr, flt
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
from webnotes import msgprint, _
class CustomDocType(DocType):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist

Not sure how i go from here to extend the DocType's functionality. For example:
- on_submit of stock_entry I need to do some extra stuffs ... 
- can i make a normal @webnotes.whitelist() function to expose to client ? 

Of course, change the code directly to app/stock/doctype/stock_entry/stock_entry.py works as well but not safe for upgrading I supposed. 
Really appreciate any pointers! Thank you!

On Tuesday, May 6, 2014 6:03:37 PM UTC+8, Pratik Vyas wrote:
Hi Nguyen,



On Tue, May 6, 2014 at 3:09 PM, Nguyen Do Le Bao <na...@gmail.com> wrote:
> Hi,
>
> Last time on ERPNext website, there was a link for tutorial on creating
> plugins (for example a custom DocType, or a custom Report).
> http://erpnext.org/plugins
> With ERPNext 4.0, i supposed we should do it as an app like what was told
> here:
> https://frappe.io/apps/frappe-framework/developer-guide/app-development
> But the tutorial seems to be about create a totally new app, not extend or
> customise ERPNext.
> Do you guys know of any pointer for me to create a plugins or customise
> ERPNext ?
>

We're working on the docs at the moment. We'll release it on frappe.io
and annoince on the mailing list when done.

> Thank you!
>
> --
> 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/58803461-5454-4be5-acfc-e4b0efd62e3b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Thanks,
--
Pratik
erpnext



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/8048810f-64c3-424c-ba6b-b8f21ae32943%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
On 23-May-2014, at 3:45 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi Pratik, 

Is there any update on this ? 
I am customising the ERPNext version 3 latest but i am worried without using plugins if I upgrade to 4, everything will be overwritten. 
Is there a way ? Any direction separate the custom code ?

Like in version 3, i can use command to create a script @ erpnext/stock/doctype/stock_entry/stock_entry.py. Its content will be 

from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, cstr, flt
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
from webnotes import msgprint, _
class CustomDocType(DocType):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist

Not sure how i go from here to extend the DocType's functionality. For example:
- on_submit of stock_entry I need to do some extra stuffs ... 
- can i make a normal @webnotes.whitelist() function to expose to client ? 

In version 4, you make an app for your customizations.


and plug in your server-side events via hooks.py file in your app



Of course, change the code directly to app/stock/doctype/stock_entry/stock_entry.py works as well but not safe for upgrading I supposed. 
Really appreciate any pointers! Thank you!

On Tuesday, May 6, 2014 6:03:37 PM UTC+8, Pratik Vyas wrote:
Hi Nguyen,



On Tue, May 6, 2014 at 3:09 PM, Nguyen Do Le Bao <na...@gmail.com> wrote:
> Hi,
>
> Last time on ERPNext website, there was a link for tutorial on creating
> plugins (for example a custom DocType, or a custom Report).
> http://erpnext.org/plugins
> With ERPNext 4.0, i supposed we should do it as an app like what was told
> here:
> https://frappe.io/apps/frappe-framework/developer-guide/app-development
> But the tutorial seems to be about create a totally new app, not extend or
> customise ERPNext.
> Do you guys know of any pointer for me to create a plugins or customise
> ERPNext ?
>

We're working on the docs at the moment. We'll release it on frappe.io
and annoince on the mailing list when done.

> Thank you!
>
> --
> 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/58803461-5454-4be5-acfc-e4b0efd62e3b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Thanks,
--
Pratik
erpnext



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/8048810f-64c3-424c-ba6b-b8f21ae32943%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/6C54E61F-17E9-4C4A-A22B-31F72663BA06%40gmail.com.

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

Thank you for this!!!

I tried out ERPNext 4, failed to install at first with root user (probably because of permission issue). 
After that I create separate user 'erpnext', it works! 

I know this was mentioned in ERPNext 3's installation Note but in the current instruction using frappe-bench, I don't think it's highlighted anywhere. 
Also as I follow the instruction in https://frappe.io/apps/frappe-framework/developers/guide, sometimes it causes some permission problem if using root as well. 

Maybe it should be added to frappe-bench's installation instruction ?

On Friday, May 23, 2014 6:18:55 PM UTC+8, rushabh wrote:
On 23-May-2014, at 3:45 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi Pratik, 

Is there any update on this ? 
I am customising the ERPNext version 3 latest but i am worried without using plugins if I upgrade to 4, everything will be overwritten. 
Is there a way ? Any direction separate the custom code ?

Like in version 3, i can use command to create a script @ erpnext/stock/doctype/stock_entry/stock_entry.py. Its content will be 

from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, cstr, flt
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
from webnotes import msgprint, _
class CustomDocType(DocType):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist

Not sure how i go from here to extend the DocType's functionality. For example:
- on_submit of stock_entry I need to do some extra stuffs ... 
- can i make a normal @webnotes.whitelist() function to expose to client ? 

In version 4, you make an app for your customizations.


and plug in your server-side events via hooks.py file in your app



Of course, change the code directly to app/stock/doctype/stock_entry/stock_entry.py works as well but not safe for upgrading I supposed. 
Really appreciate any pointers! Thank you!

On Tuesday, May 6, 2014 6:03:37 PM UTC+8, Pratik Vyas wrote:
Hi Nguyen,



On Tue, May 6, 2014 at 3:09 PM, Nguyen Do Le Bao <na...@gmail.com> wrote:
> Hi,
>
> Last time on ERPNext website, there was a link for tutorial on creating
> plugins (for example a custom DocType, or a custom Report).
> http://erpnext.org/plugins
> With ERPNext 4.0, i supposed we should do it as an app like what was told
> here:
> https://frappe.io/apps/frappe-framework/developer-guide/app-development
> But the tutorial seems to be about create a totally new app, not extend or
> customise ERPNext.
> Do you guys know of any pointer for me to create a plugins or customise
> ERPNext ?
>

We're working on the docs at the moment. We'll release it on frappe.io
and annoince on the mailing list when done.

> Thank you!
>
> --
> 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/58803461-5454-4be5-acfc-e4b0efd62e3b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Thanks,
--
Pratik
erpnext



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/8048810f-64c3-424c-ba6b-b8f21ae32943%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/08bbd2a3-5c8a-42c4-9d52-16af81ad9eeb%40googlegroups.com.

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

Hi Nguyen,

On Wed, May 28, 2014 at 9:45 PM, Nguyen Do Le Bao na...@gmail.com wrote:

Hi,

Thank you for this!!!

I tried out ERPNext 4, failed to install at first with root user (probably
because of permission issue).
After that I create separate user ‘erpnext’, it works!

I know this was mentioned in ERPNext 3’s installation Note but in the
current instruction using frappe-bench, I don’t think it’s highlighted
anywhere.
Also as I follow the instruction in
https://frappe.io/apps/frappe-framework/developers/guide, sometimes it
causes some permission problem if using root as well.

I updated it in the README, forgot to update on the website. Thanks
for reporting!


Pratik
erpnext