Skip to Content
Menú
This question has been flagged
1 Respondre
1170 Vistes
Model patient:
def open_form(self):
return{
'type': 'ir.actions.act_window',
'res_model': 'model.appoint',
'view_mode': 'form',
'context':{'default_patient_name': self.id
}
}

model model.appoint:

patient_name =field.many2one("patient")


Avatar
Descartar
Autor

@Niyas Raphy
i try to add 'target': 'new'
but srill not work

Best Answer

HI,
Written code seems to by fine, can you ensure that service has been restarted after adding the context.

Can you add                 'target': 'new' in the return dict and see if that makes any difference.


Thanks

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de jul. 22
2282
3
de set. 20
2956
2
de des. 15
4594
0
de març 15
3282
2
de març 15
6413