Skip to content

Instantly share code, notes, and snippets.

View Sinnnnak's full-sized avatar

Mohamed Elmojtaba Sinnnnak

View GitHub Profile
@Sinnnnak
Sinnnnak / Odoo 18 Installation.md
Last active September 4, 2025 08:33
Odoo 18 Installation

Odoo 18 Installation Guide

i.) Update & Upgrade Ubuntu Packages

sudo apt update
sudo apt upgrade

iii.) Install Python Dependencies and Create New User

ii.) Update & Upgrade Ubuntu Packages
sudo apt update
sudo apt upgrade
iii.) Install python dependencies and create new user
sudo apt install build-essential wget git python3.11-dev python3.11-venv libfreetype-dev libxml2-dev libzip-dev libsasl2-dev node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libopenjp2-7-dev libcap-dev
iv.) Create new system user for Odoo
/usr/sbin/adduser --system --shell /bin/bash --gecos 'Odoo' --group --home /opt/odoo odoo
Way 1. Disable Wayland in GDM3
To begin, you can disable Wayland in the GDM3 (GNOME Display Manager) custom configuration file.
Step 1. Open the terminal by pressing Ctrl + Alt + T.
Step 2. Type the following command to open the GDM3 configuration file in a text editor with administrative privileges:
sudo nano /etc/gdm3/custom.conf
Step 3. Locate the [daemon] section in the file and uncomment the line "WaylandEnable=false".
@Sinnnnak
Sinnnnak / uninstall_from_terminal.md
Created December 3, 2024 17:04
Uninstall modules from terminal

To uninstall modules from an Odoo database using the terminal, you can use the Odoo shell or execute SQL commands directly. Here's how to do it:


Method 1: Using Odoo Shell

  1. Launch the Odoo shell:
    ./odoo-bin shell -d <your_database_name>
@Sinnnnak
Sinnnnak / odoo_wkhtmltopdf.md
Last active December 2, 2024 13:52
Fix Wkhtmltopdf Issues in Odoo PDF Reports on Ubuntu 22.04

Fixing Missing Headers, Footers, and Logos in Odoo PDF Reports on Ubuntu 22.04

Problem Description

While generating PDF reports in Odoo on Ubuntu 22.04, you might face issues such as:

  • Missing or incomplete headers and footers
  • Logos not appearing in reports
  • Mixed content rendering errors

This problem often stems from the wkhtmltopdf version (wkhtmltox_0.12.6-1) installed on your system, which lacks the required Qt patching to handle these features properly. This version is known to cause compatibility issues on Ubuntu 22.04.

@Sinnnnak
Sinnnnak / __manifest__.py
Last active August 21, 2024 14:30
Customized Totals Footer in Odoo Forms
# Include the following in the manifest file
'assets':{
'web.assets_backend': ['module_name/static/src/css/style.css']
},
@Sinnnnak
Sinnnnak / qr_generator.py
Created August 21, 2024 14:11
Qr Code Generator
import qrcode
from PIL import Image
# The URL you want the QR code to open
url = 'https://el-mojtaba.com/daily-verse'
# Create a QR code instance with custom settings
qr = qrcode.QRCode(
version=1,