跳至内容
菜单
此问题已终结
1 回复
1311 查看
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

形象
丢弃
相关帖文 回复 查看 活动
0
7月 22
2421
3
9月 20
3075
2
12月 15
4693
0
3月 15
3397
2
3月 15
6526