Odoo Help

0
1 Answer
1
Avatar

Nilmar Shereef

--Nilmar Shereef--
1709
| 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:


@api.multi   

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

Register
Odoo Training Center

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

Test it now