This is my scheduled action in Odoo:
action image
and this is my code:
# -*- coding: utf-8 -*-
from odoo import models, api
import pika
import json
import logging
_logger = logging.getLogger(__name__)
class HelpdeskTicket(models.Model):
_inherit = 'helpdesk.ticket'
def send_stage_change_to_rabbitmq(self):
_logger.info("Méthode OK : chargée dans helpdesk.ticket")
I encountered an error in the container logs:
error image
agilgur5
2,1626 gold badges54 silver badges74 bronze badges
lang-py
__init__.pyis filled correctly?helpdesk_mgmt.model_helpdesk_ticketinstead ofhelpdesk.ticketin the action, and it's working.