www.numberspeaks.com

BLOG

GMMK Pro – The Ultimate Modular Mechanical Keyboard

In today’s world, a keyboard is much more than just an input device. It’s an extension of your personality and an essential tool that helps you perform your daily tasks. With the Glorious GMMK Pro, you can take your typing experience to the next level. This keyboard is designed for gamers and professionals who want to get the best out of their typing and gaming sessions. In this article, we’ll take a closer look at the features that make the Glorious GMMK Pro a must-have for anyone who takes their typing and gaming seriously. Modular DesignThe Glorious GMMK Pro is …

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 …

Fail2ban Odoo 9 Authentication

Odoo 9 community doesn’t come with autoban security. Fail2ban is an alternative to secure Odoo authentication. For more information concerning fail2ban click here Let’s start with creating a new filter: vi /etc/fail2ban/filter.d/odoo.conf Paste the content from bellow code: [INCLUDES] # Read common prefixes. If any customizations available — read them from # common.local before = common.conf [Definition] failregex = INFO:openerp.addons.base.res.res_users:Login failed for db:.* login:.*\n.*INFO:werkzeug: – – \[.*\] \"POST /web/login .*\" 200 – – \[.*\] \"POST /web/database/(drop|duplicate|create) HTTP/2.0\" ignoreregex = journalmatch = _SYSTEMD_UNIT=odoo.service + _COMM=odoo [Init] maxlines = 2 Add those line in jail.local [odoo] enabled = true port = 443,80,8069 …

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. import babel import base64 import copy import datetime import …

Fail2ban doesn’t ban but regex works

One of my Debian server with fail2ban has a problem to ban ip from brute force attack, however testing logs with fail2ban-regex worked perfectly. My solution has been found through this page. The cause of my issue was related to the timezone of the system. To solve this problem, i used the command bellow to reconfigure timezone and then fail2ban started to ban as usual. sudo dpkg-reconfigure tzdata