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

[SOLVED] Error to generate a qweb-pdf (odoo 8)

Subscriure's

Get notified when there's activity on this post

This question has been flagged
pdfqwebreportswkhtmltopdfodoo8.0
1 Respondre
14035 Vistes
Avatar
dlsuarez

Hello, 

My report is located in a wizard view (my_module/wizards/stats_view.xml):

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <report
            id="crm_ticket_platforms_report_crm_stats"
            model="stats"
            string="Stats"
            name="crm_ticket_platforms.crm_stats"
            file="crm_ticket_platforms.crm_stats"
            report_type="qweb-pdf"
        />
        ...
        ...

And I have inside of 'reports' folder the next code:

my_module/report/crm_stats.py

from openerp import api, models

class CrmStatsReport(models.AbstractModel):
    _name = 'report.crm_ticket_platforms.crm_stats'

    @api.multi
    def render_html(self, data=None):
        report_obj = self.env['report']
        report = report_obj._get_report_from_name(
            'crm_ticket_platforms.crm_stats')
        docargs = {
            'doc_ids': self._ids,
            'doc_model': report.model,
            'docs': self,
        }
        return report_obj.render('crm_ticket_platforms.crm_stats', docargs)

my_module/report/crm_stats.xml

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        <template id="crm_stats">
            <t t-call="report.html_container">
                <t t-foreach="docs" t-as="o">
                    <t t-call="report.external_layout">
                        <div class="page">
                            <h2>Stats</h2>
                        </div>
                    </t>
                </t>
            </t>
        </template>
    </data>
</openerp>

It doesn't generate errors in my module, but show this errors:

File "/opt/odoo/odoo_8_devel/code/linked-addons/report/models/report.py", line 442, in _run_wkhtmltopdf
    wkhtmltopdf = [_get_wkhtmltopdf_bin()] + command_args + local_command_args
File "/opt/odoo/odoo_8_devel/code/linked-addons/report/models/report.py", line 54, in _get_wkhtmltopdf_bin
    raise IOError
IOError

My version of wkhtmltopdf is 0.12.2.1

I need to fix this, thanks!

 

 

1
Avatar
Descartar
Avatar
Zbik
Best Answer

Code where error is shown:

    wkhtmltopdf_bin = find_in_path('wkhtmltopdf')
    if wkhtmltopdf_bin is None:
        raise IOError

from this it follows that the system can not find the path to wkhtmltopdf.

Probably problem with wkhtmltopdf. To solve wkhtmltopdf issue try this:

  • sudo wget http://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb 
  • sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
  • sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
  • sudo cp /usr/local/bin/wkhtmltoimage /usr/bin
  • restart server.

Hope this help.

3
Avatar
Descartar
dirtyHandsPHP

Above link is not working. Please use as follow: http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

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
How to create div in QWeb that is always at the bottom of the page? Solved
qweb reports odoo8.0
Avatar
Avatar
Avatar
Avatar
Avatar
14
de maig 22
48627
Qweb external link is OK in HTML but KO in PDF
pdf qweb wkhtmltopdf
Avatar
Avatar
1
de set. 19
8562
Background image gets cut off on the last page of a QWeb report (Odoo8) Solved
qweb reports odoo8.0
Avatar
1
de febr. 24
6182
how to fix you need Wkhtmltopdf error?
pdf reports wkhtmltopdf odoo17
Avatar
0
d’ag. 24
3574
Custom Qweb report works in html but not in PDF Solved
qweb reports wkhtmltopdf odoo12
Avatar
1
de des. 23
8027
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