Помощь

Добро пожаловать!

Это сообщество предназначена для профессионалов и энтузиастов наших товаров и услуг.
Поделитесь и обсудите лучший содержание и новые маркетинговые идеи, постройте свой профессиональный профиль и станьте лучшим маркетологом вместе.

0

Why does automated Action sending emails for first time only?

Аватар
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.


Аватар
Отменить
1 Ответ
0
Аватар
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:



Аватар
Отменить