Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work properly on v14 #30

Open
Agiarga opened this issue Oct 6, 2022 · 3 comments
Open

Doesn't work properly on v14 #30

Agiarga opened this issue Oct 6, 2022 · 3 comments

Comments

@Agiarga
Copy link

Agiarga commented Oct 6, 2022

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

@littlebunyip
Copy link

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)

@littlebunyip
Copy link

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 the after_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.

  1. Install the app with
bench get-app agriculture
  1. Change the # Installation section of the file your-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"

  1. 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
  1. Restart bench
  2. Login into your erpnext system as a user with admin permissions.
  3. Go to the "Domain Settings" from the search bar and tick the Agriculture checkbox under "Active Domains"
  4. 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".

dvdl16 added a commit to dvdl16/agriculture that referenced this issue May 18, 2023
@Emmytheo
Copy link

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 the after_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.

  1. Install the app with
bench get-app agriculture
  1. Change the # Installation section of the file your-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"
  1. 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
  1. Restart bench
  2. Login into your erpnext system as a user with admin permissions.
  3. Go to the "Domain Settings" from the search bar and tick the Agriculture checkbox under "Active Domains"
  4. 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.

souljorje added a commit to souljorje/agriculture that referenced this issue May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants