In my odoo app I want to execute a python script on a button click and I want it to run in background.I tried using subprocess library but it only runs in the foreground.
result = subprocess.run(["python3", "/path-to-script/script.py"], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False)
Is there any way to execute a python script from odoo in the background.

