Develope Modules from github

I want to develope all modules from github, but i dont know how to really push it to trytond/modules, since it within virtualenv.

I do not understand the issue you are having.

  1. git clone github.tld/my_module_name
  2. . venv/bin/activate
  3. python3 -m pip install --use-pep517 --editable my_module_name

Step 3 will install your module inside the venv inside directory venv
Am I answering your question?

Hartmut made some good recommendations for directory structure:

Sorry if i am not articulate. The problem is: I want to install existing module like for instance gnuhealth. but i want to develope those module too, however its too much work if i edited those inside this path: /home/file/myenv/…/trytond/modules/

i want to make my own modules path. will this path work:

 ├── my_module_1
│   ├── requirements.txt
│   ├── setup.py
│   ├── tryton.cfg
│   └── …
├── my_module_2
│   ├── requirements.txt
│   ├── setup.py
│   ├── tryton.cfg
│   └── …
├── gnuhealth_health_profile
│   ├── requirements.txt
│   ├── setup.py
│   ├── tryton.cfg
│   └── …
├── gnuhealth_ems
│   ├── requirements.txt
│   ├── setup.py
│   ├── tryton.cfg
│   └── …
└── _myvenv
    └── lib
        └── python
            └── site-packages
                └── trytond
                    └── modules/

nad should i run the trytond-admin command per-module??

You can not both use an existing module, and also develop it at the same time.
To develop a module means that you want to push the changes upstream.

Tryton is meant to extend modules, so you can change most aspects of module by extending the features of a module.

Do not edit the code inside trytond/modules! It will be a nightmare to maintain.
Every time you update the modules your changes will be overwritten.
Every time you want to deploy your code you have to manually edit the files.

See Extend model — Tryton server

Do create a module that extends the modules you want to change.

What you are trying to do is explained very well in the module tutorial.

PS: I do not know if it is possible to extend gnuhealth modules, I can only speak for tryton modules.

1 Like

You should install the modules using pip.
After installing your modules with pip you need to restart trytond.
After you have installed the modules you need to run trytond-admin one time with -m flag so that the modules appear inside your database.

Now you will have the modules list in your Modules view inside the client, now you can activate them using the gui/webclient. Or you can activate the modules using trytond-admin.

Please try to ask one question per topic.
If there are multiple questions per topic it becomes very confusing both for the person trying to answer, and for the people reading.

1 Like