Writing date and time values

Since Odoo 12, date and time fields can be written using values in Python native data types, both using direct assignment and using write().

We can still write date and time using text-represented values:

>> demo = self.search([('login', '=', 'demo')])
>>> demo.login_date
False
>>> demo.login_date = '2018-01-01 09:00:00'
>>> demo.login_date
datetime.datetime(2018, 1, 1, 9, 0)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.193.148