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")
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")
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
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
0
июл. 22
|
4183 | |||
|
3
сент. 20
|
4849 | |||
|
Significance of context ?
Решено
|
2
дек. 15
|
6435 | ||
|
0
мар. 15
|
5153 | |||
|
2
мар. 15
|
8194 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
@Niyas Raphy
i try to add 'target': 'new'
but srill not work