Application integrated with the Odoo ERP initially developed to facilitate event management for the Les Grains de Sel cooperative supermarket.
git clone https://github.com/alexandrelam/lesgrainsdesel
lesgrainsdesel
en un autre nom ! (Odoo ne fonctionne pas lorsque le dossier s'appelle lesgrainsdesel
)docker-compose up
python3 manage.py migrate
python3 manage.py initadmin
this commands create a superuser with the user and password set as admin
http://localhost:8000/admin/
)adherent
(note: images field are not required thanks to default values)http://localhost:8000/login
(email=username of createsuperuser || password is password of createsuperuser)http://localhost:8000
http://localhost:8069
admin
as the login and password, you need to install the following apps in the following order : coop-shift then coop-membershipgit config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "MY_NAME@example.com"
python
and pip
in your console/terminal.django
directory using cd django
.pip install -r requirements.txt
git clone https://gitlab.com/lgds/foodcoops
docker-compose up
pour démarrer le conteneur de l'application.django
.python manage.py runserver
Once the foodcoop container is launched, go to http: //127.0.0.1: 8069
Email: admin
Password: admin
From there, install the coop-account and coop-shift apps.
After following these steps, you will be able to access the database with python using odoo.py
.
Creation of a first level of abstraction with the Odoo class.
from odoo import Odoo
odoo = Odoo()
# connect() permet de set les endpoints common et
# object ainsi que d'obtenir le uid
odoo.connect()
# exemple : on cherche l'evenement avec un id de 2
# et on affiche que la propriete name et
# l organisateur de l evenement
# Ne pas oublier de rajouter au moins 2 evenements
print(odoo.searchRead("event.event", [["id", "=", 2]], ["name", "organizer_id"]))
odoo.py
dans une autre app django