Auto Repeat is not functioning for purchase order as required date does not update hence the error:
Full traceback below:
Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/automation/doctype/auto_repeat/auto_repeat.py”, line 136, in create_documents
new_doc = self.make_new_document()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/automation/doctype/auto_repeat/auto_repeat.py”, line 151, in make_new_document
new_doc.insert(ignore_permissions = True)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in insert
self.run_before_save_methods()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 896, in run_before_save_methods
self.run_method(“validate”)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 797, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 1073, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 1056, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 791, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py”, line 48, in validate
self.validate_schedule_date()
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 804, in validate_schedule_date
frappe.throw(_(“Row #{0}: Reqd by Date cannot be before Transaction Date”).format(d.idx))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 377, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 356, in msgprint
_raise_exception()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 316, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Row #1: Reqd by Date cannot be before Transaction Date