Question regarding "Date Change" alert

Hi all,

I have got a question regarding Date Change alert.

We are working with quotations…what I want is an email alert when the quotation (transaction_date) reaches a specific age … e.g. 5 days.

Means…we submit it on 20th January and on 25th January the system sends a reminder to remind the customer.

Best,
Dan

Set days in advance to -5

:scream:

Thanks mate…this was my first guess…I will try and report :slight_smile:

Hi @rmehta

I tried it with the following setup:

DocType: Quotation
Date Change: transaction_date
Days in Advance: -1

And I read, it should send out the mail at midnight? It didn’t!

Is your scheduler working? did you check your the Scheduler Log?

I think negative date should be fine.

https://github.com/frappe/frappe/blob/develop/frappe/core/doctype/email_alert/email_alert.py#L36

That looks ok.

Here is the last Error from the Scheduler Log:

Method: daily, Handler: erpnext.controllers.recurring_document.create_recurring_documents
Traceback (innermost last):
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/tasks.py", line 77, in scheduler_task
    frappe.get_attr(handler)()
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/controllers/recurring_document.py", line 25, in create_recurring_documents
    manage_recurring_documents("Purchase Order")
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/controllers/recurring_document.py", line 40, in manage_recurring_documents
    and next_date <= ifnull(end_date, '2199-12-31')""".format(doctype, next_date))
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 121, in sql
    self._cursor.execute(query)
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 OperationalError: (1054, "Unknown column 'recurring_id' in 'field list'")

You need run bench update - seems like the patches have not been executed.

– deleted post —

I’ll repost in a minute