Does anyone know why the onchange event as coded below is not fired as expected? It fires only once, when making a new Sale Order (before saving). The invoice_status is actually changing (as is confirmable in the tree view). Expected behavior is that the event is fired on every change.
import logging
from odoo import api, fields, models, _
_logger = logging.getLogger(__name__)
class SaleOrder(models.Model):
_inherit = "sale.order"
@api.onchange('invoice_status')
def _onchange_invoice_status(self):
_logger.warning("Invoice status: %s" % self.invoice_status)