[NEW] account_move_protect_reset_to_draft

This commit is contained in:
clementthomas
2024-10-14 16:56:47 +02:00
parent 8f0218c43f
commit f4079c8f13
10 changed files with 856 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import account_invoice_send

View File

@@ -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()