A simple script to schedule or single execute to review if there is any task to do.
- Install requirements
pip install requirements.txt- Run the next command (this will create a configuration file), and you can type where you want to save it or leave it blank.
python -m odoo_task_tracker init- Set up your variables on the .json file created by init command
{
"user": "sample@odoo.com",
"password": "password",
"url": "https://www.url.com",
"db": "db",
"port": null,
"search_limit": 5,
"schedule_minutes": 90,
"search": [
]
}- Execute in bash(out of folder)
python -m odoo_task_tracker run- Override odoo_task.sh with your own path (Optional)
- Add to .zshrc or .bash and give it rights (Optional)
# odoo_task_tracker
alias odoo_task_tracker='/Users/nefonfo/odoo/task_tracker_project/odoo_task.sh'source ~/.zshsrcchmod +x /Users/nefonfo/odoo/task_tracker_project/odoo_task.sh-
user: your email
-
password: Odoo API Key
-
url: Link to odoo db
-
db: Name of the db
-
port: Number of port (optional)
-
search_limit: Limit of tasks to search and show
-
schedule_minutes: Time to execute the query to the db in minutes (BE CAREFUL DON'T SET A LOW NUMBER, THIS WILL CALL TO MUCH TIMES AND YOU CAN BE BANNED)
-
search: Structure for search (json array). The structure is the following:
- display_name: Name of the search (only to show in the table, you can put any string as you wish).
- domain: Domain of the task search (please add to the domain the project_id)
- disable_search (optional): if is set as true it will skip the search_read and only will count in that search
Example:
[ { "display_name": "Help", "domain": ["&", "&", "&", "&", "&", "&", "&", "&", "&", ["project_id", "=", 49], ["tag_ids", "not ilike", "perf"], ["tag_ids", "not ilike", "Internal"], ["tag_ids", "not ilike", "Apps"], ["tag_ids", "not ilike", "Administration"], ["tag_ids", "not ilike", "iap"], ["tag_ids", "not ilike", "tech_squad_infra"], ["tag_ids", "not ilike", "tech_squad_sh"], ["tag_ids", "not ilike", "special-ops"],"&",["user_ids", "=", false], ["stage_id", "ilike", "tech"],["tag_ids", "not ilike", "On-premise"]], "disable_search": true } ]