lineas attributes don' t get updated

18 views
Skip to first unread message

Cato Nano

unread,
Feb 1, 2018, 10:47:42 AM2/1/18
to tryton
So, in Proteus I am seeing this sequence of lines

In [52]: bolletta.tipo
Out[52]: 'sociale'

In [53]: aff.bolletta.tipo <-- aff is a bolletta line
Out[53]: 'sociale'

In [54]: bolletta.tipo = 'commerciale'

In [55]: bolletta.save()

In [56]: bolletta.tipo
Out[56]: 'commerciale'

In [57]: aff.bolletta.tipo
Out[57]: 'sociale'


it seems like the line doesn't get updated

Is this expected ?

I'm asking because this is probably why I don' t see what i expect in the client.

This means that my work on the visibility of a field is not wrong. It' s just that I was misinterpeting what was happening

Cédric Krier

unread,
Feb 7, 2018, 5:15:07 PM2/7/18
to tryton
On 2018-02-01 07:47, Cato Nano wrote:
> So, in Proteus I am seeing this sequence of lines
>
> In [52]: bolletta.tipo
> Out[52]: 'sociale'
>
> In [53]: aff.bolletta.tipo <-- aff is a bolletta line
> Out[53]: 'sociale'
>
> In [54]: bolletta.tipo = 'commerciale'
>
> In [55]: bolletta.save()
>
> In [56]: bolletta.tipo
> Out[56]: 'commerciale'
>
> In [57]: aff.bolletta.tipo
> Out[57]: 'sociale'
>
>
> it seems like the line doesn't get updated
>
> Is this expected ?

If I understand correct, yes it is expected.
When you save a parent record, the existing instance of the children are
not refreshed. You must do it manually by calling .reload or get the new
instance from the parent.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Cato Nano

unread,
Feb 12, 2018, 4:25:35 AM2/12/18
to tryton
Il giorno mercoledì 7 febbraio 2018 23:15:07 UTC+1, Cédric Krier ha scritto:
> On 2018-02-01 07:47, Cato Nano wrote:
> > So, in Proteus I am seeing this sequence of lines
> >
> > In [52]: bolletta.tipo
> > Out[52]: 'sociale'
> >
> > In [53]: aff.bolletta.tipo <-- aff is a bolletta line
> > Out[53]: 'sociale'
> >
> > In [54]: bolletta.tipo = 'commerciale'
> >
> > In [55]: bolletta.save()
> >
> > In [56]: bolletta.tipo
> > Out[56]: 'commerciale'
> >
> > In [57]: aff.bolletta.tipo
> > Out[57]: 'sociale'
> >
> >
> > it seems like the line doesn't get updated
> >
> > Is this expected ?
>
> If I understand correct, yes it is expected.
> When you save a parent record, the existing instance of the children are
> not refreshed. You must do it manually by calling .reload or get the new
> instance from the parent.
>

Ok, thanks
Reply all
Reply to author
Forward
0 new messages