تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1240 أدوات العرض

hi, i try to create a new record in a smart button, but i have the next error:  Record does not exist or has been deleted.

return {               

'type': 'ir.actions.act_window',               

'name': 'model',               

'view_mode': 'tree,form',              

 'res_model': 'model.name',               

'domain': [('field.id', '=', self.id)],          }

}


that's my code in my def of smart button

الصورة الرمزية
إهمال

hi,
you have a view where your smart button is defined.
when you click on the smart button, a record X is created and you want to display it right ?

If it's the case then in your return dict you add key 'res_id': X.id and remove domain.

P.S: self.id refers to the model which view is displayed, not your created record..

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 25
1763
3
يوليو 25
3367
1
مايو 25
1521
1
مايو 25
1768
4
مايو 25
2897