diff --git a/ext/custom-addons/dp_custom/wizards/wizard_confirm_null_invoice.py b/ext/custom-addons/dp_custom/wizards/wizard_confirm_null_invoice.py new file mode 100644 index 00000000..14a9574e --- /dev/null +++ b/ext/custom-addons/dp_custom/wizards/wizard_confirm_null_invoice.py @@ -0,0 +1,19 @@ +# Copyright 2018-Today datenpol gmbh () +# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). + +from odoo import api, fields, models +from odoo.exceptions import ValidationError + +class AccountInvoice(models.TransientModel): + _name = 'wizard.confirm.null_invoice' + _description = 'Bestätige Nullrechnung' + + @api.one + def button_confirm_null_invoice(self): + invoice_ids = self._context.get('active_ids') + if invoice_ids is None: + return {'type': 'ir.actions.act_window_close'} + invoice = self.env['account.invoice'].browse(invoice_ids) + res = invoice.with_context(confirmed=True).action_invoice_open() + + return res diff --git a/ext/custom-addons/dp_custom/wizards/wizard_confirm_null_invoice.xml b/ext/custom-addons/dp_custom/wizards/wizard_confirm_null_invoice.xml new file mode 100644 index 00000000..384c7c0a --- /dev/null +++ b/ext/custom-addons/dp_custom/wizards/wizard_confirm_null_invoice.xml @@ -0,0 +1,37 @@ + + + + + + + view_wizard_confirm_null_invoice_form + wizard.confirm.null_invoice + +
+ +

Wollen Sie wirklich eine Null-Rechnung erzeugen?

+
+
+
+
+
+
+ + + +