A Django based framework to create diverse business solutions, equipped with a reporting engine with charts, widgets system , a custom admin site and other goodies
Greetings
I am a newbie in Python.
I followed the guide,
when I click on keys: [Clients][Expense][Products][Sales]
I have a error occurs!!
OR Key in left side .
Although all the data I entered in _sampleerp was saved in admin.
All the add buttons work fine and then the error message comes.
`
TypeError at /sample_erp/expense/
__init__() takes 14 positional arguments but 15 were given
Request Method: | GET
-- | --
http://127.0.0.1:8000/sample_erp/expense/
4.1.1
TypeError
__init__() takes 14 positional arguments but 15 were given
G:\Ra-system_ERP\ERP_APP\env\lib\site-packages\django\contrib\admin\options.py, line 834, in get_changelist_instance
ra.admin.admin.changelist_view
G:\Ra-system_ERP\ERP_APP\env\Scripts\python.exe
3.8.3
['G:\\Ra-system_ERP\\ERP_APP', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38\\DLLs', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38\\lib', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38', 'G:\\Ra-system_ERP\\ERP_APP\\env', 'G:\\Ra-system_ERP\\ERP_APP\\env\\lib\\site-packages']
Wed, 28 Sep 2022 18:32:52 +0000
`
`
G:\Ra-system_ERP\ERP_APP\env\lib\site-packages\ra\admin\admin.py, line 343, in wrapper
Local vars
Variable | Value
-- | --
args | (,)
kwargs | {}
self |
view | >
You’re seeing this error because you haveDEBUG = Truein your Django settings file. Change that toFalse, and Django will display a standard page generated by the handler for this status code.
`
`
G:\Ra-system_ERP\ERP_APP\env\lib\site-packages\ra\admin\admin.py, line 324, in changelist_view
I'm new to Django and RA framework too but I suspect it might be something to do with the addition of _search_helptext in Django 4.1
_get_changelistinstance() has the positional argument _self.search_helptext on line 848 (django/contrib/admin/options.py) which is not reflected in the RaChangeList() class.
I found that adding _search_helptext to the end of the positional arguments on line 83 and 87 of ra/admin/admin.py cleared the error (added it to both init and super).
As I've said I'm new to this too so I have no clue yet why (or if) this only seems to affect the sample_erp tutorial
Hopefully the whole RA framework will be updated to work with Django 4 but adding the argument above seemed to workaround this specific error.
from django.db import models
from erp_framework.base.models import EntityModel, TransactionModel, TransactionItemModel, QuantitativeTransactionItemModel
from erp_framework.base.registry import register_doc_type
from django.utils.translation import gettextlazy as
What is this from erp_framework.base.registry import register_doc_type
Greetings I am a newbie in Python. I followed the guide, when I click on keys: [Clients][Expense][Products][Sales] I have a error occurs!! OR Key in left side . Although all the data I entered in _sampleerp was saved in admin. All the add buttons work fine and then the error message comes.
`
TypeError at /sample_erp/expense/
Request Method: | GET -- | -- http://127.0.0.1:8000/sample_erp/expense/ 4.1.1 TypeError __init__() takes 14 positional arguments but 15 were given G:\Ra-system_ERP\ERP_APP\env\lib\site-packages\django\contrib\admin\options.py, line 834, in get_changelist_instance ra.admin.admin.changelist_view G:\Ra-system_ERP\ERP_APP\env\Scripts\python.exe 3.8.3 ['G:\\Ra-system_ERP\\ERP_APP', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38\\DLLs', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38\\lib', 'C:\\Users\\Morteza\\AppData\\Local\\Programs\\Python\\Python38', 'G:\\Ra-system_ERP\\ERP_APP\\env', 'G:\\Ra-system_ERP\\ERP_APP\\env\\lib\\site-packages'] Wed, 28 Sep 2022 18:32:52 +0000`
`
, line 343, in wrapperG:\Ra-system_ERP\ERP_APP\env\lib\site-packages\ra\admin\admin.py
Local vars
Variable | Value -- | -- args | (You’re seeing this error because you have
DEBUG = True
in your Django settings file. Change that toFalse
, and Django will display a standard page generated by the handler for this status code.`
`
G:\Ra-system_ERP\ERP_APP\env\lib\site-packages\ra\admin\admin.py
, line 324, in changelist_viewLocal vars
Variable | Value -- | -- __class__ |`
`
G:\Ra-system_ERP\ERP_APP\env\lib\site-packages\reversion\admin.py
, line 235, in changelist_viewLocal vars
Variable | Value -- | -- __class__ |`
Got hit with the exact same issue.
I'm new to Django and RA framework too but I suspect it might be something to do with the addition of _search_helptext in Django 4.1
_get_changelistinstance() has the positional argument _self.search_helptext on line 848 (django/contrib/admin/options.py) which is not reflected in the RaChangeList() class.
I found that adding _search_helptext to the end of the positional arguments on line 83 and 87 of ra/admin/admin.py cleared the error (added it to both init and super).
As I've said I'm new to this too so I have no clue yet why (or if) this only seems to affect the sample_erp tutorial
Hopefully the whole RA framework will be updated to work with Django 4 but adding the argument above seemed to workaround this specific error.
A new version is released with this, and much more, fixed and added
I also have a problem with the sample_erp
In the models.py file
from django.db import models from erp_framework.base.models import EntityModel, TransactionModel, TransactionItemModel, QuantitativeTransactionItemModel from erp_framework.base.registry import register_doc_type from django.utils.translation import gettextlazy as
What is this from erp_framework.base.registry import register_doc_type
There is no registry.py file in the base folder.
Can you help on this? Thanks.
Hello , Thanks for reporting @ShopCartz The sample ERP tutorial will be revised as there are some big changes in the codebase.
You can skip the doc type registry, i will post here once i push the documentation updates.
Let me know if you face other issues .
Similar issue with Docs. I've commented out the registry bit but when I attempt makemigrations I get.
from erp_framework.admin.admin import erp_framework_site, EntityAdmin #, TransactionAdmin, TransactionItemAdmin ImportError: cannot import name 'erp_framework_site' from 'erp_framework.admin.admin' (/home/myuser/apps/myproject/env/lib/python3.10/site-packages/erp_framework/admin/admin.py)
This in admin.py from erp_framework.admin.admin import erp_framework_site
Django 4.2 Python 3.10
Really looking forward to getting ERP going. Looks awesome.