İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1286 Görünümler
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
Vazgeç
Üretici

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

En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Tem 22
2403
3
Eyl 20
3063
2
Ara 15
4677
0
Mar 15
3373
2
Mar 15
6514