Hi Cédric, Thank you very much for your help. I am sharing the code which i am trying. it may give more understanding. Following are the three fields in my model. on change of appartment i am tryting to set flat_numbers.
But flat_numbers appears to be empty even if i return return [('101',101),('201',201)]. Please let me know what i am doing wrong here. appartment = fields.Many2One('apt.model','Apt') flat_numbers = fields.Selection([ ], 'Flat Numbers',states={ 'invisible': ~Eval('appartment'), }, on_change_with=['appartment'], depends=['appartment']) def on_change_with_flat_numbers(self): return [('101',101),('201',201)] On Sunday, January 26, 2014 2:21:28 PM UTC+1, Cédric Krier wrote: > > On 26 Jan 03:07, sunny...@gmail.com <javascript:> wrote: > > Hi All, > > > > I have two selection fields A and B. Then on change of A i want to set > my > > own value to the B. > > > > But it hasn't been set. I am able to set for other type of > > fields(Char,Text etc.). > > > > Is it possible in tryton for selection fields to set value? > > Yes, probably you are not given the right internal value for the > selection. > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: cedric...@b2ck.com <javascript:> > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/ >