odoo/ext/custom-addons/dp_custom/wizards/wizard_confirm_print_invoic...

19 lines
672 B
Python

# Copyright 2018-Today datenpol gmbh (<http://www.datenpol.at>)
# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses).
from odoo import fields, models
class ConfirmPrintInvoice(models.TransientModel):
_name = 'wizard.confirm_print_invoice'
_description = 'Bestätige Rechnungsdruck'
_order = 'name'
info = fields.Text('Info', readonly=True)
def print_invoice(self):
self.ensure_one()
invoice = self.env['account.invoice'].browse(self.env.context.get('active_ids', []))
return self.env.ref('dp_reports_account.account_invoices_with_intrastat').report_action(invoice)