default method should be called even for Function field.On 12 Mar 03:53, Jesús Martín Jiménez wrote:
> Hi,
>
> I would like to add a One2Many field in a model without modifying the
> target model, so I'm trying to make this field as a funtional one. Now, I
> want to set the default values on each new record created through the
> setter method of this field, but seems that de default_field() method on a
> function field is not called. Is it correct? I'm missing something?
But at which moment are you expecting the call?
--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
On 12 Mar 13:31, Jesús Martín Jiménez wrote:Creating a new record in a one2many will not trigger the default value
> 2014-03-12 13:05 GMT+01:00 Cédric Krier <cedric...@b2ck.com>:
>
> > On 12 Mar 03:53, Jesús Martín Jiménez wrote:
> > > Hi,
> > >
> > > I would like to add a One2Many field in a model without modifying the
> > > target model, so I'm trying to make this field as a funtional one. Now, I
> > > want to set the default values on each new record created through the
> > > setter method of this field, but seems that de default_field() method on
> > a
> > > function field is not called. Is it correct? I'm missing something?
> >
> > default method should be called even for Function field.
> > But at which moment are you expecting the call?
> >
> >
> When I make click over the new record icon of the one2many field.
of the one2many but the default values of the target Model.
--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/