Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

How to change font size on PO/RFQ PDF so it fits correctly

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
pdfpurchase_orderemail_template
3 Réponses
19474 Vues
Avatar
Gary Foulds

I am trying to fix the font problem on emailed PS/RFQ pdf's but cannot locate where the css is stored for them as I am assuming that it is css driven.

I cannot upload an example of what I am seeing but it seems that all the text fonts are too large.

for example the shipto box only shows the last 3 lines of the address, the "your company" address is fine but obscures the Invoice address

The font size for the "Request for Quotation #PO0001" header is about 30pt which is far too large


I thought this might be a Centos 8 thing so spun up an Ubuntu 18.04 server using the deb file but its the same on that server as well

System used: 

Odoo 13

Centos 8

Ubuntu 18.04

Background: I have searched but can only find how to create a PO/RFQ from sales, how to create a RFQ/PO template but nothing on how to change the font size displayed in the resultant pdf.

any suggestions is appreciated

1
Avatar
Ignorer
Gary Foulds
Auteur

Have updated Ossi's suggested link with solution

Modify this file for purchase orders Technical -> Views -> report_purchaseorder_document Locate the section

Request for Quotation #

<h4 t-if="o.state in ['sent', 'to approve']">Purchase Order #<span t-field="o.name"/></h4>

<h4 t-if="o.state in ['purchase', 'done']">Purchase Order #<span t-field="o.name"/></h4>

<h4 t-if="o.state == 'cancel'">Cancelled Purchase Order #<span t-field="o.name"/></h4>

For RFQ modify views -> report_purchasequotation_document Request for Quotation

Note these header tags were h2's

Avatar
SHIVAM JAISWAL (shja)
Meilleure réponse

You can also use class="small" 

it will also reduce your font size, but if you want to customise font size according to your preferences
You should use style="font-size:16px;"

Thanks me later:) 

0
Avatar
Ignorer
Avatar
Ossi Mantylahti
Meilleure réponse

Here is a Quick and Dirty way of resolving the immediate problem.


From Settings -> General -> Business Documents -> Layout, we can see that the invoice / quote PDF is using external_layout_standard QView and Odoo admin can access the XML architecture of this report. However, editing this view as an Odoo admin does not allow access to CSS files where we would be able to modify the layout for good. We can, however, hack this a bit.

Follow the steps:

  1. Settings with Developer mode on -> Edit document layout under Business documents

  2. Look for section

<div class="col-6" name="company_address">
    <div t-field="company.partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}"/>
</div>

Add Style attribute (style="font-size:14px") for inner <div>:

<div class="col-6" name="company_address">
    <div t-field="company.partner_id" style="font-size:14px" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}"/>
</div>
  1. This changes the sender company address font size. We do still need to change the recipient address font size.
  2. Navigate to Settings -> Technical -> Views (under User interface)
  3. Search for address_layout
  4. Add same style attbute (style="font-size:14px") for section:
<div style="font-size:14px" name="address" t-att-class="colclass">
    <t t-raw="address"/>
</div>

The end result is not the prettiest layout in the world, but it works.

The right way is apparently to inherit 'account.report_invoice_document' and then change the template code. So this is not possible with only Odoo admin UI. It requires writing a small extension.

Stack Overflow has a thread covering the same topic:  https://stackoverflow.com/questions/61398717/odoo-how-to-edit-invoice-quote-layout-css

2
Avatar
Ignorer
Avatar
Giles M
Meilleure réponse

An alternative approach is to edit the Paper Format for the relevant formats, and change DPI from 90 to something like 110.  This is like a zoom effect, and makes the text a much more "normal" size.

0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Purchase order - without css (v14.0)
pdf purchase_order v14
Avatar
0
mars 21
2753
Email template for Adding Follower to Existing PO (v14) Résolu
purchase_order email_template v14
Avatar
Avatar
1
oct. 20
5047
add borders in the pdf generated
pdf invoices purchase_order
Avatar
Avatar
1
mars 15
4820
Odoo V8 weird behaviour of Emails sent from Odoo
purchase_order emailing email_template odooV8
Avatar
4
janv. 17
3542
Quote Builder With Custom Rental Report (Studio)
pdf
Avatar
0
oct. 25
475
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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