Skip to content
Snippets Groups Projects
user avatar
François Kawala authored
f20d712c
History

fusion.py

Script pour la première mise-à-jour des données odoo à partir du fichier biopartner.

Workflow:

  • exécuter le script.
  • valider que les mises à jour sont cohérentes.
  • valider l'application des mises à jour proposées.

Pré-requis

Python 3 doit être installé sur la machine.

Installation

Exécution

Ouvrir une fenêtre de terminal

user@computer:~$ cd emplacement/du/script
source venv/bin/activate
python -m biopartner_to_odoo \
       --path "./input/biopartner_debug.xlsx" \
       --url=http://localhost:8069 \
       --db=v12 \
       --user=mon@mail.ch \
       --seller="Wood Corner"

Exemple d'exécution

python -m biopartner_to_odoo --path "./biopartner_debug.xlsx" --log--url=http://localhost:8069 --db=v12 --user=me@me.ch --seller="Wood Corner"
Enter your odoo password:

There is 1 product to update, among them 1 has change in price, min quantity, product name, validity date, or tax.

Showing all products with change in price, min quantity, product name, validity date, or tax. Products are sorted from highest price change to lowest price change.     
=========================================================================================================================================================================
Price change   +0.00 for <Product: 'Storage Box'                       sell price =   12.97 barcode = 1337           internal reference = '078005' with 1 supplier lines>

Show 5 more price change ? (y/N) y
Do you confirm the import of 1 product(s) ? (y/N) y