New Doctype

179 views
Skip to first unread message

Akshay Mehta

unread,
Jun 1, 2014, 4:16:57 PM6/1/14
to erpnext-dev...@googlegroups.com
Hi,

I have just discovered this amazing software (ERPNEXT) and trying to evaluate it using the virtual image downloaded from the site .

I wanted to add a new Doctype but everytime I try to create it, the system gives a error "not in developer mode". Is the developer mode supported on this virtual machine? I even tried to alter site config json file (forgetting the actual name at the moment)

Also I searched the forum and came across a post where there is guide to write entirely new app (in frappe.io library mgmt). My question is how can i just customize ERPNEXT and not write an entirly new App?

Thanks
Akshay

Rushabh Mehta

unread,
Jun 1, 2014, 11:16:01 PM6/1/14
to erpnext-dev...@googlegroups.com
Akshay,

Welcome to the forum! Yes developer mode should work in Virtual Machine. You can set "developer_mode": 1 in the site_config.json file and restart gunicorn (I think)

@Pratik - you need to create write a few lines on how to update / restart the VM (we are getting many such questions)

best,
Rushabh



@rushabh_mehta

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7607bdc0-93fb-41e1-ae90-ee428399df91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pratik Vyas

unread,
Jun 1, 2014, 11:17:05 PM6/1/14
to erpnext-dev...@googlegroups.com
Hi Akshay,

Best way to add a new doctype would be by creating a new app (follow
https://frappe.io/apps/frappe-framework/developers/guide) because
otherwise you'll be editing erpnext code and which is not recommended
as you'll have to maintain a fork. Although, simple customizations
like, adding a field or customizing forms is supported out of the box
via GUI and doesn't require any code change (stored in database).

You will have to add "developer_mode" as true in site_config.json.


Thanks,
Pratik

> Thanks
> Akshay
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7607bdc0-93fb-41e1-ae90-ee428399df91%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Akshay Mehta

unread,
Jun 2, 2014, 2:41:52 AM6/2/14
to erpnext-dev...@googlegroups.com

Thank you guys for a quick response.

I am basically trying to ease out operations eg. Receipts and Payments (as I could only see Journal transaction having Bank Voucher in ERPNEXT). As not every person would be familiar with accounting principles, what to debit and what to credit. Therefore I was just trying to add simple Documents to achieve this. How can i do this in the best possible way? where do i start from? I want avoid creating a new app from the scratch.

Thanks
Akshay

Rushabh Mehta

unread,
Jun 2, 2014, 4:52:36 AM6/2/14
to erpnext-dev...@googlegroups.com
Akshay,

Best to create a "Single" type DocType that will create a Journal Voucher in background.

You can create a Journal Voucher on server side using (verify fieldnames etc):

jv = frappe.new_doc("Journal Voucher")
jv.voucher_type = ..
jv.append("details", { .. }) // add rows
..
jv.insert()

Try pushing this in your fork - we can help you too, this has been on our list for quite sometime - we can then merge it in the product.

best,
Rushabh



@rushabh_mehta

Akshay Mehta

unread,
Jun 2, 2014, 6:14:43 AM6/2/14
to erpnext-dev...@googlegroups.com

Thanks, I'll give it a try

Akshay Mehta

unread,
Jun 3, 2014, 8:21:04 AM6/3/14
to erpnext-dev...@googlegroups.com

Hi,

To start with I tried creating a very basic and simple Doctype through the core module (just to get a grip on how things work). But somehow it never appears on the desktop under any module.

Also i have tried to create a new App, the way it is described in the guide, with the same result. However here it shows under the file->new.

Nor does the new module def works and shows up on the desktop.

Which step am i missing?

Regards

Rushabh Mehta

unread,
Jun 3, 2014, 9:09:45 AM6/3/14
to erpnext-dev...@googlegroups.com
Did you give yourself permissions for the doc?



@rushabh_mehta

Akshay Mehta

unread,
Jun 3, 2014, 10:15:32 AM6/3/14
to erpnext-dev...@googlegroups.com

I gave permission to all.

Rushabh Mehta

unread,
Jun 4, 2014, 1:00:19 AM6/4/14
to erpnext-dev...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages