Odoo Help

0
1 Answer
1
Haresh Kansara
3/14/19, 1:40 PM

Hi friend,

you can do like this:

rec = self.env['event.score.updation'].search([], limit=1)

return {

    "type": "ir.actions.act_window",

    "res_model": "event.score.updation",

    "res_id": rec.id,                                            

    "view_mode": "form",

    "view_type": "form",

    "view_id": self.env.ref('forum_ft.event_score_updation_view').id,

}

From above code, first i have get latest record and then pass in res_id.

Accept and and upvote answer if helpful..

Thanks and Regards

Haresh Kansara

1 Comment
Ajini A V
3/14/19, 10:25 PM

Thank you, its work correctly.

Once again thanks and regards ,

Ajini A V

Ask a Question
Writer
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now