From efa6daa60237e3cb5fe4a8e6d143874ea2c25a54 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Jun 2024 09:07:36 +0200 Subject: [PATCH] [FIX] edi_voxel_account_invoice_oca: Intercept post low level method Inheriting post instead of _post makes that certain roots followed to post invoices didn't trigger the Voxel sending, which is incorrect. Let's inherit the low level method then. TT49512 --- edi_voxel_account_invoice_oca/models/account_move.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/edi_voxel_account_invoice_oca/models/account_move.py b/edi_voxel_account_invoice_oca/models/account_move.py index 8e20b5d8d5..290609b9c8 100644 --- a/edi_voxel_account_invoice_oca/models/account_move.py +++ b/edi_voxel_account_invoice_oca/models/account_move.py @@ -1,4 +1,5 @@ # Copyright 2019 Tecnativa - Ernesto Tejeda +# Copyright 2024 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models @@ -47,8 +48,9 @@ def _search_voxel_enabled(self, operator, value): ] return [("id", "in", self.search(domain).ids)] - def post(self): - res = super().post() + def _post(self, soft=True): + """Send to Voxel when posting.""" + res = super()._post(soft=soft) self.action_send_to_voxel() return res