I like to continue my problem in this new topic. so to start over.. I basically follow every step in this creating module tutorial → here
Up to the point of Display Records (no 5).. and according to the tutorial, I would be able to see the UI of my module (opportunity) in the dashboard..
But I didn’t able to see, since the SAO is not installed by default.. so me and Cedric has a discussion in here but until today I still failed in deploying sao into my development environment. Even though I already follows the readme.md of sao repo → here
My latest progress in sao is: I managed to build the project successfully with tips from Cedric.. which is: npx grunt --gruntfile Gruntfile.js --force from vscode console inside sao folder inside the tryton project at my development environment.
next step should be: how my trytond server able to serve that nodejs app rite?
I need this badly, and if someone has done this before (I believe there are).. can you please share the link?
If you already have SAO installed, you only need to setup the [web] section in your config file: Configuration file for Tryton — Tryton server then launching Tryton with trytond -c trytond.conf should be enough to use the web client.
You may also find this helpful: Install Sao in a production environment there is some parts you may don’t want as you are in a dev environment but it does explain almost everything.
Thank you very very much for your guide, now I am able to see the module I developed in your tutorial from the dashboard.
Now I got some problem again:
Currently My custom module would require integration with other module, such as company and project management, and others later on.. the problem now.. I cannot see those modules listed in my development dashboard (see below screenshot)
Normally, if the module files/folders are there, they should be available in the web UI in the module list. Can you confirm that the folder you are showing in your screenshot is indeed the folder where trytond is looking for modules?
If you followed the tutorial, it means that you have setup a virtualenv in which you have installed your custom module in editable mode.
So you will have only the depending modules also installed. If you want more module you must install them in the virtualenv.
I execute the ./link_modules command as @Xavi advice from virtual env .. as u can see from my screenshot, there is a prefix (.vemv) before the command.
Try installing the modules you need the same way you did with your custom module but without the editable mode (pip install…).
See: How to install Tryton — Tryton server
After you have installed new modules, you have to update the database in order to let Tryton know that there are new modules. You can do this with trytond-admin -c <your trytond conf> -d <your database name> -m -vv. The last -vv is not really needed but it gives you more information about the process.
Traceback (most recent call last):
File "/moddev/.venv/bin/trytond-admin", line 33, in <module>
admin.run(options)
File "/moddev/.venv/lib/python3.10/site-packages/trytond/admin.py", line 59, in run
pool.init(update=options.update, lang=list(lang),
File "/moddev/.venv/lib/python3.10/site-packages/trytond/pool.py", line 144, in init
restart = not load_modules(
File "/moddev/.venv/lib/python3.10/site-packages/trytond/modules/__init__.py", line 402, in load_modules
_load_modules(update)
File "/moddev/.venv/lib/python3.10/site-packages/trytond/modules/__init__.py", line 366, in _load_modules
graph = create_graph(modules)
File "/moddev/.venv/lib/python3.10/site-packages/trytond/modules/__init__.py", line 95, in create_graph
info = get_module_info(module)
File "/moddev/.venv/lib/python3.10/site-packages/trytond/modules/__init__.py", line 34, in get_module_info
with tools.file_open(os.path.join(name, 'tryton.cfg')) as fp:
File "/moddev/.venv/lib/python3.10/site-packages/trytond/tools/misc.py", line 50, in file_open
return io.open(path, mode, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/moddev/.venv/lib/python3.10/site-packages/trytond/modules/company/tryton.cfg'
(.venv) root@DESKTOP-PRHGPAU:/moddev#
So I checked the folder modules under /moddev/.venv/lib/python3.10/site-packages/trytond/modules/
And there are only few modules there:
So there are only 2 mods there… should I copy those modules from folder /root/.cookiecutters/tryton/modules/ to be under site-packages/trytond/modules ?