Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
2315 Переглядів

Hi Odooers,


What should I put in the Scheduled Send Date space if my intention is to send a message 15 minutes after a stage change? 



Аватар
Відмінити

Following question, how to use 'dynamic expression'

Найкраща відповідь

Send a message 15 minutes after a stage (e.g. CRM lead or project task) is changed.

Step 1: Enable Developer Mode
  • Go to Settings → Activate Developer Mode (scroll to the bottom).

Step 2: Create a Server Action

  • Go to SettingsTechnicalActionsServer Actions.
  • Click Create.
  • Fill in the details:
    • Name: Send message after stage change
    • Model: CRM Lead or Project Task (depending on what you want)
    • Action To Do: Python Code
  • Add this code:

# Schedule a message after 15 minutes

send_time = fields.Datetime.now() + timedelta(minutes=15)

record.message_post(schedule_date=send_time, body="Stage was changed 15 minutes ago.")

Save the action.

Step 3: Create Automated Action (Trigger on Stage Change)
  1. Go to SettingsTechnicalAutomationAutomated Actions.
  2. Click Create.
  3. Fill in:
    • Name: Stage Change Trigger
    • Model: CRM Lead (or your target model)
    • Trigger: On Update
    • Trigger Fields: stage_id
    • Action To Do: Execute a Server Action
    • Server Action: Choose the one you just created

If you're manually using "Scheduled Activity" or "message_post", the system doesn't show a "Scheduled Send Date" directly.

In the code, we are doing this:
send_time = fields.Datetime.now() + timedelta(minutes=15)



Аватар
Відмінити

Another terrible LLM "answer" that doesn't actually answer the question!!

Найкраща відповідь

If you want to send a message 15 minutes after a stage change in Odoo, you will need to customize the workflow using code. 

For such customization's, feel free to contact us at info@srikeshinfotech.com.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
трав. 24
2306
5
серп. 25
25083
0
груд. 15
3319
0
жовт. 15
3724
1
квіт. 25
1313