Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivouspalvelut
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Kurssit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

Automated Action Not Triggering When Quotation Is Sent (state = “sent”) — CRM Stage Not Updating (Odoo 19)

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
actionconfigurationworkflow
2 Vastaukset
268 Näkymät
Avatar
Yani Aimene
Hello everyone,

I'm trying to create a simple automated action in Odoo 19 to update the CRM stage of an opportunity when its related Sales Order (quotation) is sent by email.

Expected behavior:

When I click “Send by Email” on a quotation, the Sales Order state becomes “sent”, and the linked opportunity should automatically move to the stage “Devis envoyé” (Quotation Sent).
But the automated action never triggers, and the CRM stage never updates.

What I have done

Automated Action settings

Model: Sales Order (sale.order)

Trigger: On creation & update

Before update domain: All records

Apply on: state = sent (in the UI = “Soumission envoyée”)

On Update Fields: tried with and without selecting state

Action: Execute Python Code

Action is active

Python code used (no errors):

stage = env['crm.stage'].search([('name', '=', 'Devis envoyé')], limit=1)
for order in records:
    if not order.opportunity_id:
        continue
    if order.state == 'sent' and stage:
        order.opportunity_id.write({'stage_id': stage.id})

What is happening

Sending the quotation DOES change the Sales Order state to “sent”, confirmed in the UI.

The quotation IS linked to an opportunity (opportunity_id is not empty).

The automated action never triggers.

No error appears in the logs or UI.

Even a debug automated action that only does: order.message_post(body="DEBUG")
…does not post anything in the chatter.

This tells me the automated action is simply not running at all, even with no domains or filters.

What I have confirmed

Action is active.

Model is correct (sale.order).

The “sent” state corresponds to the value "Soumission envoyée” in the UI.

I tried versions with and without domains.

I tried “On update”, “On creation & update”, and “On update of field: state”.
Nothing triggers the action.

My questions

Is there a known issue in Odoo 19 where automated actions do NOT trigger on Sales Orders when the state changes from draft to sent?

Should "Send by Email" trigger an automated action on Sales Orders?

Does the email wizard update the record in a way that bypasses automated actions?

Is there another method recommended to react to the quotation being sent?

Is there a limitation in Odoo 19 Online / Enterprise that prevents some automated actions from executing?

Any help would be greatly appreciated


I’m simply trying to update the CRM stage when a quotation is sent — something that several Odoo forum posts suggest should work — but the automated action never fires, even with zero domain filters and a basic message_post() debug.

0
Avatar
Hylkää
Avatar
Ray Carnes (ray)
Paras vastaus

I just tested this and it worked:

stage = env['crm.stage'].search([('name', '=', 'Proposition')], limit=1)
for order in records:
if not order.opportunity_id:
continue
if order.state == 'sent' and stage:
order.opportunity_id.write({'stage_id': stage.id})
0
Avatar
Hylkää
Avatar
Kunjan Patel
Paras vastaus
Hello Yani Aimene,
I hope you are doing well

Why it doesn't work:
The "Send by Email" button changes state inside message_post() with tracking_disable=True, which bypasses automated actions.

Solution:
Create a custom module and override message_post:
from odoo import models
  class SaleOrder(models.Model):
      _inherit = 'sale.order'

      def message_post(self, **kwargs):
          result = super().message_post(**kwargs)
          if self.env.context.get('mark_so_as_sent'):
              stage = self.env['crm.stage'].search([('name', '=', 'Devis envoyé')], limit=1)
              if stage:
                  for order in self.filtered(lambda o: o.state == 'sent' and o.opportunity_id):
                      order.opportunity_id.stage_id = stage
          return result

I hope this information helps you

Thanks & Regards,
Kunjan Patel
0
Avatar
Hylkää
Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
Issue with Callback Not Updating Properly When Order is Open in Odoo 17
action configuration workflow
Avatar
0
marrask. 24
1668
How can I edit the Website?
action configuration
Avatar
Avatar
Avatar
2
lokak. 25
816
Marketing Automation- campaign running but not emails sent.
configuration workflow
Avatar
Avatar
1
lokak. 25
698
Link quotation emails to the original customer email thread
action workflow
Avatar
0
elok. 25
944
suppression site web
action configuration
Avatar
Avatar
2
heinäk. 25
1559
Yhteisö
  • Kurssit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Brändiominaisuudet
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

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