How to debug development

H Hola comunidad de Tryton,

Mi nombre es Hugo y actualmente estoy desarrollando un sistema personalizado para una PyME en Honduras usando Tryton 7.0. Ya tengo el entorno funcionando correctamente con:

  • Tryton 7.0
  • PostgreSQL (penúltima versión por compatibilidad)
  • Instalación local en Windows y en entorno Docker (ambos funcionan)
  • Dos módulos personalizados: inventario_basilos y proveedores_basilos, ubicados en C:\Proyectos

Mi problema actual es que intento crear una vista personalizada en PostgreSQL para mostrar ciertos datos de productos en Tryton, pero me da un error al iniciar el servidor:

Sé que Tryton intenta crear las vistas definidas en los modelos o en SQL externos, pero no logro identificar si el error está en la definición del modelo, en el XML del módulo o en el SQL ejecutado por Tryton.

¿Qué estoy buscando?

  • Recomendaciones para depurar este tipo de errores en vistas SQL desde Tryton
  • Buenas prácticas para definir vistas personalizadas dentro de un módulo
  • Alternativas si Tryton no permite ciertas vistas directamente en la definición del modelo

Agradezco cualquier guía o recomendación. Estoy muy motivado a contribuir y dejar un entorno funcional documentado para futuros usuarios hispanohablantes.

¡Gracias de antemano!

Saludos,
Hugo Noé Ramírez

When you’re talking about a personalized view in postgres, are you talking about a SQL view ? Or are you talking about the concept of a view in Tryton ?

You should also provide us with the traceback and the code of what you’ve done as far, it would help us helping you.

.Perfect, I’m new to this world. Can you tell me how I can share the code and tracking with you?
Or should I copy and paste everything right here?

I think the best way is to explain what you want to do on a high level.
You can also post the code you think if causing the crash along with the traceback from the server (trytond console output) and or tryton traceback.

Maybe we can help if you tell us what sort of data you want to display?
Ex. I want to display stock in a particular warehouse, and suppliers for each product on the same window in the tryton client.
Where do you want to display the data? In the tryton client, in a report?

. Hi all,

Sorry for my English.

I set up Tryton 7.0 with Docker and custom modules. The modules are in the database and folder but don’t show up in the client.

All logs and info are here:

Thanks a lot for your help!

The custom modules must be installed in the docker image.
Usually you need to create a Dockerfile using tryton/tryton image and RUN pip install <path to your module>.

Created another instance with docker following your instructions andi have uploaded all the updated giles to the gitHub repositoty ced.
I followed your step carefully but is still an error i can’t resolve i left a txt file in the repository with details of the current issue for you to review GitHub - hugoRamirez30/tryton-docker

Well “copy” the module in the installation path is not really an installation. You may miss dependencies etc.

Anyway, the Tryton modules must be a direct entry of the trytond/modules directory not inside a subfolder custom.

PS: I do not use Docker for development like that so my comments are very limited. I just use virtualenv with editable installation.

Something that works well is symlinking your modules directly under the trytond/trytond/modules folder, using this technique for years so far :slight_smile:

Installation Status

I have completed the installation of Tryton 7.0 using Docker and PostgreSQL, along with the custom modules.

  • The installation and configuration were successful with no visible errors.
  • The custom modules are active and registered in the database.
  • However, the modules do not show up in the web interface (QWeb Client).

You can review all configuration files, code, and details in the GitHub repository:

I am open to any suggestions or help to resolve the display issue.

Thank you.

In your modules there are no xml files for loading things that the user would see in the interface such as menu items, window actions, etc.
See the module tutorial, it is nicely explained there: