Custom Odoo module providing Turkish-localized, branded invoice and proforma templates.
Problem Statement
Standard Odoo invoice/proforma templates don’t meet Turkish business requirements:
Business Challenges:
- No Turkish VAT Formatting: Standard templates show “TR” prefix in VAT numbers (e.g., “TR1234567890” instead of “1234567890”)
- Generic Layout: Default templates lack professional company branding and specific footer requirements
- No Expiration Display: Proformas don’t show validity period in business-friendly format (“X Days”)
- Product Code Clutter: Internal product codes [CODE] appear in customer-facing documents
- Inflexible Pricing Display: Can’t handle both small decimals (<1) and standard pricing appropriately
- Missing Payment Infrastructure: No Turkish bank account details on documents
- No Default Terms: Must manually add Turkish payment terms to every document
- Address Complexity: Need shipping address on proformas, billing on invoices
- Unprofessional Appearance: Standard templates don’t match corporate identity requirements
Technical Gaps:
- No computed field for document validity duration
- No HTML note handling with content validation
- Limited customization without code duplication
Solution Overview
This module provides a complete replacement for invoice/proforma templates with Turkish localization and business-specific customizations.
Core Solutions:
1. Turkish Localization
- Auto-strips “TR” prefix from VAT numbers
- Turkish date format (DD.MM.YYYY)
- Default Turkish payment terms in HTML
- Local bank integration (Kuveyt Türk, Vakıflar Bankası)
2. Professional Branding
- Custom header: Company name (21px) + logo (180x90px)
- Footer: Page numbers | Website | Tax Number
- Black-themed table headers
- Consistent 12px font sizing
3. Smart Document Features
- Expiration Calculator: Shows “15 Days” instead of raw dates
- Product Name Cleaning: Auto-removes [INTERNAL-CODE] from display
- Dynamic Pricing: 6 decimals for prices <1, 2 decimals for standard prices
- Content-Aware Notes: Only displays notes section if actual content exists
4. Business Requirements
- Bank Details: 6 pre-configured accounts (TL/USD/EUR for 2 banks)
- Dual Address Logic: Shipping address on proformas, billing on invoices
- Tax Transparency: Separate lines for Untaxed Amount, VAT, Total
- Payment Terms: Pre-filled Turkish business conditions
How It Works
For Proforma Invoices (Sale Orders):
- User clicks “Print > Proforma Invoice” on sale order
- Template executes:
- Calculates expiration days
- Strips “TR” from customer VAT
- Cleans product names (removes [CODES])
- Formats prices based on value
- Checks if notes have content
- Adds bank details
- Generates branded PDF with shipping address
Configuration & Customization
Making Bank Details Dynamic
Usage
Proforma Invoice:
- Sales > Orders > Select order
- Print > Proforma Invoice
Invoice:
- Invoicing > Customer Invoices > Select invoice
- Print > Invoice
Future Enhancements
- Dynamic bank account loading from
company.bank_ids - Multi-language support (Turkish/English toggle)
- Configurable logo dimensions
- Digital signature field
- Email template integration