snailmail_confirm_invoice_send.py 585 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import api, fields, models
  4. class SnailmailConfirmInvoiceSend(models.TransientModel):
  5. _name = 'snailmail.confirm.invoice'
  6. _inherit = ['snailmail.confirm']
  7. _description = 'Snailmail Confirm Invoice'
  8. invoice_send_id = fields.Many2one('account.invoice.send')
  9. def _confirm(self):
  10. self.ensure_one()
  11. self.invoice_send_id._print_action()
  12. def _continue(self):
  13. self.ensure_one()
  14. return self.invoice_send_id.send_and_print()