agriculture
agriculture copied to clipboard
Doesn't work properly on v14
I installed the agriculture module on ERPNEXT_VERSION: v14.2.2, FRAPPE_VERSION: v14.10.0. Then I get the agriculture menu in ERPNext but only "Location" is available. I'm not the only one, see https://discuss.erpnext.com/t/v14-cant-install-agriculture-app/95340
same issue here…
There are actually no agriculture related doctypes available in the awesomebar when I search for them by name but they are listed in the doctype list. There are also no agriculture related doctypes in the Role Permission Manager list. The reason the doctype “Location” is showing in the Agriculture workspace is because it is part of the Assets module.
Versions: Agriculture: v0.0.1 (develop) ERPNext: v14.10.0 (version-14) Frappe Framework: v14.18.1 (version-14) LittleBunyip: v0.0.1 (develop) Payments: v0.0.1 (develop) Wiki: v0.0.1 (master)
I just got this app to install on v14. The reasons I found why it was not working with version 14 are:
- The setup.py file is not run after install because in version 14 it needs to be called by the
hooks.py
file with theafter_install
key; - The domain "Agriculture" has to be specifically enabled in the
Domain Settings
doctype. Without this set we can see the doctypes in the doctype list but we cannot get to enter a specific doctype because of a module not found error;
Here is how I got it to work.
- Install the app with
bench get-app agriculture
- Change the
# Installation
section of the fileyour-bench-directory/apps/agriculture/agriculture/hooks.py
to:
# Installation
# ------------
# before_install = "agriculture.install.before_install"
# after_install = "agriculture.install.after_install"
after_install = "agriculture.agriculture.setup.setup_agriculture"
- Install the agriculture app in your site. I only have one site so I don't need to use the
--site my-site-name
option.
bench install-app agriculture
- Restart bench
- Login into your erpnext system as a user with admin permissions.
- Go to the "Domain Settings" from the search bar and tick the Agriculture checkbox under "Active Domains"
- Go back to your /app page and make sure to refresh the page in your browser.
The "Agriculture" heading should be in your sidebar and if you click the Agriculture menu it should show you the Agriculture Dashboard and the doctype should be accessible. You may have to add "Agriculture" to the list of enabled modules in your user settings and also select the Roles "Agriculture User" and "Agriculture Manager".
I just got this app to install on v14. The reasons I found why it was not working with version 14 are:
- The setup.py file is not run after install because in version 14 it needs to be called by the
hooks.py
file with theafter_install
key;- The domain "Agriculture" has to be specifically enabled in the
Domain Settings
doctype. Without this set we can see the doctypes in the doctype list but we cannot get to enter a specific doctype because of a module not found error;Here is how I got it to work.
- Install the app with
bench get-app agriculture
- Change the
# Installation
section of the fileyour-bench-directory/apps/agriculture/agriculture/hooks.py
to:# Installation # ------------ # before_install = "agriculture.install.before_install" # after_install = "agriculture.install.after_install" after_install = "agriculture.agriculture.setup.setup_agriculture"
- Install the agriculture app in your site. I only have one site so I don't need to use the
--site my-site-name
option.bench install-app agriculture
- Restart bench
- Login into your erpnext system as a user with admin permissions.
- Go to the "Domain Settings" from the search bar and tick the Agriculture checkbox under "Active Domains"
- Go back to your /app page and make sure to refresh the page in your browser.
The "Agriculture" heading should be in your sidebar and if you click the Agriculture menu it should show you the Agriculture Dashboard and the doctype should be accessible. You may have to add "Agriculture" to the list of enabled modules in your user settings and also select the Roles "Agriculture User" and "Agriculture Manager".
This helped fix issues on my end.