Re: [tryton] lineas attributes don' t get updated
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 -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/3d1067d1-4604-49b2-bc3f-bb65995e266a%40googlegroups.com.
Re: [tryton] lineas attributes don' t get updated
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.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20180207221100.GX7321%40kei.