Apprelo Frappe Application
Table of Contents
I want to create an application on Frappe for garments manufacturing company. I ended up at Apprelo.
Apprelo
Is an application created on Frappe, which is used with ERPNext. Source
Setting up Apprelo
Installing Apprelo app on my local bench:
$ bench init apprelo-bench
This Apprelo is very old project. Last commit is 3 years ago. Will face issues definitely.
After creating the bench
$ cd apprelo-bench
Create a site inside the bench
$ bench new-site site.name
$ bench get-app erpnext https://github.com/frappe/erpnext.git
$ bench --site [site-name] install-app erpnext
Add the site link to hosts file too
$ bench --site site.name add-to-hosts
After installing erpnext, complete the setup wizard (need to be done before installing apparelo, as apparelo requires the entries made at the time of setup) and do the following
Install Apparelo App
$ bench get-app apparelo https://github.com/aerele/apparelo.git
$ bench --site [site-name] install-app apparelo
Error:
Updating DocTypes for apparelo : [=============== ] 39%
An error occurred while installing apparelo: Module import failed for DC, the DocType you're trying to open might be deleted.<br> Error: cannot import name 'make_rm_stock_entry' from 'erpnext.buying.doctype.purchase_order.purchase_order' (/home/atulya/Desktop/Projects/Learning-Frappe/apprelo-bench/apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py)
Traceback with variables (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 453, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {'sites': ['atulya.dress'], 'force': False, 'verbose': False, 'profile': False}
apps = ('apparelo',)
force = False
_install_app = <function install_app at 0x7f83b584da80>
filelock = <function filelock at 0x7f83b5847380>
exit_code = 0
site = 'atulya.dress'
app = 'apparelo'
This Apprelo apps was created for ERPNext Version 12 and I am installing it along ERPNext 15. That’s the reason it is giving error.
I have called Apprelo developers too for support. Let’s see if they revert to my mail. Though this above info is provided by them only.
Turnaround solution:
Install Old:
- Bench
- Frappe
- ERPNext Then Install apprelo
$ pip install frappe-bench==5.0.0
I have downgraded the bench.
Error
After running
$ bench --version
Traceback (most recent call last):
File "/home/atulya/.local/bin/bench", line 5, in <module>
from bench.cli import cli
File "/home/atulya/.local/lib/python3.12/site-packages/bench/__init__.py", line 1, in <module>
from jinja2 import Environment, PackageLoader
File "/home/atulya/.local/lib/python3.12/site-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/home/atulya/.local/lib/python3.12/site-packages/jinja2/environment.py", line 15, in <module>
from jinja2 import nodes
File "/home/atulya/.local/lib/python3.12/site-packages/jinja2/nodes.py", line 19, in <module>
from jinja2.utils import Markup
File "/home/atulya/.local/lib/python3.12/site-packages/jinja2/utils.py", line 642, in <module>
from markupsafe import Markup, escape, soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/lib64/python3.12/site-packages/markupsafe/__init__.py)
Downgrading the markupsafe package
$ pip uninstall markupsafe
Found existing installation: MarkupSafe 2.1.3
ERROR: Cannot uninstall MarkupSafe 2.1.3, RECORD file not found. Hint: The package was installed by rpm.
To solve the error, run the pip install markupsafe==2.0.1 command to install the last version of markupsafe that supports soft_unicode. From here
Now install bench 5.0.0
Still old version of bench facing error while creating bench.
Install specific version of erpnext
$ bench get-app --branch version-14 erpnext
Install
- Bench
$ bench init test
- Frappe
This will install latest version of Frappe too.
- Create a site
$ bench new-site site.name
$ bench --site site.name add-to-hosts
- ERPNext v12
$ bench get-app --branch version-12 erpnext
- Apprelo
Error:
Installing any app I get this.
ERROR: No module named 'urllib3.packages.six.moves'
Traceback (most recent call last):
File "/home/atulya/.local/lib/python3.12/site-packages/bench/utils/__init__.py", line 448, in fetch_details_from_tag
org, repo = org_repo
^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/atulya/.local/bin/bench", line 8, in <module>
sys.exit(cli())
^^^^^