Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
1373 Visualizações
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
Cancelar
Autor

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

Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
jul. 22
2457
3
set. 20
3104
2
dez. 15
4713
0
mar. 15
3433
2
mar. 15
6557