تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1398 أدوات العرض
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
يوليو 22
2462
3
سبتمبر 20
3117
2
ديسمبر 15
4722
0
مارس 15
3444
2
مارس 15
6579