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")
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
0
lug 22
|
3191 | |||
|
3
set 20
|
3765 | |||
|
Significance of context ?
Risolto
|
2
dic 15
|
5448 | ||
|
0
mar 15
|
4080 | |||
|
2
mar 15
|
7287 |
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