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
    Supply Chain
    • 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
    • Discuss
    • Kecerdasan Buatan
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • 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
    • Manajemen Properti
    • 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
    • Konsultasi
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan
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

Batch Report using Report Parser?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
qwebreportparseraccount.voucher
2 Replies
6478 Tampilan
Avatar
Samantha Cruz

How can I do ths kind of report in QWEB? All the selected payments should be in one page only. Is there a way to do this?


PAGE 1

Transaction Date
Check Date
Bank
Check #

Customret

02/12/16
02/18/16
Bank1
0123
Cust1
02/16/16
02/29/16
Bank2
4561

Cust2

02/18/16
02/25/16
Bank3
7548Cust3

0
Avatar
Buang
Avatar
Axel Mendoza
Jawaban Terbai

Hi Samantha

Your error is due to this line:

'get_data': self._get_data(voucher), 

because you are getting the result of the _get_data method call and assign it to the localcontext dict. Change it to:

'get_data': self._get_data, 

And you will be ok. The localcontext is were you put some info available to the report and for function calls in the report you need to use the function object reference

1
Avatar
Buang
Avatar
Samantha Cruz
Penulis Jawaban Terbai

I can't edit my question.


This is my code (as of now) but it returns an error: 

QWebException: ""'account.voucher.pay.detail' object is not callable" while evaluating
'get_data(o)'" while evaluating


report_parser.py


from openerp import models
from openerp.report import report_sxw

class report_parser(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(pdc_report_parser, self).__init__(cr, uid, name, context=context)
active_ids = context.get('active_ids')
account_voucher = self.pool.get('account.voucher')
docs = account_voucher.browse(cr, uid, active_ids, context)

voucher = []
for voucher_id in active_ids:
voucher_id = account_voucher.browse(cr, uid, voucher_id, context)
voucher.append(voucher_id)

self.localcontext.update({
'docs': docs,
'get_data': self._get_data(voucher),
'hello_world': self._hello,
})

def _hello(self):
return "Hello World!"

#It returns all ids of the object 'account.voucher.pay.detail' based on voucher_ids that was selected
def _get_data(self, voucher_id):
print "voucher_id:", voucher_id
pay_details = []
account_voucher_pay_detail = self.pool['account.voucher.pay.detail']

for rec in voucher_id:

details = account_voucher_pay_detail.search(self.cr, self.uid,
[('voucher_id', '=', rec.id)])
if details:
pay_details = pay_details + details
 
pay_details = account_voucher_pay_detail.browse(self.cr, self.uid, pay_details)
return pay_details

class pdc_report_parser_test(models.AbstractModel):
_name = 'report.parser_module.report_test_document'
_inherit = 'report.abstract_report'
_template = 'parser_module.report_test_document'
_wrapped_report_class = report_parser


report_test_document.xml


<?xml version="1.0" encoding="utf-8"?>
<!--Custom report.-->
<openerp>
<data>
<template id="report_test_doc">
<t t-call="module_parser.my_layout">
<div class="page">
<table class="table table-condensed">
<thead>
<tr>
<th>Transaction Date</th>
<th>Check Date</th>
<th>Bank/Branch</th>
<th>Check No.</th>
<th>Amount</th>
<t t-if="o.partner_id.customer">
<th>Customer</th>
</t>
<t t-if="o.partner_id.supplier">
<th>Supplier</th>
</t>
</tr>
</thead>
 
<tr t-foreach="get_data(o)" t-as="pd">
<td>
<span t-field="o.date"/>
</td>
<td>
<span t-field="pd.date_due"/>
</td>
<td>
<span t-field="pd.name"/>
</td>
<td>
<span t-field="pd.check_no"/>
</td>
<td>
<span t-field="pd.amount"/>
</td>
<td>
<span t-field="o.partner_id.name"/>
</td>
</tr>
</table>
</div>
</t>
</template>
<template id="report_test_document">
<t t-call="report.html_container">
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'module_parser.report_test_doc')"/>
</t>
</t>
</template>
</data>
</openerp>


In the default, it can print all necessary information but per page (1 voucher, 1 page) not in one page only (all vouchers selected in one page)

0
Avatar
Buang
Alaa Ahmed

i have the same error have you found any solution ??

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
odoo 16 report target new page scss
qweb report
Avatar
Avatar
1
Apr 25
4664
Missing external identifier on new external layout template Diselesaikan
qweb report
Avatar
Avatar
2
Mar 25
5297
Translate month name in t-esc Qweb report Diselesaikan
qweb report
Avatar
Avatar
Avatar
Avatar
Avatar
4
Nov 24
10453
QWeb Report Shows Different When Edit And Print Review Diselesaikan
qweb report
Avatar
Avatar
1
Mar 24
5041
How display the currency symbol before the subtotal value on Quotation report? Diselesaikan
qweb report
Avatar
Avatar
Avatar
3
Sep 23
28140
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
  • Karir
  • 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah software terintegrasi dengan 70+ aplikasi seperti CRM, Akuntansi, Inventaris, Sales, eCommerce, Marketing, POS; plus fitur lokal Indonesia!

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