Odoo Help

1 Answer

Nilmar Shereef

--Nilmar Shereef--
| 5 4 8
Bur Dubai, United Arab Emirates
--Nilmar Shereef--

Python Developer. Odoo Techno Functional Consultant.

Nilmar Shereef
12/20/16, 3:42 AM

I think it may help you:


def get_view_name(self):
        a = 0       

        view_id = self.env['ir.ui.view'].search([('model', '=', self._inherit), ('type', '=', 'form')])       

         for i in view_id:
                 a += 1       

         if a == 2:
                print "Live Xml Id Is", i.xml_id

1 Comment
12/20/16, 4:10 AM

It is not what im looking for, what it does here it gets all form views from inherited model, but how to know which one is currently active(showing on screen)?

Ask a Question
Keep Informed
1 follower(s)
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.

Odoo Training Center

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

Test it now