Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1249 Vizualizări

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

Imagine profil
Abandonează

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..

Related Posts Răspunsuri Vizualizări Activitate
1
iun. 25
1767
3
iul. 25
3375
1
mai 25
1525
1
mai 25
1774
4
mai 25
2905