Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

How to include my client's phone in the information that is printed in the pdf of a quote / order ?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
pdfsale.order
2 Respostes
8774 Vistes
Avatar
Ernesto Ponce Martinez

When I generate a sale I usually print a document so that the driver has a reference of the address, we still file orders in physical form and I need the information that is printed to include my client's contact number. How do I include it in the pdf report?

0
Avatar
Descartar
Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

Hi,

To display the customers phone number in the sale order PDF report, either you can do it by inheriting the existing report and add the phone number or you can do it by editing the existing template from the user interface. The first one will be recommended.

To do it by inheriting as a custom module, for inheriting an existing report, you can check this documentation : Inheriting and modifying QWeb reports

In your case your inherited code will be like this:



<template id="report_saleorder_document_inherit_phone_number" inherit_id="sale.report_saleorder_document">

<xpath expr="//div[@name='payment_term']" position="after">

<div class="col-3" t-if="doc.partner_id.phone">

<strong>Customer Phone:</strong>

<p t-esc="doc.partner_id.phone"/>

</div>

</xpath>

</template>


The above code will add the customers phone number after the Payment terms in the report, in the Xpath in the above code you can see that the position given for the phone number is after the payment terms. You can change it as per the need. You can create a custom module and add the above code.


For doing the same from the user interface activate the developer mode and navigate to Settings -> Technical -> Reporting -> Reports , then search for the report of the sale order, open it and click the Qweb View smart button in the top right of the form, here you will see the record of the corresponding report as well as its inherited reports. Now you can open the document named report_saleorder_document and add the below line to the Architecture page at the needed position.


<div class="col-3" t-if="doc.partner_id.phone">

<strong>Customer Phone:</strong>

<p t-esc="doc.partner_id.phone"/>

</div>


This will display the phone number recorded inside the Customer form in the Phone field.


Thanks

1
Avatar
Descartar
Avatar
Ernesto Ponce Martinez
Autor Best Answer

Thank you very much for your help, it worked perfectly, although I was a bit afraid to move parameters from the developer mode, the explanation was incredibly accurate, thank you.

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

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

Registrar-se
Related Posts Respostes Vistes Activitat
Generate PDF report (for sale orders/quots, Purchase Orders, Invoices) and save it in specified folder from Python code?
pdf sale.order
Avatar
0
d’ag. 17
5232
Quote Builder With Custom Rental Report (Studio)
pdf
Avatar
0
d’oct. 25
539
Quote Builder With Custom Rental Report (Studio)
pdf
Avatar
0
d’oct. 25
4
How to edit the header of the quote template Solved
pdf
Avatar
Avatar
Avatar
2
d’ag. 25
1333
Customize Report problem Solved
pdf
Avatar
Avatar
Avatar
3
d’ag. 25
1649
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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