Skip to content

vshn/odootools

Folders and files

NameName
Last commit message
Last commit date
Nov 13, 2023
Nov 23, 2021
Nov 2, 2022
Dec 16, 2021
Jan 16, 2023
Jan 16, 2023
Nov 9, 2022
Oct 26, 2021
Oct 3, 2022
Nov 3, 2022
Nov 8, 2022
May 31, 2023
Oct 26, 2021
Nov 3, 2022
Oct 3, 2022
Dec 23, 2022
Nov 8, 2022
Dec 20, 2023
Dec 20, 2023
Nov 9, 2022
Feb 20, 2024
Feb 20, 2024
Jun 22, 2023
Feb 1, 2022
Nov 18, 2022

Repository files navigation

Build Go version Version GitHub downloads License

odootools

odootools is a small tool that allows you to calculate overtime based on your attendances. It has VSHN-specific business rules integrated that are otherwise calculated manually.

Simply login with your Odoo credentials, configure the report settings and generate your reports.

It's currently aimed at Odoo 8.

Development

Documentation

See some development notes in CONTRIBUTING.md and docs/

Run the tool

First, you need to export Odoo settings:

export ODOO_URL=https://...
export ODOO_DB=...

You can run the tool in different ways:

  1. using make run (uses go run).
  2. using make run.docker (uses docker run)
  3. using a configuration of your favorite IDE

Deploy to OpenShift

Setup the project and deploy user

ns=vshn-odoo-prod
nstest=vshn-odoo-test
sa=odootools-deployer

oc new-project $ns
oc new-project $nstest

oc -n $ns create sa $sa

# Allow the deployer user to manage deployments in test namespace
oc -n $ns     policy add-role-to-user admin -z $sa --rolebinding-name admin
oc -n $nstest policy add-role-to-user admin -z $sa --rolebinding-name admin
oc -n $nstest policy add-role-to-user system:image-pusher -z $sa
oc -n $nstest patch rolebinding admin --type='json' -p='[{"op": "replace", "path": "/subjects/1/namespace", "value":"'$ns'"}]'
oc -n $nstest patch rolebinding system:image-pusher --type='json' -p='[{"op": "replace", "path": "/subjects/0/namespace", "value":"'$ns'"}]'

# Get SA token
oc -n $ns sa get-token $sa

Once this is set up, you can use the token in the CD settings: https://github.com/vshn/odootools/settings/secrets/actions