Odoo Help


create timer (count down/ count up) on form view

on 11/21/16, 4:03 AM 715 views

I want to create timer in odoo view which support run/pause (using button ) something like Soccer match time , min:sec format

I tried below code but it generated an error

def timer_th(self):
    timer_thread = Thread(target=self.timer)    timer_thread.start()

def timer(self):
    while self.current_time <= self.duration:
        time.sleep(1)        self.current_time += 1

it gave me AttributeError: environments error
but when I used the code without thread it works but gui wasn't responsive

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/21/16, 4:03 AM
Seen: 715 times
Last updated: 11/21/16, 4:03 AM