Trợ giúp

Xin chào!

Cộng đồng này dành cho các chuyên gia và những người đam mê các sản phẩm và dịch vụ của chúng tôi.
Chia sẻ và thảo luận về nội dung tốt nhất và ý tưởng tiếp thị mới, xây dựng hồ sơ chuyên nghiệp của bạn và trở thành một nhà tiếp thị tốt hơn cùng nhau.

0

Why does automated Action sending emails for first time only?

Ảnh đại diện
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.


Ảnh đại diện
Huỷ bỏ
1 Trả lời
0
Ảnh đại diện
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:



Ảnh đại diện
Huỷ bỏ