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.
in on_change when you will pass a date it will be in string type. So you can perform all string operation on it directly. in other case if you get in datetime type simply convert it into string type by str(date) then you can perform string operation on it.
here you need to do this :
def on_change(self, cr, uid, ids, date):
time = date[10:]
enter your code here
Instead of hard-coding with date[10:].
You could get the hour-minute in various formats
## 12 hour format ##
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: 6/28/13, 6:04 PM|
|Seen: 5711 times|
|Last updated: 3/16/15, 8:10 AM|