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

CSS styling not completely working in QWeb Reports

Tilmeld

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

Dette spørgsmål er blevet anmeldt
qwebreporttemplatecssodoo8
3 Besvarelser
22902 Visninger
Avatar
Shawn Varghese

I am creating a custom QWeb report, but I find that when using t-field, not all CSS styling is reflected.

For e.g.

<div class="col-xs-8 text-right"
                             style="color:green;font:italic 14px lucida-console, sans-serif"
                             t-field="company.partner_id"
                             t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true }' />

The output is in 14px Lucida-Console text, but it is not italic nor green!

I tried including "style":"color:green;font:italic 14px lucida-console, sans-serif" inside t-field options, but there is no difference. How do I have to code to reflect all styling?

1
Avatar
Kassér
Avatar
Shawn Varghese
Forfatter Bedste svar

Thank you both for your inputs. But even after using !important, it didn't work. I did notice that if I remove t-field-options, then the formatting applies correctly. So I'm not sure what exactly is causing the problem. For now, I have resolved it by displaying each property separately instead of using the widget:

<div class="col-xs-8 text-right" style="font:15px lucida-console,sans-serif !important;" >
    <span style="color:grey !important;" t-field="company.partner_id" /><br/>
    <span style="color:grey !important;" t-field="company.partner_id.street" /><br/>
    <span style="color:grey !important;" t-field="company.partner_id.street2" /><br/>
    <span style="color:grey !important;" t-field="company.partner_id.city" /><br/>
    <span style="color:grey !important;" t-field="company.partner_id.country_id" /><br/>
</div>

This outputs the text with all the formatting, but not an elegant solution. I will update in case I do find an alternative.

2
Avatar
Kassér
Avatar
Abraham Anes
Bedste svar

Hello!

Try to put "!important" after them, like this:

<div class="col-xs-8 text-right"
                             style="color:green !important;font:italic 14px lucida-console, sans-serif !important;"
                             t-field="company.partner_id"
                             t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true }' />

0
Avatar
Kassér
Shawn Varghese
Forfatter

Thanks Abraham, but unfortunately, this does not seem to be working either. Do you have anything else in mind? Its becoming a major problem for me in creating reports.

Abraham Anes

I don't know what is wrong because I'm using this "

" and is working fine =/
Abraham Anes

"

"
Avatar
Paul Catinean
Bedste svar

!important after the css directive should work, also make sure you apply it on the actual tag you want changed not on the parent

Last but not least if you are dealing with invoices make sure the report does not have "Reload from attachment" ticked

Also go to: http://odoo-address:port/report/html/module.report_template_name/database_id and try editing the css directives there for easier debugging

 

 

0
Avatar
Kassér
Shawn Varghese
Forfatter

Thanks Paul, I've ensure that reload from attachment is unchecked but the problem persists. I'm using a workaround for now, as described in my answer. The URL that you gave sounds quite interesting. I was unable to make it work however. This is the link that I have constructed: http://0.0.0.0:8069/report/html/sv_sale_layout.report_saleorder_document_inherit/test Here 'sv_sale_layout' is the name of my module. 'report_saleorder_document_inherit' is the template name inside the xml and the database is 'test' . But nothing loads. In fact, it causes the server to crash, so its definitely doing something, but I guess I haven't constructed the URL correctly. Could you please tell me what the correction should be? Thanks again !

Paul Catinean

I have forgot to mention that you also should have the website module installed in order to use the html editor in this case.Check to see if it works then, and don't forget to use the database id at the end, here is a example of URL for standard reports: http://localhost:8069/report/html/stock.report_picking/10

Shawn Varghese
Forfatter

Yes, I got it to work now. Thanks!

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
Odoo 12, Css not applied to qweb reports Løst
qweb report css
Avatar
Avatar
3
jan. 20
7616
How To group by 2 fields in qweb report (product_gamme , product_id )?
qweb report odoo8
Avatar
Avatar
2
jul. 19
7294
How to put a fixed header and footer in a report in odoo 17?
qweb report template odoo 17
Avatar
Avatar
Avatar
Avatar
3
sep. 25
8335
CSS Flexbox not working when create pdf report
pdf qweb report css
Avatar
Avatar
1
feb. 23
13183
How can i output a barcode without left and right margins on a odoo8 qweb report? Løst
qweb barcode report odoo8
Avatar
Avatar
Avatar
Avatar
Avatar
4
jan. 23
13050
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