www.numberspeaks.com

BLOG

Odoo – Filling many2many fields

Bellow code will help to manage many2many fields from model class. (0, 0, { values }) link to a new record that needs to be created with the given values dictionary (1, ID, { values }) update the linked record with id = ID (write values on it) (2, ID) remove and delete the linked record with id = ID (calls unlink on ID, that will delete the object completely, and the link to it as well) (3, ID) cut the link to the linked record with id = ID (delete the relationship between the two objects but does not …

How to search string in files Linux

Use this command bellow to find a pattern in the arborescence. https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux

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.

Stealthy tunnel with stunnel, OpenVPN on Mac OS and Debian

OpenVPN is more and less banned in some countries, therefore to be able to use it there, we need to make it stealthy by installing a 3rd party software like Tor, SSH Tunnel or Stunnel which hides openVPN traffic from governmental firewall detection. The principle is quite simple, we create a tunnel between our computer and the openVPN server which is encrypted by a certificate, then we send our openVPN traffic through this tunnel. Debian 8 stunnel server installation First OpenVPN should be configured to use TCP instead of UDP, on this example we open port number 1000 and redirect …

Artisan mousepad

Artisan is a Japanese brand that specializes in creating high-quality artisan mousepads. These mousepads are made using premium materials, such as silica gel and cloth, and are known for their smooth and consistent surface that provides an excellent tracking experience for gaming mice. What sets Artisan mousepads apart from other brands is their focus on both form and function. These mousepads are not just functional, but also have a unique and attractive design that adds to the overall aesthetic of a computer setup. They come in a variety of sizes, shapes, and colors, so there is something for everyone.Another notable …

Hacking : man-in-the-middle attack

Interesting video (in French) explaining man-in-the-middle attack. for more information concerning the attack, click here Tools used during this demo. Nmap : network scanner. Ettercap : man in the middle utility. Wireshark : network packet reader. Metasploit : hacking framework. This video and all information from this post are only for educative purpose, it’s totally illegal to use it in public or corporate network.