Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1400 Visualizzazioni
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
Abbandona
Autore

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

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
lug 22
2463
3
set 20
3121
2
dic 15
4724
0
mar 15
3449
2
mar 15
6587