Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1526 มุมมอง
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
2558
3
ก.ย. 20
3231
Significance of context ? แก้ไขแล้ว
2
ธ.ค. 15
4818
0
มี.ค. 15
3527
2
มี.ค. 15
6675