On 2017-08-16 09:36, Khurram Shahzad wrote: > But, to meet another requirement, I overrided the write method in > gnuhealth.patient.rounding class as: > > @classmethod > def write(cls, roundings, values): > # TODO - confirm the record is being updated by the Doctor who > created it > > return super(PatientRounding, cls).write(appointments, values) > > After this change I can still view the records but when I 'Save' after > changing a round, following error is displayed: > > Traceback (most recent call last): > > Target.write(*to_write) > TypeError: write() takes exactly 3 arguments (5 given)
Like the exception said, this is because ModelStorage.write must support more than 1 set of records, value. See http://doc.tryton.org/4.4/trytond/doc/ref/models/models.html#trytond.model.ModelStorage.write PS: Please set a title to your email, see https://groups.tryton.org/netiquette#subject -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] 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/20170816070429.GI3622%40kei.
