ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

ERPNext Quota App v0.1.0

Hello ERPNext Family. ERPNext Quota v0.1.0 has been released with new features. Details on usage are given in the repo. Please report if you find any issues. It supports the following now:

Space Management

  • User Limit
  • Site Storage Space Limit
  • Site Database Limit

Site Management

  • Site Validity Date “User will not be able to log in once the validity date is passed”

Screen Shots





Reference:

10 Likes

Hi @Mohammad_Ahmad_Zulfi,

You mentioned previously that you had added 2 parameters to count users:

count_website_users: 0
count_administrator_user: 0

and in the code, if I’m not mistaken, it also excludes Guest.
But it seems that the app still count Guest in the active users.
At time of new-site installation, on terminal returns active_users: 1. And then after setup wizard count 2 users active (first user by setup wizard and Guest).

So which one is correct?

I think it is better to also exclude Guest because for ordinary user (non Administrator) the Guest is not visible so it can confuse user of the Usage Info display.

The Guest is not counted in any case. I will double check this.

@Mohammad_Ahmad_Zulfi We encountered this error message why we are trying to get the app and as a result we could not install the app:

frappe-bench$ bench get-app --branch master erpnext_quota https://github.com/ahmadpak/erpnext_quota

Getting erpnext_quota
$ git clone https://github.com/ahmadpak/erpnext_quota --branch master --depth 1 --origin upstream
Cloning into ‘erpnext_quota’…
warning: Could not find remote branch master to clone.
fatal: Remote branch master not found in upstream upstream

Thanks
Fred

1 Like

bench get-app --branch version-13 erpnext_quota

Use the above instead (change the 13 to 12 if you’re installing in a V12 instance)

Please refer to the instructions by wale.
I will update the documentations

@wale @Mohammad_Ahmad_Zulfi Thank you so much. Deeply appreciate.

@wale @Mohammad_Ahmad_Zulfi There is an error as shown below:
frappe-bench$ bench get-app --branch version-13 erpnext_quota
ERROR: App erpnext_quota not found
INFO: A newer version of bench is available: 5.4.1 → 5.6.0

Thanks

bench get-app https://github.com/ahmadpak/erpnext_quota.git --branch version-13

Try this

@Mohammad_Ahmad_Zulfi Thanks for your effort.Below is the error message:

bench get-app https://github.com/ahmadpak/ksa_vat.git --branch version-13
WARN: Command not being executed in bench directory

Getting ksa_vat
$ git clone https://github.com/ahmadpak/ksa_vat.git --branch version-13 --depth 1 --origin upstream
INFO: A newer version of bench is available: 5.4.1 → 5.6.0
fred@vps282314:~$ cd frappe-bench
fred@vps282314:~/frappe-bench$ bench get-app https://github.com/ahmadpak/ksa_vat.git --branch version-13

Getting ksa_vat
$ git clone https://github.com/ahmadpak/ksa_vat.git --branch version-13 --depth 1 --origin upstream
Cloning into ‘ksa_vat’…
remote: Enumerating objects: 73, done.
remote: Counting objects: 100% (73/73), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 73 (delta 3), reused 48 (delta 1), pack-reused 0
Unpacking objects: 100% (73/73), done.

Installing ksa_vat
$ ./env/bin/python -m pip install -q -U -e ./apps/ksa_vat
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the ‘/home/fred/frappe-bench/env/bin/python -m pip install --upgrade pip’ command.
$ bench build --app ksa_vat
Traceback (most recent call last):
File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/fred/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/home/fred/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 19, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/fred/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/fred/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/fred/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/fred/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/fred/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/fred/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/fred/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 26, in build
frappe.init(’’)
File “/home/fred/frappe-bench/apps/frappe/frappe/init.py”, line 208, in init
setup_module_map()
File “/home/fred/frappe-bench/apps/frappe/frappe/init.py”, line 1115, in setup_module_map
for module in get_module_list(app):
File “/home/fred/frappe-bench/apps/frappe/frappe/init.py”, line 981, in get_module_list
return get_file_items(os.path.join(os.path.dirname(get_module(app_name).file), “modules.txt”))
File “/home/fred/frappe-bench/apps/frappe/frappe/init.py”, line 939, in get_module
return importlib.import_module(modulename)
File “/home/fred/frappe-bench/env/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘erpnext_quota’
$ supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-5: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-7: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-4: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-6: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-1: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-7: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-5: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-7: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-3: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-1: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-2: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-3: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-6: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-4: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-6: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-2: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-3: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-1: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-5: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-4: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-2: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-2: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-3: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-default-worker-1: started
frappe-bench-workers:frappe-bench-frappe-default-worker-6: started
frappe-bench-workers:frappe-bench-frappe-default-worker-7: started
frappe-bench-workers:frappe-bench-frappe-default-worker-4: started
frappe-bench-workers:frappe-bench-frappe-default-worker-5: started
frappe-bench-workers:frappe-bench-frappe-long-worker-6: started
frappe-bench-workers:frappe-bench-frappe-long-worker-7: started
frappe-bench-workers:frappe-bench-frappe-long-worker-4: started
frappe-bench-workers:frappe-bench-frappe-long-worker-5: started
frappe-bench-workers:frappe-bench-frappe-long-worker-2: started
frappe-bench-workers:frappe-bench-frappe-long-worker-3: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-1: started
frappe-bench-workers:frappe-bench-frappe-short-worker-7: started
frappe-bench-workers:frappe-bench-frappe-short-worker-6: started
frappe-bench-workers:frappe-bench-frappe-short-worker-5: started
frappe-bench-workers:frappe-bench-frappe-short-worker-4: started
frappe-bench-workers:frappe-bench-frappe-short-worker-3: started
frappe-bench-workers:frappe-bench-frappe-short-worker-2: started
frappe-bench-workers:frappe-bench-frappe-short-worker-1: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started
INFO: A newer version of bench is available: 5.4.1 → 5.6.0

This works for me bench get-app https://github.com/ahmadpak/erpnext_quota.git
Thanks all