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
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
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)?
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Jul 17
|
2761 | ||
|
0
Mar 17
|
3119 | ||
To show all stages in Kanban view
Diselesaikan
|
|
3
Des 23
|
21648 | |
Odoo 10: Change datetime picker options for a field
Diselesaikan
|
|
1
Mei 21
|
10188 | |
|
1
Agu 18
|
9292 |