RTL Layout Problems in Odoo
Odoo supports RTL (right-to-left) languages like Arabic, Hebrew, Persian, and Urdu. However, custom modules, third-party themes, and PDF reports often break RTL layout. Here are the most common issues and fixes.
Enable RTL Language
# Install RTL language:
# Settings → Translations → Languages
# Activate: Arabic / Hebrew / Persian / Urdu
# Odoo automatically:
# - Switches CSS to RTL mode
# - Mirrors layout (sidebar right, content left)
# - Reverses flex/grid directions
# - Adjusts text alignment
# Check RTL is active:
# HTML tag should have dir="rtl" attribute
# Body should have class "o_rtl"CSS Not Mirroring
# Problem: Custom CSS uses fixed left/right
# Bad (breaks RTL):
.my-panel {
margin-left: 20px;
padding-right: 10px;
float: left;
text-align: left;
}
# Fix: Use logical properties (CSS4):
.my-panel {
margin-inline-start: 20px;
padding-inline-end: 10px;
float: inline-start;
text-align: start;
}
# Or use Odoo's RTL-aware classes:
# .ms-3 (margin-start) instead of .ml-3
# .me-3 (margin-end) instead of .mr-3
# .ps-3 (padding-start) instead of .pl-3
# .pe-3 (padding-end) instead of .pr-3
# .text-start instead of .text-left
# .text-end instead of .text-rightMixed LTR/RTL Content
# Problem: English text in Arabic interface
# or Arabic text in English interface
# Fix: Use dir attribute on mixed content:
نص عربي
English product code: ABC-123
# In Odoo QWeb templates:
# Unicode bidirectional marks:
# Use (left-to-right mark) before numbers in RTL
# Use (right-to-left mark) before Arabic in LTR
# Helps with number/text boundary renderingPDF Reports RTL
# Problem: PDF reports render LTR even with Arabic
# Fix 1: wkhtmltopdf RTL support
# Ensure report template has dir="rtl" on root element:
# Fix 2: Force RTL in report CSS:
# Fix 3: Arabic font not rendering:
# Install Arabic-capable fonts on server:
sudo apt install fonts-arabeyes fonts-noto-core
# Restart Odoo after font installation
# Fix 4: Numbers appearing reversed:
# Use ltr span around numbers:
Kanban & List View RTL
# Problem: Kanban cards or list columns misaligned
# Fix for custom kanban templates:
# Fix for list view custom columns:
# Use text-end/text-start classes
# Avoid fixed pixel positioning
# Test with both RTL and LTR active
# Form view issues:
# Labels and fields should use Odoo's built-in
# layout system, not custom positioning
Website RTL
# Problem: Odoo Website theme breaks in RTL
# Fix 1: Check theme RTL support
# Many community themes lack RTL styles
# Use Odoo's default theme for best RTL support
# Fix 2: Override theme CSS for RTL:
# /static/src/css/rtl_fixes.css
html[dir="rtl"] .navbar {
flex-direction: row-reverse;
}
html[dir="rtl"] .hero-text {
text-align: right;
}
# Fix 3: Image mirroring:
# Some decorative images need flipping in RTL
html[dir="rtl"] .arrow-icon {
transform: scaleX(-1);
}
DeployMonkey
DeployMonkey supports RTL language deployments. The AI agent can help diagnose and fix RTL layout issues in your Odoo instance.