Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Intelligence artificielle
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Supermarché
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Homme à tout faire
    • Matériel informatique & support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Parcourir toutes les industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenir partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    • Referral Program
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

How to change helpdeskticket's stage after sending/receiving messages?

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
stagesautomatichelpdeskupdatingtickets
2 Réponses
585 Vues
Avatar
Luc Bernard

How can I automatically change a helpdeskticket's stage to 'Answered' after we send a reply to the customer and 'To be answered' after we receive a follow up reply from the customer?

0
Avatar
Ignorer
Avatar
Jonathan Quique (jqu)
Meilleure réponse

Hello,

You can use an automation rule:

  • Model: Message (mail.message)
  • Trigger: On create
  • Apply on: Related Document Model = helpdesk.ticket
  • Action: Execute Code
Code:

mt_comment = env.ref('mail.mt_comment', raise_if_not_found=False)

if (
record.model == 'helpdesk.ticket'
and record.res_id
and record.message_type in ('email', 'comment')
and record.subtype_id == mt_comment
):
ticket = env['helpdesk.ticket'].browse(record.res_id).exists()
if ticket:
author = record.author_id

is_internal = any(not u.share and u.active for u in author.user_ids) if author else False

target_stage_name = 'Answered' if is_internal else 'To be answered'

target_stage = env['helpdesk.stage'].search([
('name', '=', target_stage_name),
'|',
('team_ids', '=', False),
('team_ids', 'in', ticket.team_id.ids),
], limit=1)

if target_stage and ticket.stage_id != target_stage:
ticket.with_context(tracking_disable=True).write({
'stage_id': target_stage.id,
})

Disclaimer: I tested this solution in a standard Odoo 19.0 database. This server action looks for stages named exactly "Answered" and "To be answered". If your Helpdesk teams use different stage names, you must update those strings in the code. Be sure to configure the "Apply on" filter in the automation rule to avoid performance issues. As always, test the automation in a staging environment before deploying it to production.

1
Avatar
Ignorer
Avatar
Muhammad Farooq Iqbal
Meilleure réponse

Use Automated Actions on helpdesk.ticket.

Set two rules:

  1. When an outgoing message is posted

    • Trigger: on message creation / update

    • Check message type or author is internal user

    • Set ticket stage to Answered

  2. When an incoming customer email/message is received

    • Check author/partner is customer, not internal user

    • Set ticket stage to To be answered

In practice, this usually needs a small customization on mail.message, because the ticket stage depends on messages linked through the chatter.

Logic:

if message.model == "helpdesk.ticket":
    ticket = env["helpdesk.ticket"].browse(message.res_id)

    if message.author_id.user_ids:
        ticket.stage_id = answered_stage
    else:
        ticket.stage_id = to_be_answered_stage

So: possible, but best done with automated action/custom module on mail.message linked to helpdesk.ticket.

0
Avatar
Ignorer
Luc Bernard
Auteur

@Muhammad The outgoing action only works when when sending a 'simple' message but doesn't change the stage when sending a message through a template. Do you know where could be the problem with that?

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Helpdesk module: only support email
helpdesk tickets
Avatar
0
sept. 20
6144
load all other Helpdesk teams' combo box
helpdesk tickets
Avatar
0
juin 20
4113
How to transfer Helpdesk Tickets from one company to another company in Multi-companies Résolu
helpdesk multicompany tickets
Avatar
Avatar
Avatar
Avatar
3
oct. 25
4686
Automatically move project to a stage when all tasks reach that stage Résolu
project stages automatic
Avatar
Avatar
Avatar
2
nov. 23
6935
How to Enable Portal Users to Reopen Their Own Tickets in Odoo 17EE?
stages helpdesk portal-user odoo17EE
Avatar
Avatar
1
déc. 24
3067
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenir partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now