Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to send filters to the pentaho report from OpenERP

on 8/19/13, 4:05 AM 2,896 views

I created a petaho report and uploaded it to open erp. now i want to print it by clicking print button. I have filters (date start , date end , caller) in form.How to send filters to the report from OpenERP ?

On 8/19/13, 7:47 AM

After you created the modele in pentaho with the parametrs(Filtrers) : date start, date end, caller. You should juste create a new penatho report in the menu : setup -->Technical --> Actions --> Pentaho report with your informations: Name, Name of service, Model, the file and you have to linked to menu After that you find the menu of this report after the linked menu, and if you open this menu, a new wizard open with the parametrs to enter. That's All

@kh@lidoss i have done all this then it shows error on clicking print "Pentaho returned no data for the report 'Calldetails'. Check report definition and parameters". Report details are Name:Calldetails,Model:smdrcalldata,Service Name:Calldetails,Output format:PDF,File :Download smdrcalldata_report.prpt . Ple3ase help me to find issue

on 10/28/13, 5:51 AM
On 8/19/13, 8:35 AM
I had done all this. 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).
How can i print data by passing filters to report code is

from osv import osv,fields
class calldata1(osv.osv):
  _name = 'calldata1'
  _columns = {
              'Call_start': fields.datetime('Call start'),
              'Call_duration':fields.datetime('Call duration'),

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),
    _defaults = {
        'date_start': lambda *a: time.strftime('%Y-%m-%d'),
        'date_end': lambda *a: time.strftime('%Y-%m-%d'),

 def print_report(self, cr, uid, ids, context=None):
      if context is None:
            context = {}
      datas = {'ids': context.get('active_ids', [])}
      res = self.read(cr, uid, ids, ['date_start', 'date_end', 'caller_id'], context=context)
      res = res and res[0] or {}
      datas['form'] = res
      return {
            'type': 'ir.actions.report.xml',

Any one please help?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 8/19/13, 4:05 AM
Seen: 2896 times
Last updated: 3/16/15, 8:10 AM