Dear Community,
As per the requirements of our users, we decided to create "sale" when and appointment is saved for a patient. I am able to "create" the "sale" row from "create" method of appointment (actually gnuhealth_appointment).
Now, I want to relate the "gnuhealth.appointment" row with "sale.sale" row bu storing id of appointment in the "origin" column of "sale.sale". How can I get the "id" of appointment in the create method, as, I think, id is assigned after the row is saved which is done by the last line of create method:
super(Appointment,cls).create(appointments);
Can any body guide me how I can achieve this?