Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
1228 Переглядів
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")


Аватар
Відмінити
Автор

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

Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
лип. 22
2328
3
вер. 20
2997
2
груд. 15
4623
0
бер. 15
3324
2
бер. 15
6451