Skip to Content
Menu
This question has been flagged
1 Atsakyti
1477 Rodiniai
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")


Portretas
Atmesti
Autorius

@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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
liep. 22
2514
3
rugs. 20
3181
2
gruod. 15
4765
0
kov. 15
3498
2
kov. 15
6645