www.numberspeaks.com

BLOG

How to get data from URL with a controller in Odoo 9

Create under your module a folder controller, in that folder create files controller.py and __init__.py and link your new file in __init__.py, don’t forget to add controller folder in the __init__.py at the root folder of your module. controller.py code bellow will make available the URL www.myodoo.com/page/random/random_variable, random_variable value will be stored in values dictionary on key variable. in folder view of your module create the file template.xml

Odoo dashboard mobile

Odoo dashboard is a simple app that displays predefined widgets set on Odoo server, this app requires an additional module available on Odoo store. – Create, rename, delete, reorder and reload dashboards.– Add, remove, reorder and reload widgets from dashboard.– Fast loading, data is retrieved by the server and cached. Odoo Dashboard Widgets – WidgetXVsY: displays 2 numbers, difference and variation is calculated.– WidgetLastX: it could be used to displays x last months orders / invoices, etc…– WidgetSingleX: displays a relevant numbers Odoo server module Odoo dashboard Remote database access Connect to remote databases (MSSQL, local postgreSQL, MySQL not implemented yet) …

Start stunnel on Mac OS X Sierra startup

This file will start automatically sTunnel daemon on your Mac Os Sierra computer. sudo vi /Library/LaunchDaemons/macports.stunnel.plist for more information concerning sTunnel, OpenVPN setup please read this post: Make OpenVPN stealthy with stunnel on Mac OS and Debian

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.

Problem with Godaddy VPS upgrade

I recently had a problem with Godaddy ubuntu 16.04 VPS, after updating and upgrading the system: SSH port wasn’t anymore reachable, 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 the 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 Godaddy, Do not upgrade …