Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1269 Zobrazení
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
Zrušit
Autor

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

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
čvc 22
2380
3
zář 20
3050
2
pro 15
4663
0
bře 15
3361
2
bře 15
6498