How to create several nested forms in a module?

Hi Tryton community,

I’m wondering if it’s possible to create nested forms, i will try to explain with a simple example:
Module World, form world with a list of continent
form continent with a list of country
form country with a list of town
I don’t need a nested menu too but I need that db tables are created with the correct primary/secondary keys to allow the links between the forms.

Maybe someone knows a module made like that ?

Thanks in advance.

I guess you are looking for One2Many fields.

Yes I use a One2Many field inside to link
Can I use again a One2Many field inside to link and a One2Many field inside to link ?
Is there a limitation concerning the number of nested One2Many field ?
At the end, db side we should have table_world with key_world, table_continent with key_continent and key_world, table_country with key_country and key_continent, table_town with key_town and key_country, isn’t it ?


There will be a table per ModelSQL classes.

Ok thank you very much it works.

Maybe you also speak of a nested representation of the data in a tree or graph.

You can create a list view with a tree structure.

AFAIK it is also possible to use different underlying models in one graph, only the represented fields in the graph must be named the same.

But AFAIK it is not possible to show such a graph inside a form view, as you can see in the product categories representation on product form view.

No it was really a list in a form when you switch this list to the form you see a new list and again you switch to a form which contains a list.
List view with tree structure is a nice feature, thanks for the info :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.