health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Health-dev] Appointment ID (name field) on Appointment does'n autocompl


From: Francisco Maria Moyano Casco
Subject: [Health-dev] Appointment ID (name field) on Appointment does'n autocomplete on save
Date: Wed, 2 Aug 2023 10:34:54 -0300

Hi,
    I am using health 4.2. I noticed than when you assign  a health_prof to an Appointment that is already createds (exists at the database level) and the state changes to Confirmed, the Appointment ID doesn't autocomplete.
    You can do so adding to the write classmethod
            (.....)
            # Check if the Appointment ID is set
            if (values.get('state') or appointment.state) in ['confirmed', 'checked', 'done'] \
                and (values.get('healthprof') or appointment.healthprof) \
                and (values.get('patient') or appointment.patient) \
                and not appointment.name:
                values['name'] = cls.generate_code()
            (......)

     Regards.
          Francisco


reply via email to

[Prev in Thread] Current Thread [Next in Thread]