Odoo Help


How print pentaho report?

on 8/27/13, 3:02 AM 838 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?

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


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