Hi guys,
In my medical module, I created 2 models, "appointment" and "evaluation".
on the appointment form, I created a "confirm" button which changes the appointment state from the draft state to the confirmed one, with the following function:
def confirm(self):
self.write({'state': 'confirmed'})
It works like perfect, but I need when I click in the same button, to create a new record in the "evalutation" table, and copy the data of this appointment.
How to do it please? any advice?