Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1173 Lượt xem
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")


Ảnh đại diện
Huỷ bỏ
Tác giả

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 22
2282
3
thg 9 20
2957
2
thg 12 15
4594
0
thg 3 15
3283
2
thg 3 15
6414