I need to hide/unhide columns in a table base on some conditions. For example after a dialog window, in which user selects which columns to diplay, the table is opend with a selected columns. Is that Technically possible in OpenERP?
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
As alternative to John Does answer, you can try to use invisible attribute.
In the column selection view add a context that contains a boolean variable for each (un)selected field. In the tree view add all columns and set the invisible attribute according to the context.
e.g.:
<field name="column1" invisible="context.get('column1_invisible',True)"/>
<field name="column2" invisible="context.get('column2_invisible',True)"/>
. . .
Regards.
Yes, it is possible but not through XML file. You can dynamically create any view by inheriting fields_view_get method of the ORM. A good example is actually how account.move.line's view is dynamically generated based on a user configurable set-up (view_id of the related account.journal) in OpenERP 6.x. It has been deprecated in 7.0 but the concept of generating view dynamically does not change that much.
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