Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
If You want to return only year from your datetime field then do like this:
from tools import DEFAULT_SERVER_DATETIME_FORMAT
year = datetime.datetime.strptime(your_date, DEFAULT_SERVER_DATETIME_FORMAT).strftime("%Y")
Thank You, Serpent Consulting Services Pvt. Ltd.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/15/13, 12:12 PM|
|Seen: 3467 times|
|Last updated: 3/16/15, 8:10 AM|