Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @api.depends('create_date')
- def _hora_boliviana(self):
- for record in self:
- hora_actual = (datetime.strptime(record.create_date,'%Y-%m-%d %H:%M:%S') - timedelta(hours = 4)).time().strftime('%H:%M:%S')
- record.hora_boliviana = hora_actual
- hora_boliviana = fields.Text(compute='_hora_boliviana', store=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement