Python odoo.fields.Datetime() Examples

The following are 6 code examples of odoo.fields.Datetime(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module odoo.fields , or try the search function .
Example #1
Source File: library_book.py    From Odoo-12-Development-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def change_update_date(self):
        self.ensure_one()
        self.date_updated = fields.Datetime.now() 
Example #2
Source File: library_book.py    From Odoo-12-Development-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def change_update_date(self):
        self.ensure_one()
        self.date_updated = fields.Datetime.now() 
Example #3
Source File: library_book.py    From Odoo-12-Development-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def change_update_date(self):
        self.ensure_one()
        self.date_updated = fields.Datetime.now() 
Example #4
Source File: library_book.py    From Odoo-12-Development-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def change_update_date(self):
        self.ensure_one()
        self.date_updated = fields.Datetime.now() 
Example #5
Source File: library_book.py    From Odoo-12-Development-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def change_update_date(self):
        self.ensure_one()
        self.date_updated = fields.Datetime.now() 
Example #6
Source File: schedule.py    From -Odoo--- with GNU General Public License v3.0 5 votes vote down vote up
def _compute_day(self):
        for record in self:
            record.type = fields.Datetime.from_string(
                record.start_datetime).strftime("%A")