www.numberspeaks.com

BLOG

windows logo

Kill remote desktop session

When getting this error message bellow: The terminal server has exceeded the maximum number of allowed connections. Your previous remote desktop session has been lost, to close it replace 192.168.1.1 by your server’s IP on the following command.

Problem with Godaddy VPS upgrade

I recently had a problem with Godaddy ubuntu 16.04 VPS, after updating and upgrading the system: SSH port is not anymore reachable which is tragic, it’s the only access we have to the server, however other services are working normally, so the system is still running. I tried many times to restart, call the support, but it didn’t solve my problem. The only solution was to destroy the server and rebuild it from scratch + restoration of backups. I’ve also tested the upgrade with a clean and freshly installed system, same issue occurred. If you’re running Ubuntu 16.04 VPS on …

Add menu in dropdown list on tree view – Odoo 9

To add an additional menu in action dropdown list on tree view, we need to register “ir.actions.server” and “ir.values” on the qweb/xml file as follow. Note that code field name is using old Odoo python API. In your sale order model create the method as bellow with Odoo new API. Restart odoo and upgrade your module, you’ll have now cancel menu on your sales order tree view.

Add xlsx support in scheduled outgoing email – Odoo 11

Download updated report_xlsx module Report_xlsx module adds xlsx report support to Odoo with xlsxwriter python library. However when trying to send an email with a xlsx report attached. I got this error message: “Unsupported report type xlsx found”. Mail module handles only PDF document as attachement, to add xlsx type support, we have to make some modification on report_xlsx module by inheriting mail.template model and overriding generate_email method, you’ll find the code bellow, customized report_xlsx module is downloadable above or by clicking on the link at the bottom of the page. Updated report_xlsx module for Odoo 11 community is available …

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 how to avoid loading the homepage after module upgrade

‚Äč Download on GitHub Download upgrade module Odoo 11 redirects the user to his homepage after a module upgrade, to avoid this trouble I made a small modification of the module upgrade behavior. Additional module is available here. It inherits only the model “ir.module.module” and override “_button_immediate_function” method.