# Multiple custom modules with hatchling and tryton\_dev

**URL:** https://discuss.tryton.org/t/multiple-custom-modules-with-hatchling-and-tryton-dev/9430
**Category:** Message Board
**Created:** [October 7, 2026, 1:34pm UTC](https://discuss.tryton.org/t/multiple-custom-modules-with-hatchling-and-tryton-dev/9430 "2026-10-07T13:34:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)
#### Post date: [October 7, 2026, 1:34pm UTC](https://discuss.tryton.org/t/multiple-custom-modules-with-hatchling-and-tryton-dev/9430/1 "2026-10-07T13:34:50Z")

</div>

Hi,

I’d like to share my experience developing multiple custom modules with the latest Tryton development version (8.3) and the new `hatchling` packaging.

I always develop my custom modules on Tryton dev and then graft the necessary changes onto the lower branches.

Until now (with `setuptools`), I created symlinks of my custom modules in `trytond/modules` (the same approach as for the standard Tryton modules), so I could import a custom module this way:  
`from trytond.modules.custom_module import ...`

To use my modules in a lower branch, I simply ran:  
`pip install -e custom_module --use-pep517`  
which installed all the dependencies.

But now, with the new `hatchling` system, I’m running into problems when using several custom modules that depend on one another: the import paths of custom modules are no longer valid in some branches (8.2).

Here’s my solution:

- First, use the latest cookiecutter template to create your custom module with `hatchling` (and the symlink if your module name is prefixed):  
`cookiecutter --output-dir tryton_custo cookiecutter-module`
- If you develop on Tryton dev, install your custom module in editable mode with the `--no-deps` option:  
`pip install -e custom_module --use-pep517 --no-deps`
- If you need to import a custom module inside another custom module, use:  
`from prefix_custom_module.module_file import model`

Hope this helps. Feel free to share your own approach! 🙂

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 7, 2026, 4:49pm UTC](https://discuss.tryton.org/t/multiple-custom-modules-with-hatchling-and-tryton-dev/9430/2 "2026-10-07T16:49:47Z")

</div>

This is because hatchling does not support “dev mode” with a path rewrite that is not replaced in the package directory.  
This is why the cookiecutter template adds a “loolback” symlink for module with prefix to provide the same path rewrite.  
We did not make such symlink in the standard module because usually core developers use the `.hooks/link_modules` script. And also because the symlink would need to be `trytond/modules/<module name>`.
