On 26/04/10 14:38 -0500, Oscar Javier Moreno Rey wrote:
> Hi everybody,
> 
> How can I construct linked lists in tryton?
> 
> I mean, I have two Selection fields A and B, and I want to fill list B with
> some options related to the option choosed previously in list A.
> I tried with on_change option to change the domain of the second list
> but it didn't work. 
> Should I use Many2One fields where to store A and B options instead Selection
> fields?

You must use a dynamic domain of field B that will depend on field A. And as
domain doesn't work on Selection, you must use Many2One.

You can find an example here:
http://hg.tryton.org/hgwebdir.cgi/modules/sale/file/7e29ed4c8cf3/sale.py#l55


-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpO5K6ddiQ1Z.pgp
Description: PGP signature

Reply via email to