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 October 1, 2025 06:57
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

i.) Update & Upgrade Ubuntu Packages
sudo apt update
sudo apt upgrade
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11 python3.11-dev python3.11-venv
ii.) Install python dependencies and create new user
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 November 3, 2025 16:53
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,