The title say it all, I want to display a list of values provided by a return of a method, my objectif is to have a dynamic dropdown list by using the selection field, is that possible in v7 ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
Hi,
It is possible. According to the following ex. you can make the dynamic selection values.
Field as like below.
'extension': fields.selection(_extension_get, 'Document Type', required=True, size=4),
Function is as like below.
def _extension_get(self, cr, uid, context=None):
cr.execute('select code,name from document_directory_content_type where active')
res = cr.fetchall()
return res
Note : This is available on the document module.
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire