On 2016-11-24 19:22, Vincent Bastos wrote:
> On Thu, Nov 24, 2016 at 6:37 PM, Nicolas Évrard <
nicolas...@b2ck.com>
> wrote:
>
> > * Vincent Bastos [2016-11-24 01:38 +0100]:
> >
> >> How can I see what the maximum number of id's a One2Many field returns?
> >>
> >
> > Just specify size=… in the definition of the One2Many
> >
> >
http://doc.tryton.org/4.0/trytond/doc/ref/models/fields.html
> > #trytond.model.fields.One2Many.size
>
>
> I thought that field was used to limit the number of records?
>
> I didn't want to limit the number of child records. I wanted to limit the
> number of id's returned in a model.x.read call.
You can not because reading a One2Many means getting all the values for
data integrity.
> It's ok though, I am no longer using the one2many field to get some ids'.
Of course, if you want just some (which means it is not really a
One2Many) the proper way is to use a relate action (searching on the
target model with the right domain and limit).
--
Cédric Krier - B2CK SPRL
Email/Jabber:
cedric...@b2ck.com