www.numberspeaks.com

BLOG

Import xlsx file Odoo 11 – Sales orders

I will describe the basis in python to import xlsx file and how to handle the imported data, in this exemple sales orders is imported. Uploaded file is stored in the variable upload_file and is encoded in base 64, to read it we have to decode first the data by using b64decode function, then save it, for me i chose “/tmp” folder. Result import_data is an array of dictionary as follow [{‘column_name_1’:data_column_1_row_1, ‘column_name_2’:data_column_2_row_1,…},{‘column_name_1’:data_column_1_row_2, ‘column_name_2’:data_column_2_row_2,…},…] Bellow XML view for the importation module.

Protect Odoo 11 database backup with a password

Database auto-backup backup process crashes with a database size > 200 MB and Odoo worker enabled. The module “Database auto-backup” will help you to backup Odoo database on your local disk or remotely on a FTP server through ftp our sftp protocol, however it doesn’t give us the possibility to secure a bit more the backup file generated, therefore I added 2 additional options (Enable password and password) to be able to protect by a password the compressed file by using directly Linux 7z command line and recompressing a 2nd time the file, we should use dump file instead of …

Remote Mac computer from iPhone

CM – Remote Mac computers remote controller for macOS 13 Ventura and newer Control your Mac effortlessly from iPhone and iPad ApplicationsLaunch, exit and maximize program. SystemAdjust the volume, lock, put your Mac to sleep, restart from iPhone, iPad Installation of the macOS Agent is necessary. You can find the link below. CM – Remote works exclusively when both Mac and iOS devices are connected to the same network. Download Mobile App Mac computer Agent: CM Agent Latest version: 1.31 Designed to work with macOS version 13 Ventura and newer. Latest version: 1.31 macOS agent archive1.2 – Download1.3 – Download1.31 – Download

Linux

Odoo 9 Linux bash backup script

Bash backup odoo script is available on GitHub for Odoo 8 and 11. This bash script will help you to backup Odoo database, set a password on the backup file and remove files older than 7 days. You’ll need curl and 7zip linux package to make it work. This example is backing up od11-01 and od11-02 databases. It’s not really optimized with the double compression. BACKUP_DIR=/opt/backup ODOO_DATABASES="od11-01 od11-02" ADMIN_PASSWORD="ODOO_DATABASE_MANAGER_PASSORD" FILE_PASSWORD="ZIP_FILE_PASSWORD" TIMESTAMP=`date +%Y-%m-%d_%H-%M-%S` for DB in ${ODOO_DATABASES} do # create a backup curl -X POST \ -F "master_pwd=${ADMIN_PASSWORD}" \ -F "name=${DB}" \ -F "backup_format=zip" \ -o ${BACKUP_DIR}/${DB}/${DB}.${TIMESTAMP}.zip \ http://localhost:8069/web/database/backup 7z a …

Odoo 11 community SO PO iOS approval

 Simple app to approve Odoo SO, PO from your iPhone / iPad, it has been tested only on Odoo Community 11, but it should work with newer version also. It requires an additional module on Odoo available on Github (link bellow). Odoo – NS module will add “Waiting for confirmation” Status on sale.order and purchase.order model.You will be able to customize the module and add any document that needs approval (like Invoices, payment confirmation, etc…)Long press on document from Odoo – NS iOS app will display PDF.If you have any question, you can contact me here:https://www.numberspeaks.com/contact/ 

Mssql differential restoration error

After trying to restore differential backup after a full backup, i got this error message : The log or differential backup cannot be restored because no files are ready to roll forward. To be able to complete differential restoration, full backup needs to be restored with “WITH NORECOVERY” option as follow: RESTORE DATABASE numberspeaks FROM DISK = ‘D:\numberspeaks-full.bak’ WITH NORECOVERY RESTORE DATABASE numberspeaks FROM DISK = ‘D:\numberspeaks-diff.bak’ WITH RECOVERY