www.numberspeaks.com

BLOG

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

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. POST HTML variables in this example is working for Odoo 9 version, for older or newer version of Odoo, those variables might be different. To get the right variables for your Odoo version, reach the database manager and get your field’s name from the code source of the …

Odoo 11 how to avoid loading the homepage after module upgrade

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.

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 …