Thank you for the help Cedric.
On Monday, November 25, 2013 11:56:53 PM UTC+5:30, Cédric Krier wrote: > > On 24/11/13 22:26 -0800, appu wrote: > > Hi Devs, > > Could anybody please help me with following two questions: > > 1) > > I searched a lot in tryton documentation and could not find any > > example of how to show results from more than one model in tree view. > > You can not because Tryton uses views which are linked to one Model. > Ok. > > > I have model A and model B. and I want to show all attributes of > model > > A and some attributes of model B in same tree view based on date > ascending > > order. > > saw some thing in open-ERP like we can make union of two models > > results with sql query and create view in init menthod. is there some > > thing like this in Tryton? > > First, if your two models are so similar that they share almost all > their fields, you should first think about merging them. > Otherwise, it is possible to define a readonly Model for which you are > not using an existing table but the result of a query. See > > http://doc.tryton.org/3.0/trytond/doc/ref/models/models.html?highlight=query#trytond.model.ModelSQL.table_query<http://www.google.com/url?q=http%3A%2F%2Fdoc.tryton.org%2F3.0%2Ftrytond%2Fdoc%2Fref%2Fmodels%2Fmodels.html%3Fhighlight%3Dquery%23trytond.model.ModelSQL.table_query&sa=D&sntz=1&usg=AFQjCNGJBzWz1VyQc8Q0ICAbAAY2hncVTA> > > > this helps me. > > 2) how do we show free text of field attributes in form view? I know we > > can make read only of Char field. but still that shows text field box. > > Please help me if there is a way to show only free text ( non > editable > > like Label). > > I'm not sure to understand your need here. But there is the Text field > > http://doc.tryton.org/3.0/trytond/doc/ref/models/fields.html?highlight=text#trytond.model.fields.Text<http://www.google.com/url?q=http%3A%2F%2Fdoc.tryton.org%2F3.0%2Ftrytond%2Fdoc%2Fref%2Fmodels%2Ffields.html%3Fhighlight%3Dtext%23trytond.model.fields.Text&sa=D&sntz=1&usg=AFQjCNFuh3X0Cn9PL31502eMfe0rgXAK_g> > > > But as you are talking about label, if you mean static text on a view, > just use label tag > > http://doc.tryton.org/3.0/trytond/doc/topics/views/index.html?highlight=label#label<http://www.google.com/url?q=http%3A%2F%2Fdoc.tryton.org%2F3.0%2Ftrytond%2Fdoc%2Ftopics%2Fviews%2Findex.html%3Fhighlight%3Dlabel%23label&sa=D&sntz=1&usg=AFQjCNF0Lmw6_c9wQJ818CWVOZbj_FD6uQ> > > I want to show dynamic values of fields defined in module in the form view. I con't use Label as it is used to show static field name (heading) not the value of the field. I am new to tryton and am asuming field.Char is like html input type="text", and field.Text is like html input type="textarea". so I want to show dynamic value of field in form view with bold string. and don't want to see the style of text, textarea. so finally i want to show like <b> field.value</b>. I am sorry here i am giving html example because i don't know tryton much. Thank Again for great Help Cedric --Appu > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: [email protected] <javascript:> > Tel: +32 472 54 46 59 > Website: > http://www.b2ck.com/<http://www.google.com/url?q=http%3A%2F%2Fwww.b2ck.com%2F&sa=D&sntz=1&usg=AFQjCNFmU9OQaIvN1i3SCJNQuBsMwQItug> > >
