Custom modules not loading in Tryton 7.0 with Docker setup

Custom modules not loading in Tryton 7.0 with Docker setup

Hello Tryton community,

I am running Tryton 7.0 using Docker with a PostgreSQL database. The core services start properly, and I was able to install the official modules like account successfully.

However, I am having trouble loading my custom modules (inventario_basilos and basilios_proveedores). They do not appear in the Tryton client under the module list.

Here is a summary of my setup:

  • Docker Compose file includes services for postgres, tryton-init, tryton-server, and tryton-cron.
  • The trytond.conf configuration includes the following relevant parts:
[database]
uri = postgresql://tryton:tryton@postgres:5432/tryton
path = /var/lib/trytond

[web]
listen = 0.0.0.0:8000

[modules]
activate_depends = True
path = /usr/lib/python3.10/site-packages/modules:/usr/local/lib/python3.11/dist-packages/trytond/modules

My custom modules are located in the host folder ./modules, which is mounted into the container at /usr/lib/python3.10/site-packages/modules.

Example of the module inventario_basilos/tryton.cfg:

Copiar
Editar
[tryton]
name = inventario_basilos
version = 7.0.0
category = Inventory
description = Custom inventory management module
author = Hugo Ramirez
depends = stock,product,party
xml =
    view/inventario_linea.xml
    view/conciliacion_diaria.xml
    view/ir.model.access.csv

I have verified that the module files exist inside the container at /usr/lib/python3.10/site-packages/modules/inventario_basilos.

What I have tried so far:

Restarting all containers.

Running trytond-admin -d tryton --all -c /etc/trytond.conf via the init container to update modules.

Verifying file permissions and paths.

Installing standard Tryton modules like account works fine.

My question is:

What could be the reason that my custom modules do not show up in the client?

Is there any recommended way to mount and configure custom modules in Tryton 7.0 Docker setup?

Could the path configuration in trytond.conf be wrong or incomplete?

Any help or advice would be greatly appreciated!

Thank you very much.

Hello Hugo,

AFAIK these two options are not available in Tryton. Please have a look in the Tryton documentation.

Also your module setup is quite old

Today a tryton.cfg looks different.

… especially the depends should look like:

depends =
    stock
    product
    party

If the module is defined correctly, you can refresh the module list with:

trytond-admin -d tryton --all -c /etc/trytond.conf -m

Hope it helps. I am interested from which source your information come from? Is it a LLM output?

Hello Udono,

Thank you for your helpful feedback. You were right about the config entries — after reviewing the official Tryton documentation, I realized those options (activate_depends and path) do not belong in the configuration and are not needed in my current setup. Also, I’ve decided to discontinue using custom modules for my university project, since after analyzing the project requirements more deeply, I noticed that the base Tryton modules already cover all necessary functionalities.

Now I am trying to resolve a formatting issue with the sale price field for products. For example, when I input 310, the system still displays it as 310.0000.

I have already:

  • Configured the local currency as HNL (Honduran Lempira),
    • Assigned this currency to the user I log in with,
  • And verified that the decimal precision is set to 2 digits in the “Decimal Accuracy” configuration.

Despite all this, the field still shows four decimal places.
Do you have any advice on how to force the output to format as 310.00 instead of 310.0000?

Thanks again for your time and support.

Best regards,
Hugo

Please start a new topic for your new issue.