Skip to content

Commit

Permalink
[FIX] edi_voxel_account_invoice_oca: Intercept post low level method
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pedrobaeza committed Jun 6, 2024
1 parent 4465c6e commit efa6daa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions edi_voxel_account_invoice_oca/models/account_move.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit efa6daa

Please sign in to comment.