El 16/05/17 a les 09:42, Khurram Shahzad ha escrit:
Hi all,

I have added following field on the view:

    surgeries = fields.Function(fields.One2Many('gnuhealth.surgery',
None, 'Surgeries'), 'get_surgeries')

The function 'get_surgeries' returns the list of surgeries as per
foreign key.

The list of surgeries is displayed but when the user opens a surgery
record by double clicking on it, the record is not editable and all the
action buttons are disabled.

Is there anyway to have this record opened in edit mode?

Function fields are readonly by default unless you provide a setter [1] for them. You should implement a setter that writes the changes to the source model.

HIH

[1] http://doc.tryton.org/4.4/trytond/doc/ref/models/fields.html?highlight=setter#trytond.model.fields.Function.setter


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
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/cfc61e16-eaed-5634-74d5-88a2487daea9%40koolpi.com.

Reply via email to