Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

Problem With Accents With a Custom PDF Report

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
pdf
1 Svar
2101 Visninger
Avatar
Daniel

Hi, im making a custom pdf report in Spanish, but when i create the pdf, it seem like is not in utf-8. It look like this.

Lenguajes de marcas y sistemas de gestión de información.

I been trying to find, what i can do but i dont find anything.
Here i leave the template.

<?xml version="1.0" encoding="UTF-8"?>

<odoo>

    <template id="report_matricula_document" t-name="gestor_de_matriculas.report_matricula_document">

        <t t-call="web.html_container">

            <t t-foreach="docs" t-as="o">

                <div class="page">

                    <style>

                        * {

                            font-family: DejaVu Sans, sans-serif;

                        }

                    </style>


                    <div class="header">

                        <table style="width:100%;">

                            <tr>

                                <td style="width:20%">

                                    <img t-att-src="'/web/image/res.company/' + str(o.env.user.company_id.id) + '/logo'"

                                         style="max-height:60px;"/>

                                </td>

                                <td style="width:80%; text-align:center">

                                    <h2>

                                        <span t-esc="o.env.user.company_id.name"/>

                                    </h2>

                                </td>

                            </tr>

                        </table>

                    </div>


                    <div class="titulo" style="margin-top:10px">

                        <h3>DATOS DE MATRÍCULA</h3>

                    </div>


                    <table class="table table-sm" style="width:100%; border-collapse: collapse;">

                        <tr>

                            <td><strong>Referencia:</strong></td>

                            <td><span t-esc="o.name"/></td>

                            <td><strong>Fecha:</strong></td>

                            <td><span t-esc="o.create_date and o.create_date.strftime('%d/%m/%Y') or ''"/></td>

                        </tr>

                        <tr>

                            <td><strong>Alumno:</strong></td>

                            <td><span t-esc="o.alumno.name + ' ' + o.alumno.lastName"/></td>

                            <td><strong>DNI/NIE:</strong></td>

                            <td><span t-esc="o.alumno.dni_nie"/></td>

                        </tr>

                        <tr>

                            <td><strong>Fecha Nac.:</strong></td>

                            <td><span t-esc="o.alumno.date_birth and o.alumno.date_birth.strftime('%d/%m/%Y') or ''"/></td>

                            <td><strong>Teléfono:</strong></td>

                            <td><span t-esc="o.alumno.phone"/></td>

                        </tr>

                        <tr>

                            <td><strong>Dirección:</strong></td>

                            <td colspan="3"><span t-esc="o.alumno.adress"/></td>

                        </tr>

                        <tr>

                            <td><strong>Email:</strong></td>

                            <td colspan="3"><span t-esc="o.alumno.email"/></td>

                        </tr>

                    </table>


                    <div class="titulo" style="margin-top:10px">

                        <h3>CURSO</h3>

                    </div>


                    <table class="table table-sm" style="width:100%; border-collapse: collapse;">

                        <tr>

                            <td><strong>Curso:</strong></td>

                            <td><span t-esc="o.curso_id.name"/></td>

                            <td><strong>ID Curso:</strong></td>

                            <td><span t-esc="o.curso_id.id_course"/></td>

                        </tr>

                        <tr>

                            <td><strong>Promoción:</strong></td>

                            <td><span t-esc="o.curso_id.promotion"/></td>

                            <td><strong>Estado Académico:</strong></td>

                            <td><span t-esc="dict(o._fields['state'].selection).get(o.state)"/></td>

                        </tr>

                    </table>


                    <div t-if="o.asignaturas_convalidadas_ids" style="margin-top:10px">

                        <div class="titulo">

                            <h3>ASIGNATURAS CONVALIDADAS</h3>

                        </div>

                        <table class="table table-sm" style="width:100%; border-collapse: collapse;">

                            <thead>

                                <tr style="background-color: #f0f0f0;">

                                    <th>Asignatura</th>

                                </tr>

                            </thead>

                            <tbody>

                                <tr t-foreach="o.asignaturas_convalidadas_ids" t-as="asig">

                                    <td><span t-esc="asig.name"/></td>

                                </tr>

                            </tbody>

                        </table>

                    </div>


                    <div class="footer" style="margin-top:30px; text-align:right;">

                        <p>______________________________</p>

                        <p>Firma del Colegio</p>

                    </div>

                </div>

            </t>

        </t>

    </template>

</odoo>





0
Avatar
Kassér
Avatar
Christoph Farnleitner
Bedste svar

In general: You really shouldn't write your views - or any source code for that matter - in a language other than English. Use a translation file to make it multi-lingual. See https://www.odoo.com/documentation/18.0/developer/howtos/translations.html

Since 'Lenguajes de marcas y sistemas de gestión de información' translates to 'Markup languages and information management systems.' I assume this is just a show case of what 'ó' becomes (=>'ó') and it's not related to the actual content of your report.

Therefore, about, for example, 'Dirección' supposedly being rendered as 'Dirección', replace 'ó' with '&oacute;' and perform a similar change to all special characters. A list of entities to be used as a replacement can be found for example in https://www.w3schools.com/CHARSETS/ref_utf_latin1_supplement.asp.

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Quote Builder With Custom Rental Report (Studio)
pdf
Avatar
0
okt. 25
624
Quote Builder With Custom Rental Report (Studio)
pdf
Avatar
0
okt. 25
4
How to edit the header of the quote template Løst
pdf
Avatar
Avatar
Avatar
2
aug. 25
1477
Customize Report problem Løst
pdf
Avatar
Avatar
Avatar
3
aug. 25
1778
How to Edit Out the Blank Space in the Quote/Order Confirmation PDFs? Løst
pdf
Avatar
Avatar
Avatar
Avatar
3
aug. 25
2885
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now