Hello does anyone have any idea or doc about return the attr like : invisible or required from on_change function?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
1
Rispondi
4783
Visualizzazioni
You can do it the following (indirect) way:
- Use a hidden boolean field
flag
- For the field you want to set required or invisible use
attrs="{'invisible': [('flag','=',True)]}"
- In the
on_change
function you can now return the value forflag
Thank you Andre, but the field flag gonna save in database right?, and could we have another solution like return context or domain...?
Nice suggestion :)
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati