Advertisement
Guest User

modificado3

a guest
Jun 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1.     @api.depends('create_date')
  2.     def _hora_boliviana(self):
  3.         for record in self:
  4.             hora_actual = (datetime.strptime(record.create_date,'%Y-%m-%d %H:%M:%S') - timedelta(hours = 4)).time().strftime('%H:%M:%S')
  5.             record.hora_boliviana = hora_actual
  6.  
  7. hora_boliviana = fields.Text(compute='_hora_boliviana', store=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement