Coder Social home page Coder Social logo

non_profit's Introduction

Non Profit

A Non profit app built on top of Frappe framework & ERPNext.

People who change the world need the tools to do it! The Non Profit Modules of ERPNext is designed for a non-profit organization, so that they can deliver well on their noble cause of a better world.

Installation

Using bench, install ERPNext as mentioned here.

Once ERPNext is installed, add non_profit app to your bench by running

$ bench get-app non_profit

After that, you can install non_profit app on required site by running

$ bench --site demo.com install-app non_profit

Documentation

Read documentation at https://docs.erpnext.com/docs/v14/user/manual/en/non_profit/introduction

License

GNU GPL V3

non_profit's People

Contributors

ankush avatar asbasawaraj avatar aureliamaeve avatar barredterra avatar chillaranand avatar deepeshgarg007 avatar hasnain2808 avatar kieransmith-res avatar mangesh-khairnar avatar marination avatar mohsinalimat avatar nabinhait avatar nihantra avatar pateljannat avatar raghu-kamath avatar reicheltp avatar rkurungadam avatar rmehta avatar rohitwaghchaure avatar ruchamahabal avatar ruthra-kumar avatar sagarvora avatar saurabh6790 avatar scmmishra avatar shariquerik avatar shreyashah115 avatar surajshetty3416 avatar vishdha avatar walstanb avatar zlash65 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

non_profit's Issues

Install failed - No module named payments

I'm trying to install non_profit to an ERPNext installation running in docker.

The install fails as follows:

App erpnext already installed


Installing non_profit...
Updating DocTypes for non_profit    : [                    ] 4%An error occurred while installing non_profit: Module import failed for Non Profit Settings, the DocType you're trying to open might be deleted.<br> Error: No module named 'payments'
Traceback (most recent call last):
  File "apps/frappe/frappe/modules/utils.py", line 240, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(module_name)
  File "apps/frappe/frappe/__init__.py", line 1327, in get_module
    return importlib.import_module(modulename)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "apps/non_profit/non_profit/non_profit/doctype/non_profit_settings/non_profit_settings.py", line 9, in <module>
    from payments.utils import get_payment_gateway_controller
ModuleNotFoundError: No module named 'payments'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 413, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/installer.py", line 294, in install_app
    sync_for(name, force=force, reset_permissions=True)
  File "apps/frappe/frappe/model/sync.py", line 80, in sync_for
    import_file_by_path(
  File "apps/frappe/frappe/modules/import_file.py", line 145, in import_file_by_path
    import_doc(
  File "apps/frappe/frappe/modules/import_file.py", line 242, in import_doc
    doc.insert()
  File "apps/frappe/frappe/model/document.py", line 285, in insert
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1077, in run_post_save_methods
    self.run_method("on_update")
  File "apps/frappe/frappe/model/document.py", line 909, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1259, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1241, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 906, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 408, in on_update
    self.run_module_method("on_doctype_update")
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 493, in run_module_method
    module = load_doctype_module(self.name, self.module)
  File "apps/frappe/frappe/modules/utils.py", line 244, in load_doctype_module
    raise ImportError(msg) from e
ImportError: Module import failed for Non Profit Settings, the DocType you're trying to open might be deleted.<br> Error: No module named 'payments'

Error while installing on v15

Faced this while to install non_profit on frappe v15.

frappe-bench$ bench --site nonprofit install-app non_profit
App erpnext already installed

Installing non_profit…
An error occurred while installing non_profit: (‘Module Def’, ‘Non Profit’, IntegrityError(1062, “Duplicate entry ‘Non Profit’ for key ‘PRIMARY’”))
Traceback with variables (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 462, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {‘sites’: [‘nonprofit’], ‘force’: False, ‘verbose’: False, ‘profile’: False}
apps = (‘non_profit’,)
force = False
_install_app = <function install_app at 0x7f2610063740>
filelock = <function filelock at 0x7f2610060c20>
exit_code = 0
site = ‘nonprofit’
app = ‘non_profit’
err = DuplicateEntryError(‘Module Def’, ‘Non Profit’, IntegrityError(1062, “Duplicate entry ‘Non Profit’ for key ‘PRIMARY’”))
File “apps/frappe/frappe/installer.py”, line 299, in install_app
add_module_defs(name, ignore_if_duplicate=force)
name = ‘non_profit’
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7f260eedf920>
sync_for = <function sync_for at 0x7f260eef4720>
sync_customizations = <function sync_customizations at 0x7f2610195260>
sync_fixtures = <function sync_fixtures at 0x7f260eef4a40>
app_hooks = {‘after_install’: [‘non_profit.setup.setup_non_profit’], ‘app_color’: [‘grey’], ‘app_description’: [‘Non Profit’], ‘app_email’: [‘[email protected]’], ‘app_icon’: [‘octicon octicon-file-directory’], ‘app_license’: [‘MIT’], ‘app_name’: [‘non_profit’], ‘app_publisher’: [‘Frappe’], ‘app_title’: [‘Non Profit’], ‘before_tests’: [‘non_profit.non_profit.utils.before_tests’], ‘doctype_js’: {‘Sales Invoice’: [‘public/js/payment_entry.js’]}, ‘global_search_doctypes’: {‘Non Profit’: [{‘doctype’: ‘Certified Consultant’, ‘index’: 1}, {‘doctype’: ‘Certification Application’, ‘index’: 2}, {‘doctype’: ‘Volunteer’, ‘index’: 3}, {‘doctype’: ‘Membership’, ‘index’: 4}, {‘doctype’: ‘Member’, ‘index’: 5}, {‘doctype’: ‘Donor’, ‘index’: 6}, {‘doctype’: ‘Chapter’, ‘index’: 7}, {‘doctype’: ‘Grant Application’, ‘index’: 8}, {‘doctype’: ‘Volunteer Type’, ‘index’: 9}, {‘doctype’: ‘Donor Type’, ‘index’: 10}, {‘doctype’: ‘Membership Type’, ‘index’: 11}]}, ‘override_doctype_class’: {‘Payment Entry’: ['non_profit.n…
installed_apps = [‘frappe’, ‘builder’, ‘erpnext’]
app = ‘erpnext’
required_app = ‘erpnext’
File “apps/frappe/frappe/installer.py”, line 638, in add_module_defs
d.insert(ignore_permissions=True, ignore_if_duplicate=ignore_if_duplicate)
app = ‘non_profit’
ignore_if_duplicate = False
modules = [‘Non Profit’]
module = ‘Non Profit’
d = <ModuleDef: Non Profit>
File “apps/frappe/frappe/model/document.py”, line 297, in insert
self.db_insert(ignore_if_duplicate=ignore_if_duplicate)
self = <ModuleDef: Non Profit>
ignore_permissions = True
ignore_links = None
ignore_if_duplicate = False
ignore_mandatory = None
set_name = None
set_child_names = True
File “apps/frappe/frappe/model/base_document.py”, line 577, in db_insert
raise frappe.DuplicateEntryError(self.doctype, self.name, e)
self = <ModuleDef: Non Profit>
ignore_if_duplicate = False
conflict_handler = ‘’
d = {‘name’: ‘Non Profit’, ‘creation’: ‘2024-03-20 03:02:24.944236’, ‘modified’: ‘2024-03-20 03:02:24.944236’, ‘modified_by’: ‘Administrator’, ‘owner’: ‘Administrator’, ‘docstatus’: 0, ‘idx’: 0, ‘module_name’: ‘Non Profit’, ‘custom’: 0, ‘package’: None, ‘app_name’: ‘non_profit’, ‘restrict_to_domain’: None, ‘_user_tags’: None, ‘_comments’: None, ‘_assign’: None, ‘_liked_by’: None}
columns = [‘name’, ‘creation’, ‘modified’, ‘modified_by’, ‘owner’, ‘docstatus’, ‘idx’, ‘module_name’, ‘custom’, ‘package’, ‘app_name’, ‘restrict_to_domain’, ‘_user_tags’, ‘_comments’, ‘_assign’, ‘_liked_by’]
frappe.exceptions.DuplicateEntryError: (‘Module Def’, ‘Non Profit’, IntegrityError(1062, “Duplicate entry ‘Non Profit’ for key ‘PRIMARY’”))

frm.doc.member not defined in erpnext/non_profit/doctype/member/member.js

Information about bug

When the webservice "get_last_membership" is called, the argument "member" is undefined. This is because the object value frm.doc.member just does not exist in the JavaScript object frm.

Solution

In erpnext/non_profit/doctype/member/member.js replace

frm.doc.member with
frm.doc.name

Git diff

diff --git a/erpnext/non_profit/doctype/member/member.js b/erpnext/non_profit/doctype/member/member.js
index f72d4d958b..3e31d5cbbd 100644
--- a/erpnext/non_profit/doctype/member/member.js
+++ b/erpnext/non_profit/doctype/member/member.js
@@ -53,7 +53,7 @@ frappe.ui.form.on('Member', {
                        frappe.call({
                                method: "erpnext.get_last_membership",
                                args: {
-                                       member: frm.doc.member
+                                       member: frm.doc.name
                                },
                                callback: function(data) {
                                        if (data.message) {

Other mentions of this bug

I am not the only one who encountered this bug. It is also mentioned there:

https://discuss.frappe.io/t/back-dating-memberships/61738/2
It has also been reported there:
#10

Link to the line to be changed:
https://github.com/frappe/erpnext/blob/6a9660de65c4ef7d39debc72bee9b7419831f482/erpnext/non_profit/doctype/member/member.js#L56

The non_profit has apparently been remove in v14:

The 'frappe/erpnext' repository doesn't contain the 'erpnext/non_profit/doctype/member/member.js' path in 'version-14'.

Module

non-profit

Version

ERPNext: v13.39.1 (HEAD)
Frappe Framework: v13.41.2 (HEAD)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
"erpnext": "13.39.1",
"erpnextswiss": "1.19.0",
"frappe": "13.41.2"
}

### Route

Form/Member/GEN-MTGLD-00082

### Trackeback

Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 69, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 38, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1457, in call
return fn(*args, **newargs)
TypeError: get_last_membership() missing 1 required positional argument: 'member'

### Request Data

{
"type": "POST",
"args": {},
"headers": {},
"error_handlers": {},
"url": "/api/method/erpnext.get_last_membership"
}

### Response Data

{
"exception": "TypeError: get_last_membership() missing 1 required positional argument: 'member'"
}

Membership billing cycle

Memberships are usually 1 year. I am surprised that in the nonprofit module the billing cycle is only 30 days. I have also not found a possilibity to change this. This should be atleast configurable.

if frappe.db.get_single_value("Non Profit Settings", "billing_cycle") == "Yearly":
If found this in the code of the doctype, however I cannot find this field in erpnext.

Unable to add new employees in ERPNext

I am trying to add a new employee in ERPNext, but I am receiving the following error message:
Error: Data missing in table: Open Documents

i use 15 version on frappe cloud

Patch dependency

This patch is being removed from ERPNext:

erpnext/patches/v13_0/setup_fields_for_80g_certificate_and_donation.py

Please ensure that it runs in this app.

web form is not printing + not taking to success url + other small issues

Information about bug

I created a donation receipt form so that we can automate creation of data entry of receipt issue and entry in erpnext for an NGO.

so far, i found, you cannot create a new donor on a "donation web form" so i have to use a donor web form and then a new donation web form. that is fine, i mean if it works.

i have attached donor form backend and fronend. when i submit the "donor" form, it should take me to donation web form but it is only giving me a success message.

on the donation page which i currently have to manually open, i have selected print but there is no print button or a way to print a receipt.
There was an existing issue with print error but here i cannot even see the button.

also, i have selected razorpay on the donation page and i expect that means i can open a new payment link but it is only showing me non-razorpay modes of payment, ie, manual cash or bank or cheque modes and not online payment

Module

non-profit

Version

Screenshot 2022-10-17 at 17-37-18 New Donation - new-donation-1
Screenshot 2022-10-18 at 10-25-42 donation
Screenshot 2022-10-18 at 10-26-51 donation - donation
Screenshot 2022-10-18 at 10-29-11 donor - donor2

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

No response

ERPnext compatibility with v.15

Hello guys, after hours of searching this is the only place where I hope to get a reliable answer. Please don't be mad at me, cause this is probably not a real issue.

I am part of the leading team of a NonProfit and we would like to use ERPnext for our memberships, taxes and accounting.

However, the NonProfit module does not seem to work anymore. The link in the Readme.md leads to an outdated documentation which has "v13" in it. Since tha last activity in this repo is 2 years past - following question arise:

Is this app still maintained - and is it compatible with erpnext 15.10?
I was unable to install the app in my containerized installation but that could be due to me being quite new to all this.

Unable to install non_profit on version-15

$ bench version
education 15.0.0
erpnext 15.16.1
frappe 15.17.0
hrms 15.12.0
non_profit 0.0.1
payments 0.0.1
$ bench --site all install-app non_profit
App erpnext already installed

Installing non_profit...
An error occurred while installing non_profit: ('Module Def', 'Non Profit', IntegrityError(1062, "Duplicate entry 'Non Profit' for key 'PRIMARY'"))
Traceback with variables (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 446, in install_app
    _install_app(app, verbose=context.verbose, force=force)
      context = {'sites': ['erp.jpsdc.org'], 'force': False, 'verbose': False, 'profile': False}
      apps = ('non_profit',)
      force = False
      _install_app = <function install_app at 0xffff9f2f5630>
      filelock = <function filelock at 0xffff9f2f52d0>
      exit_code = 0
      site = 'erp.jpsdc.org'
      app = 'non_profit'
      err = DuplicateEntryError('Module Def', 'Non Profit', IntegrityError(1062, "Duplicate entry 'Non Profit' for key 'PRIMARY'"))
  File "apps/frappe/frappe/installer.py", line 297, in install_app
    add_module_defs(name, ignore_if_duplicate=force)
      name = 'non_profit'
      verbose = False
      set_as_patched = True
      force = False
      sync_jobs = <function sync_jobs at 0xffff9e256e60>
      sync_for = <function sync_for at 0xffff9e257880>
      sync_customizations = <function sync_customizations at 0xffff9f3fe950>
      sync_fixtures = <function sync_fixtures at 0xffff9e257a30>
      app_hooks = {'after_install': ['non_profit.setup.setup_non_profit'], 'app_color': ['grey'], 'app_description': ['Non Profit'], 'app_email': ['[email protected]'], 'app_icon': ['octicon octicon-file-directory'], 'app_license': ['MIT'], 'app_name': ['non_profit'], 'app_publisher': ['Frappe'], 'app_title': ['Non Profit'], 'before_tests': ['non_profit.non_profit.utils.before_tests'], 'doctype_js': {'Sales Invoice': ['public/js/payment_entry.js']}, 'global_search_doctypes': {'Non Profit': [{'doctype': 'Certified Consultant', 'index': 1}, {'doctype': 'Certification Application', 'index': 2}, {'doctype': 'Volunteer', 'index': 3}, {'doctype': 'Membership', 'index': 4}, {'doctype': 'Member', 'index': 5}, {'doctype': 'Donor', 'index': 6}, {'doctype': 'Chapter', 'index': 7}, {'doctype': 'Grant Application', 'index': 8}, {'doctype': 'Volunteer Type', 'index': 9}, {'doctype': 'Donor Type', 'index': 10}, {'doctype': 'Membership Type', 'index': 11}]}, 'override_doctype_class': {'Payment Entry': ['non_profit.n...
      installed_apps = ['frappe', 'erpnext', 'hrms', 'education', 'payments']
      app = 'erpnext'
      required_app = 'erpnext'
  File "apps/frappe/frappe/installer.py", line 629, in add_module_defs
    d.insert(ignore_permissions=True, ignore_if_duplicate=ignore_if_duplicate)
      app = 'non_profit'
      ignore_if_duplicate = False
      modules = ['Non Profit']
      module = 'Non Profit'
      d = <ModuleDef: Non Profit>
  File "apps/frappe/frappe/model/document.py", line 300, in insert
    self.db_insert(ignore_if_duplicate=ignore_if_duplicate)
      self = <ModuleDef: Non Profit>
      ignore_permissions = True
      ignore_links = None
      ignore_if_duplicate = False
      ignore_mandatory = None
      set_name = None
      set_child_names = True
  File "apps/frappe/frappe/model/base_document.py", line 577, in db_insert
    raise frappe.DuplicateEntryError(self.doctype, self.name, e)
      self = <ModuleDef: Non Profit>
      ignore_if_duplicate = False
      conflict_handler = ''
      d = {'name': 'Non Profit', 'creation': '2024-03-07 02:01:12.762897', 'modified': '2024-03-07 02:01:12.762897', 'modified_by': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'idx': 0, 'module_name': 'Non Profit', 'custom': 0, 'package': None, 'app_name': 'non_profit', 'restrict_to_domain': None, '_user_tags': None, '_comments': None, '_assign': None, '_liked_by': None}
      columns = ['name', 'creation', 'modified', 'modified_by', 'owner', 'docstatus', 'idx', 'module_name', 'custom', 'package', 'app_name', 'restrict_to_domain', '_user_tags', '_comments', '_assign', '_liked_by']
frappe.exceptions.DuplicateEntryError: ('Module Def', 'Non Profit', IntegrityError(1062, "Duplicate entry 'Non Profit' for key 'PRIMARY'"))

Continuously receiving error on Member

Whenever we enter the details of a Member, we receive the error:

App Versions

{
	"erpnext": "13.34.0",
	"frappe": "13.33.0",
	"iflliler": "0.0.1"
}

Route

Form/Member/NPO-MEM-2022-00001

Trackeback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1448, in call
    return fn(*args, **newargs)
TypeError: get_last_membership() missing 1 required positional argument: 'member'

Request Data

{
	"type": "POST",
	"args": {},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/erpnext.get_last_membership"
}

Response Data

{
	"exception": "TypeError: get_last_membership() missing 1 required positional argument: 'member'"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.