Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

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

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Pass filters to pentaho report

Subscribe

Get notified when there's activity on this post

This question has been flagged
filterprintreportpentaho
5816 Views
Avatar
Anuradha
    hi,
    I have a table calldata1 and i want to show its contents in report print. i created pentaho report by adding  calldata1 as datasource and uplodaded this report to open erp. Then i created a wizard table  calldata_print_report_wiz . i created a pop up window which displays datestart, date end ,caller from this table as filters. (similar to Reporting/Point of sale/Sale details).
    i print data by passing filters to report my corrected code is given below
    calldetails/calldata.py

    from osv import osv,fields
    class calldata1(osv.osv):
      _name = 'calldata1'
      _columns = {
                  'Call_start': fields.datetime('Call start'),
                  'Call_duration':fields.datetime('Call duration'),
                   'Caller':fields.char('Caller'),
              }
    calldata1()
    calldetails/wizard/call_print.py

    import logging
    from openerp.osv import fields, osv
    import time

    class calldata_print_report_wiz(osv.osv_memory):
        _name = "calldata.print.report.wiz"
        def _sel_func(self, cr, uid,context=None):
           obj = self.pool.get('calldata1')
           ids = obj.search(cr, uid, [])
           res = obj.read(cr, uid, ids, ['id','Caller'], context)
           res =[(r['id'],r['Caller']) for r in res]
          return res

        _columns = {
            'date_start': fields.date('Date Start', required=True),
            'date_end': fields.date('Date End', required=True),
            'caller_id':fields.many2one(
            'calldata1',
            'caller_id',
            selection=_sel_func
            )
         }
        _defaults = {
            'date_start': lambda *a: time.strftime('%Y-%m-%d'),
            'date_end': lambda *a: time.strftime('%Y-%m-%d'),
         }

 34     def print_report(self, cr, uid, ids, context=None):
 35
 36       _logger = logging.getLogger(__name__)
 37       datas = {}
 38       if context is None:
 39             context = {}
 40       res = self.read(cr, uid, ids, ['date_start', 'date_end', 'caller_id'], context=context)
 41       caller_id  = ''
 42       date_start = res[0]['date_start'] + ' 00:00:00'
 43       date_end = res[0]['date_end'] +  ' 23:59:59'
 44       if res[0]['caller_id']:
 45         caller_id = res[0]['caller_id']
 46       calldata_obj = self.pool.get('calldata')
 47       if caller_id:
 48        cr.execute("select caller from calldata where id=%s",(caller_id,))
 49        caller = cr.fetchone()
 50        ids  = calldata_obj.search(cr, uid, [('call_start','>=',date_start),('call_start','<=',date_end),('caller','=',caller[0])])
 51       else:
 52        ids  = calldata_obj.search(cr, uid, [('call_start','>=',date_start),('call_start','<=',date_end)])
 53       calldats = calldata_obj.read(cr, uid, ids, ['caller','call_start'], context)
 54       datas['ids'] = ids
 55       datas['form']= calldats
 56       datas['model']= 'calldata'
 57       if (ids == []):
 58          datas = {}
 59       return {
 60              'type': 'ir.actions.report.xml',
 61              'report_name':'calldata',
 62              'datas':datas,
 63
 64             }

    calldata_print_report_wiz()
1
Avatar
Discard
Anuradha
Author

any one der? please help :(

evon_dun

Did you solved it yet? Looking for the same solution.

Anuradha
Author

@evon Yes i solved it . i will update question with correct code.Plz inform if it helped you

Anuradha
Author

@evon i posted correct code . what is the issue ?

evon_dun

line 50, i have same type of work but it gives the error "TypeError: 'list' object is not callable" :(

Anuradha
Author

@evon will u post u r code as different question and give link. i will check

evon_dun

Thanks but it works now.

Anuradha
Author

@evon then vote 4 me :)

evon_dun

:) done

evon_dun

and how do you print the value of a field in wizard to the report?

evon_dun

this is the link pls check http://help.openerp.com/question/34705/print-value-of-a-field-in-wizard-to-report/

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

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

Sign up
Related Posts Replies Views Activity
change filter in accounting report
filter report
Avatar
Avatar
2
दिस॰ 17
3669
how to check if report has been printed
print report
Avatar
Avatar
1
नव॰ 16
5247
how to pass filers from openerp to pentaho
filter pentaho
Avatar
0
मार्च 15
3312
Did pentaho report need report_sxw
report pentaho
Avatar
0
मार्च 15
3668
how to write print function for pentaho report
report pentaho
Avatar
0
मार्च 15
4155
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

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