wizard 'confirm null invoice'
parent
7e4140ce0c
commit
eca8c28dd7
|
|
@ -0,0 +1,19 @@
|
||||||
|
# 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 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
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright 2018-Today Tischlerzentrum gmbh(<http://www.tzaustria.at>)
|
||||||
|
License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). -->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_wizard_confirm_null_invoice_form" model="ir.ui.view">
|
||||||
|
<field name="name">view_wizard_confirm_null_invoice_form</field>
|
||||||
|
<field name="model">wizard.confirm.null_invoice</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Wizard Confirm Null Invoice">
|
||||||
|
<group>
|
||||||
|
<p>Wollen Sie wirklich eine Null-Rechnung erzeugen?</p>
|
||||||
|
</group>
|
||||||
|
<footer>
|
||||||
|
<button name="button_confirm_null_invoice"
|
||||||
|
string="Null-Rechnung bestätigen"
|
||||||
|
class="btn-primary"
|
||||||
|
type="object"/>
|
||||||
|
<button string="Abbrechen"
|
||||||
|
class="btn-default"
|
||||||
|
special="cancel"/>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<act_window id="action_wizard_confirm_null_invoice"
|
||||||
|
name="Nullrechnung"
|
||||||
|
src_model="sale.order"
|
||||||
|
res_model="wizard.confirm.null_invoice"
|
||||||
|
view_type="form"
|
||||||
|
view_mode="form"
|
||||||
|
key2="client_action_multi"
|
||||||
|
target="new"/>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Loading…
Reference in New Issue