Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Tbody data are not displaying in a generated report (pdf format)

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
qwebreportpython2.7tableqweb-report
1 Balas
3639 Tampilan
Avatar
Kinah Guinto

Hello,

I managed to display the theaders but the tbody isn't.

This is my xml:

<tbody>
 <t t-set="pickings" t-value="o.get_pickings(date_start, date_end)" />
  <t t-foreach="pickings" t-as="pick">
  <t t-set="line_items" t-value="o.get_line_items(pick)">
  <t t-foreach="line_items" t-as="line">
  <p>Hello, this is a test paragraph</p>
  <tr>
          <td><span t-esc="line.partner_id.name " /></td>
  <td><span t-esc="line.invoice.name" /></td>
  <td><span t-esc="line.product_name" /></td>
  <td><span t-esc="line.qty_done" /></td>
  </tr>
  </t>
  </t>
  </t>
 </tbody>


.py

 @api.multi
    def get_line_items(self, picking_id):
        line_items = picking_id.pack_operation_ids
        items = []
        for item in line_items:
            items.append({"product_name": item.product_id.name, "done_qty": item.qty_done, 
                          "si_number": " ".join([ invoice.name for invoice in picking_id.sale_id.invoice_ids]),
                          "partner_name": picking_id.partner_id.name })
        
        print(items)
        return items




result:
[{'partner_name': u'Happy', 'done_qty': 1.0, 'product_name': u'Noodles', 'si_number': ''}] [{'partner_name': u"Mimi", 'done_qty': 10.0, 'product_name': u'Rice', 'si_number': u'SI# 1121245'}] [{'partner_name': u"Mimi", 'done_qty': 10.0, 'product_name': u'Shampoo', 'si_number': u'SI# 1121246'}]
0
Avatar
Buang
Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Jawaban Terbai

Your code looks good except the for loop of the line which is inside the t-set and also the code inside the loop should handle the JSON data.

Try the following code:

    <t t-set="line_items" t-value="o.get_line_items(pick)"/>

<t t-foreach="line_items" t-as="line">
<p>Hello, this is a test paragraph</p>
<tr>
<td><span t-esc="line.get('partner_name')" /></td>
<td><span t-esc="line.get('si_number')" /></td>
<td><span t-esc="line.get('product_name')" /></td>
<td><span t-esc="line.get('done_qty')" /></td>
</tr>
</t>
3
Avatar
Buang
Kinah Guinto
Penulis

Thanks, it works.

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
QWEB - change values in tfoot
qweb report table tfoot
Avatar
Avatar
Avatar
3
Okt 19
5735
How change odoo standard qweb reports in order to get first table row always on first pages, even if long product descriptions?
qweb report css table
Avatar
0
Okt 24
4805
QWebException: unexpected EOF while parsing (, line 1)
qweb voucher report qweb-report
Avatar
1
Mar 16
13028
Repeat Header On Every Page In Report Diselesaikan
qweb reporting report reports table
Avatar
Avatar
1
Mei 24
14193
Report page / header height Diselesaikan
qweb report sale.order qweb-report v12
Avatar
Avatar
2
Sep 20
7105
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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