When opening the weight screen in PoS it can take up to 10 seconds
until the weighting starts. This can be resolved by using a
Threading.Event instead to reset the 10 second sleep time.
Using exit_flag.wait(timeout=DELAY) will be more responsive, because
you'll break out of the while loop instantly when exit_flag is set. With
time.sleep(timeout=DELAY), even after the event is set, you're going to wait around in
the time.sleep call until you've slept for DELAY seconds.
closesodoo/odoo#32389
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>