Help

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

Why does automated Action sending emails for first time only?

Avatar
Admin

It working only once after creation. If it runs the scheduler by putting back date in 'Next Execution date' field, It is not sending emails.


Avatar
Discard
1 Answer
0
Avatar
Admin
Best Answer

The '_check' function in 'Check Action Rules' scheduler checking a condition before executing the process. That condition checks whether the action date greater than last automated action run datetime and less than of current datetime. Whenever the '_check' function executes it saves that time as last run date. So that's why when we run the scheduler manually by putting back date, it is not executing process. 

Odoo V16: addons/base_automation/models/base_automation.py:563: def _check(self, automatic=False, use_new_cursor=False):

if last_run <= action_dt < now:
try:
action._process(record)
except Exception:
_logger.error(traceback.format_exc())


##For testing you can modify the code as 

if action_dt <= now:



Avatar
Discard