Is it possible to show the 'year' in date field as drop down like selection or many2one in openerp? . I have a situation that, i need to choose the year only from date field as a drop down.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
1
Responder
15262
Vistas
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse
i have the problem same with u, and i use your code 'tahun': fields.selection([(num, str(num)) for num in range(1900, (datetime.now().year)+1 )], 'Year'), error undefined datetime and now and i have use code import datetime...but its doesnt work..
Susi, try this
at the top of py file
from datetime import datetime, timedelta
it works for me