Discussion:
[tryton] lineas attributes don' t get updated
Cato Nano
2018-02-01 15:47:42 UTC
Permalink
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
--
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/6798f217-696f-465a-a039-77a8b0b1bb35%40googlegroups.com.
Cédric Krier
2018-02-07 22:11:00 UTC
Permalink
Post by Cato Nano
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: ***@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.
Cato Nano
2018-02-12 09:25:35 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
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.
Loading...