İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

QWeb reports: how to properly show html fields edited through website builder?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
website_builderqweb-reportodoo12.0
3 Cevaplar
19715 Görünümler
Avatar
faOtools

Hello,

the goal is to generate a pdf with complex raw html data:

  • Model has a simple not-sanitized html field

  • That field might be edited by user through the Odoo website editor. In such a way its content might be complex and might have bootstrap classes such as 'col-lg-6', etc.

  • The pdf is generated using QWeb templates.

As a result, when printed not full content of containers is reflected in pdf. In particular, some columns are outside the page (not visible). For example, if to add the snippet '3 columns' or 'image + text column', only the first column is printed.

The question is what is a safe method to reflect the most content of html field in QWeb template.

Already tried:

  • t-esc, t-raw, t-field

  • wrapping in containers and in different html tags

  • provide css styles, including assigning different 'display' param

  • t-set full_width, even landscape page format

Please find a sample of source code below.

Field declaration

    description =fields.Html(string="Description", sanitize=False)

Reports

    <template id="report_item_document">
        <t t-call="web.external_layout">
            <div class="page">
                <div class="oe_structure"/>
                <h2><span t-field="doc.name"/></h2>
                <div>
                    <t t-raw="doc.description"/>
                </div>
                <div class="oe_structure"/>
            </div>
        </t>
    </template>

    <template id="report_item">
        <t t-call="web.html_container">
            <t t-foreach="docs" t-as="doc">
                <t t-call="my_module.report_item_document"/>
            </t>
        </t>
    </template>

2
Avatar
Vazgeç
Sehrish

Odoo Customization Tips: https://learnopenerp.tumblr.com/

faOtools
Üretici

Hi, Sehrish. I do not need to learn Odoo, I do need to print pdf with website edited html. Search by 'qweb' returns only very standard questions which are of no use for me

Avatar
faOtools
Üretici En İyi Yanıt

For those who faced a similar issue: what we have revealed:

The only viable way seems to redefine all styles used in website in qweb to fit the page or/and replace classes before printing. This taks is a sort of drastic job since assumes a lot of experimenting and coding. Moreover, some styles are just difficult to show in a printing version (e.g. video links, slider effects, etc.). Thus, this approach is not promising.

The better is to initially restrict users in using building blocks (snippets) to fit a printing version. Similar job is done in the mass_mailing module where all blocks are table-wrapped. Although it also implies quite much of coding to prepare a builder and snippets, it is much safer.

The last found way is to use browser printing version of a page. In that case a lot of excess elements are added, and there is a need to work with external to Odoo features.

0
Avatar
Vazgeç
Nikunj Dhameliya

Hi, I am facing similar type of issue, can you check it out, please? https://www.odoo.com/forum/help-1/question/how-to-apply-flex-style-to-report-163753

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

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Change the distance between table cells on qweb. How to do it? Çözüldü
qweb-report odoo12.0
Avatar
Avatar
2
Ara 19
18192
Can we embed self hosted video in the app of website builder?
video website_builder odoo12.0 odoo11.0
Avatar
Avatar
Avatar
4
Mar 20
5517
What mean theme.ir.ui.view ?
website_builder themes odoo12.0 v12
Avatar
Avatar
Avatar
Avatar
Avatar
5
Oca 20
8828
AssertionError while install Appoinment in website
website_builder
Avatar
Avatar
Avatar
2
Kas 25
343
Expected singleton: hr.emp.travel.location(62, 63)
odoo12.0
Avatar
Avatar
Avatar
2
Eki 25
2006
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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