How to create dynamic tree view? or hidden field in tree view?
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
Hello Irawan,
You can create dynamic tree view using fields_view_get method.
Example:
from lxml import etree
@api.model
def fields_view_get(self, view_id=None, view_type=’tree’, context=None, toolbar=False,submenu=False):
result = super(model_name,self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
doc = etree.XML(result[‘arch’])
if new_string:
for node in doc.xpath(“//field[@name=’field_a’]”):
node.set(‘string’, new_string)
result[‘arch’] = etree.tostring(doc)
return result
Hope this help.
Thank you.
But, how to trigger that when onchange?
Thank you.
But, how to trigger that when onchange?
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
3
Apr 25
|
4437 | ||
|
5
Nov 23
|
42784 | ||
|
1
Sep 22
|
3607 | ||
|
1
Jun 22
|
12436 | ||
|
3
Mar 20
|
10927 |