# -*- coding: utf-8 -*- from openerp import http from openerp.http import request class TicketVentaPOSPrint(http.Controller): @http.route(['/ticket_venta/print/'], type='http', auth='public') def print_ticket(self, invoice_id, **kw): invoice = request.env['account.invoice'].sudo().browse(invoice_id) if not invoice.exists(): return request.not_found() return request.render('ticket_venta_posprint.ticket_venta_template', {'doc': invoice})