Method: Ooor::Report::ClassMethods#report
- Defined in:
- lib/ooor/report.rb
#report(report_name, ids, report_type = 'pdf', context = {}) ⇒ Object
Added methods to obtain report data for a model
9 10 11 12 13 14 15 16 |
# File 'lib/ooor/report.rb', line 9 def report(report_name, ids, report_type='pdf', context={}) #TODO move to ReportService context = connection.object.inject_session_context(:report, false, context)[0] uid = @connection.config[:user_id] pass = @connection.config[:password] db = @connection.config[:database] params = {model: openerp_model, id: ids[0], report_type: report_type} connection.report.report(db, uid, pass, report_name, ids, params, context) end |