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 print pentaho report?

on 8/27/13, 3:02 AM 543 views
I have created a pentaho report and uploaded it to open erp. In report i added two fileds and in print preview it shows all the data. I want filtering of this data based on date_start , date_end, caller while clicking print in open erp.I have written print function ,my code is 
 def print_report(self, cr, uid, ids, context=None):

      _logger = logging.getLogger(__name__)
      if context is None:
            context = {}
      i = context.get('active_ids', [])
      datas = {'ids': context.get('active_ids', [])}
      res = self.read(cr, uid, ids, ['date_start', 'date_end', 'caller_id'], context=context)
     # datas['form'] = res
      _logger.info('print ...%s...',res)
      caller = ''
      date = res[0]['date_start'] + ' 00:00:00'
      if res[0]['caller_id']:
       caller = res[0]['caller_id'][1]

      _logger.info('print filters.......%s......%s...',date,caller)

      calldata_obj = self.pool.get('calldata1')
      ids  = calldata_obj.search(cr, uid, [('call_start','=',date),('caller','=',caller)])
    #  ids = calldata_obj.search(cr, uid, [])
      calldats = calldata_obj.read(cr, uid, ids, ['caller','call_start'], context)

#      calldats = calldata_obj.read(cr, uid, ids, ['Caller','Call_start'], context
      _logger.info('print ing form.......%s',calldats)
      result = {}
      for pos in calldats:
        result = {
      datas['form'] = result
      _logger.info('calldataa reultt...........%s',result)
      return {
           'type': 'ir.actions.report.xml',
             'caller': result['caller']

but filtering not works 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

0 follower(s)


Asked: 8/27/13, 3:02 AM
Seen: 543 times
Last updated: 3/16/15, 8:10 AM