Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1397 Prikazi
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
Opusti
Avtor

@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
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jul. 22
2461
3
sep. 20
3116
2
dec. 15
4722
0
mar. 15
3441
2
mar. 15
6578