On Wednesday, July 18, 2012 11:50:27 PM UTC-7, Cédric Krier wrote:
>
> On 18/07/12 16:23 -0700, Tristian Paul Lopez Azuara wrote: 
> > Hi all, I think the title sums it all, I want to display a function 
> field 
> > using a One2Many widget, 
> > the reason for this is that I compute the the values of the list lazily 
> > (Basically a list of dictionaries) 
> > and I do not store them in the database, so there's no **id** to be 
> > referenced, I'v tried implementing 
> > said functionality, but I can't seem to set the correct return values 
> for 
> > the function field. No errors get 
> > thrown if I return a list of numbers, which I suspect are used to 
> reference 
> > the One2Many relation, but 
> > I also want to supply the values for each reference. 
> > 
> > How would this situation be approached? 
>
> You can not. 
> You must provide ids, they can come from a Model based on a query if you 
> want. 
>
> -- 
> 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/ 
>


Hi, thanks for the reply, 

Then how would I supply values that are not in the database and do not have 
an
id for a one2many field.

Or maybe how to custom load a one2many widget,  I've done it in wizards, 
but in the wizard the models only inherit from ModelView so I just override 
the default_get method, but on models that inherit from ModelSQL and where 
the model has values, I need to compute the data based on other fields of 
said 
model.

Regards, Tristian.

-- 
-- 
[email protected] mailing list



Reply via email to