[NEW] account_move_protect_reset_to_draft
This commit is contained in:
1
account_move_protect_reset_to_draft/wizard/__init__.py
Normal file
1
account_move_protect_reset_to_draft/wizard/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_invoice_send
|
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
|
||||
|
||||
class AccountInvoiceSend(models.TransientModel):
|
||||
_inherit = 'account.invoice.send'
|
||||
|
||||
def send_and_print_action(self):
|
||||
if self.model == "account.move":
|
||||
move = self.env[self.model].browse(self.res_id)
|
||||
move.sent_by_email = True
|
||||
|
||||
return super(AccountInvoiceSend, self).send_and_print_action()
|
Reference in New Issue
Block a user