Is it possible to get current(active) view xml_id in python, lets say on onchange method, or on button press? I know its possible to get menu_id but i could find any relation between xml_id and menu_id
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
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
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)?
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
lip 17
|
2750 | ||
|
0
mar 17
|
3114 | ||
To show all stages in Kanban view
Rozwiązane
|
|
3
gru 23
|
21631 | |
|
1
maj 21
|
10161 | ||
|
1
sie 18
|
9281 |