1234567891011121314151617181920 |
- # -*- coding: utf-8 -*-
- import logging
- from openerp.osv import orm
- _logger = logging.getLogger(__name__)
- class account_invoice(orm.Model):
- _inherit = 'account.invoice'
- def action_print_ticket_direct(self, cr, uid, ids, context=None):
- _logger.info('ticket_venta_posprint: action_print_ticket_direct called ids=%s uid=%s', ids, uid)
- if not ids:
- return {}
- invoice_id = ids[0]
- url = '/ticket_venta/print/%s' % invoice_id
- return {
- 'type': 'ir.actions.act_url',
- 'url': url,
- 'target': 'new',
- }
|