İç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

how we use python parser file in odoo report

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
reportsparserodooV8
7 Cevaplar
13793 Görünümler
Avatar
kartik

i am use odoo version 8

i want to create custom report in account module.

 in "account_report.xml"

<report

id="custom_report_all_invoice"

model="account.invoice"

string="Sekoo Report all invoice"

report_type="qweb-pdf"

name="account.partnerledger_sekoo_all"

attachment_use="False"

file="account.partnerledger_sekoo_all"

/>


in my "partnerledger_sekoo_all.py"


import time

import datetime

from dateutil.relativedelta import relativedelta

from openerp.osv import osv

from openerp.report import report_sxw


class partnerledger_sekoo_all_report_parser(report_sxw.rml_parse):

     def __init__(self, cr, uid, name, context):

         super(partnerledger_sekoo_all_report_parser, self).__init__(cr, uid, name, context=context)

         self.localcontext.update({

               'time': time,

               'lines': self.lines,

              'get_partners':self._get_partners,

              'hello_world': self._hello_world,

              'invoices': self.invoices,

            })

     def invoices(self):

         self.cr.execute(

            "SELECT * FROM account_move_line l ")

           res = self.cr.dictfetchall()

           sum = 0.0

           if self.initial_balance:

              sum = self.init_bal_sum

              for r in res:

                 sum += r['debit'] - r['credit']

                 r['progress'] = sum

               full_account.append(r)

         return full_account

     def _hello_world(self):

        return "Hello World!"


class partnerledger_sekoo_all(osv.AbstractModel):

     _name = 'report.partnerledger_sekoo_all'

    _inherit = 'report.abstract_report'

    _template = 'partnerledger_sekoo_all'

    _wrapped_report_class = partnerledger_sekoo_all_report_parser



in "partnerledger_sekoo_all.xml"


<?xml version="1.0" encoding="utf-8"?>

<openerp>

<data>

<template id="partnerledger_sekoo_all">

<t t-call="report.html_container">

<t t-call="report.internal_layout">

<div class="page">

<h2>Sekoo Partner Ledger all</h2>

<span t-esc="hello_world()"/>

</t>

</t>

</template>

</data>

</openerp>


i also make entry in __openerp.py__ of xml file

and in __init.py__ import partnerledger_sekoo_all_report_parser


but in template that not show anything,

it return error like

"'NoneType' object is not callable" while evaluating

'hello_world()'

how can i solve that please help

0
Avatar
Vazgeç
Zbik

Do you have 'report' in depends, in __openerp__py?

Axel Mendoza

@Zbik i make entry of report.xml file in __openerp__.py it render template and not show any error but parser method hello_world() not accessible in .xml file please specify if anything else is required for parser in report also any detail doc for that

Avatar
Axel Mendoza
En İyi Yanıt

Hi @kartik

Your report name is 'account.partnerledger_sekoo_all' so you need to use it for the parser _template and _name in order to be used by Odoo. You could read a complete explanation and example at:

https://www.odoo.com/es_ES/forum/help-1/question/how-to-define-a-custom-methods-functions-to-be-used-in-a-qweb-report-how-to-define-and-use-a-report-parser-92244

Your case could be solved like:

class partnerledger_sekoo_all(osv.AbstractModel):

_name = 'report.account.partnerledger_sekoo_all'

_inherit = 'report.abstract_report'

_template = 'account.partnerledger_sekoo_all'

_wrapped_report_class = partnerledger_sekoo_all_report_parser
0
Avatar
Vazgeç
kartik
Üretici

thank it wroks for me now i want to get all invoice objects with invoice lilne how can i get that in report.xml through parser file in odoo report

Axel Mendoza

Don't you have a function in the parser for that?. In the link above there is examples of how to do it

kartik
Üretici

i want to get all invoice with invoice line in odoo report i try with this def invoices(self): self.cr.execute( "SELECT * FROM account_move_line l ") res = self.cr.dictfetchall() return res but it gives all record i want to get invoice list customer wise

Axel Mendoza

You could vote up if your post issue is solved

Avatar
Zbik
En İyi Yanıt

In __openerp__.py, try this

'depends': ['account','report']

UPDATE:

You comment lines and test again:

'lines': self.lines,

'get_partners':self._get_partners,

'invoices': self.invoices,


0
Avatar
Vazgeç
kartik
Üretici

in accounts/__openerp__.py line already exist 'depends' : ['base_setup', 'product', 'analytic', 'board', 'edi', 'report'], after i add 'depends' : ['base_setup', 'product', 'analytic', 'board', 'edi', 'report','account'], so it return error 500: Internal Server Error Error Error message: account.invoice in log file it shows 2015-10-16 13:15:05,288 8204 ERROR bitnami_openerp openerp.addons.document.content_index: Cannot determine mime type. Traceback (most recent call last): File "C:\Bitnami\odoo-8.0-8\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\document\content_index.py", line 167, in doIndex pop = Popen(['file','-b','--mime',fname], shell=False, stdout=PIPE) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 709, in __init__ errread, errwrite) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 957, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified 2015-10-16 13:15:07,450 8204 ERROR bitnami_openerp openerp.addons.document.content_index: Cannot determine mime type. Traceback (most recent call last): File "C:\Bitnami\odoo-8.0-8\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\document\content_index.py", line 167, in doIndex pop = Popen(['file','-b','--mime',fname], shell=False, stdout=PIPE) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 709, in __init__ errread, errwrite) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 957, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified 2015-10-16 13:15:18,243 8204 INFO bitnami_openerp openerp.service.common: successful login from 'admin' using database 'bitnami_openerp' 2015-10-16 09:15:43,584 8988 WARNING bitnami_openerp openerp.addons.base.ir.ir_cron: Model `automatic.workflow.job` does not exist. 2015-10-16 09:16:43,622 8988 WARNING bitnami_openerp openerp.addons.base.ir.ir_cron: Model `automatic.workflow.job` does not exist.

Zbik

You create own custom module with this report and with this depends. If you only modify module account (it is NOT recommended), probably other error exist in code. Show your log file. PS. for new api in v8 see "Custom reports" - https://www.odoo.com/documentation/8.0/reference/reports.html

Zbik

answer updated

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
how can i get month wise reports for Bank, Revenue, Expenses
reports odooV8
Avatar
0
Eki 15
3930
How to register a parser for a qweb report Çözüldü
invoice qweb reports parser odooV8
Avatar
Avatar
1
Eyl 15
7134
How to customize contact widget in qweb reports? Çözüldü
qweb reports odooV8
Avatar
Avatar
2
Eki 22
29912
QWebException: "Invalid template id: 'header_foobar'" while evaluating "translate_doc(doc_id, doc_model, 'partner_id.lang', 'account.report_invoice_foobar_document')"
qweb reports odooV8 QWebTemplateNotFound
Avatar
0
Kas 22
7329
Report Parser Odoo 8
qweb voucher reports parser
Avatar
Avatar
1
Mar 16
6974
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