On 2018-10-01 02:52, Markus Bala wrote: > > > I am going to integrate with some WMS system for receiving. When user > > > input the PO number which is "Lodnum" then tryton "on_change" and will > > > display the WMS data to the list (MS SQL Server). > > > > > > Background, after "on_change", I will read data from MSSQL. And insert to > > > Tryton postgres. > > > But when inserted, above error occurred. > > > > on_change calls are always read-only to enforce good design and > > practice. You can not save in the database something that the user did > > not save yet. Instead you must just send modification to the client by > > setting fields (without saving). > > for ModelSQL , we can set by "self.field = value". > But how to setting the fields for context_model?
It is set by the context. Otherwise, it is a model like the others, you can define on_change on it etc. -- 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-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20181001102039.pcjhlogazp3dwy4t%40kei.