Procházet zdrojové kódy

[FIX] remove unused urls

Gogs před 6 roky
rodič
revize
bba36ebaa6
1 změnil soubory, kde provedl 0 přidání a 29 odebrání
  1. 0 29
      controllers/main.py

+ 0 - 29
controllers/main.py

@@ -20,32 +20,3 @@ class PrintEngineController(http.Controller):
             'action_download_pdf': res_user.action_download_pdf or False,
             'action_preview_pdf': res_user.action_preview_pdf or False
         }
-
-    '''
-    '''
-    @http.route('/print_engine/get_pdf', auth='user', type='json')
-    def get_pdf(self, **kw):
-        ctx = request.context
-
-        ir_action = request.env['ir.actions.report.xml'].browse(ctx.get('params').get('action'))
-        res_ids = request.env[ctx.get('active_model')].browse(ctx.get('active_ids'))
-
-        if ir_action.report_type in ['qweb-html', 'qweb-pdf']:
-            result, format = request.env['report'].get_pdf(res_ids, ir_action.report_name), 'pdf'
-        else:
-            # TODO: mejorar el renderización de reportes rml de la api v7 a v8
-            result, format = render_report(request._cr, request.uid, [res_ids.id], ir_action.report_name, {'model': ctx.get('active_model')}, ctx)
-
-        encoded_result = base64.b64encode(result)
-
-        return {
-            'data': 'data:application/%s;base64,%s' % (format, encoded_result)
-        }
-
-    @http.route('/print_engine/pdf_viewer', auth='user', type='http')
-    def pdf_viewer(self, **kw):
-        cr, uid, context, session = request.cr, request.uid, request.context, request.session
-
-        # view_obj = request.env['ir.ui.view']
-        ir_ui_view = request.registry.get('ir.ui.view')
-        return ir_ui_view.render(cr, session.uid, 'print_engine.pdf_viewer')