Issue with act_open_evaluation Button Not Opening xxx.patient.evaluation Form

I am trying to open a gnuhealth.patient.evaluation form from an appointment (gnuhealth.appointment) when clicking the “Open Evaluation” button. However, I am facing an issue where the button does not work as expected. Here is what I have implemented:

  1. Method in the Appointment Model (act_open_evaluation)
@classmethod
@ModelView.button
def act_open_evaluation(cls, appointments):
    pool = Pool()
    Evaluation = pool.get('gnuhealth.patient.evaluation')

    for appointment in appointments:
        if not appointment.patient:
            raise ValueError("Patient is required to open evaluation")

        # Create a new PatientEvaluation entry
        evaluation = Evaluation.create([{
            'patient': appointment.patient.id,
            'appointment': appointment.id,
            'evaluation_start': datetime.now(),
            'state': 'in_progress',
        }])

        # Update Appointment state
        cls.write([appointment], {'state': 'in_nurse'})

    return {
        'name': 'Medical Evaluation',
        'type': 'ir.action.act_window',
        'res_model': 'gnuhealth.patient.evaluation',
        'view_mode': 'form',
        'view_id': False,
        'target': 'current',
        'context': {'default_patient': appointment.patient.id},
    }
  1. Button in appointment.xml
<button name="act_open_evaluation" 
    string="Open Evaluation" 
    icon="tryton-go-next"
    help="Open the patient evaluation form"
    invisible="Eval('state') != 'checked_in'"/>
  1. Action Definition in ir.action.act_window
<record model="ir.action.act_window" id="act_open_patient_evaluation">
    <field name="name">Open Patient Evaluation</field>
    <field name="res_model">gnuhealth.patient.evaluation</field>
    <field name="view_mode">form</field>
    <field name="view_id" ref="gnuhealth_patient_evaluation_view"/>
</record>

However, when I click the button, the form does not open it only change the state to checked, and there is no clear error message. Am I missing something in the action definition or method implementation? Any guidance would be greatly appreciated.

It is probably safer to use ModelView.button_action and return only the dynamic values.

Do you perhaps have an alternative for how I could create a patient evaluation from an appointment tree without using a wizard?

It is always working against the design of the framework to use wizard to create stuffs.
Why no let the user just create the record he wants to create from the menu entry? This can be helped by providing a relate from one record to another one such that the domain inversion will prefill the field used as link.

The user think, it would be too troublesome to have to switch between entry menus.