I have hospital appointment registration model that is relates to lab test model :
'lab_test_ids': fields.one2many('oeh.medical.lab.test','apoointment','Lab Tests', readonly=False,states={'Completed': [('readonly', True)]}),
in the view I have a TAB (page) under appointment form :
page string="Lab Tests"> <field name="lab_test_ids" context="{'default_appointment': active_id}" domain="[('appointment', '=', active_id)">
My challenge is that I have patient and physician in both views (selection fields) that relate to two other models. I was wondering if I could SET value for a patient field in the parent view and inherit that value to the child view (Lab test). how can I do that?
NOW i use domain to filter through the patient. and the candidate patient is Only one . how can I set this value to the field automatically.
> <field name="patient" domain="[('id', '=', parent.patient)]"
I appreciate your help.