Customize Form Error

While Submitting a Purchase Invoice I got a message "Status cannot be “Unpaid”. It should be one of “”, “Draft”, “On Hold”, “To Receive and Bill”, “To Bill”, “To Receive”, “Completed”, “Cancelled”, “Closed”, “Delivered”. But default status when submitting is on Draft. So I tried to check the customized form. And got another message at the customize form.

Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 859, in submit
self._submit()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 848, in _submit
self.save()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 311, in _save
self._validate()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 461, in _validate
self._validate_selects()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 535, in _validate_selects
value, comma_options))
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 360, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 346, in msgprint
_raise_exception()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 315, in _raise_exception
raise raise_exception(msg)
ValidationError: Status cannot be “Unpaid”. It should be one of “”, “Draft”, “On Hold”, “To Receive and Bill”, “To Bill”, “To Receive”, “Completed”, “Cancelled”, “Closed”, “Delivered”

I keep on getting this message on the Customize Form and do not proceed to open the list of fields. I tried to check it on the Doctype Form and the message also appears on it and cannot update the form.


Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/app.py”, line 60, in application
response = frappe.api.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 1038, in call
return fn(*args, **newargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 89, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/form/run_method.py”, line 43, in runserverobj
r = doc.run_method(method)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1041, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 781, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/custom/doctype/customize_form/customize_form.py”, line 120, in fetch_to_customize
create_custom_field(self.doc_type, df)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 122, in create_custom_field
custom_field.insert()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 267, in insert
follow_document(self.doctype, self.name, frappe.session.user)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/form/document_follow.py”, line 37, in follow_document
doc.save()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 295, in _save
self.insert()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 223, in insert
self._validate_links()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 756, in _validate_links
frappe.LinkValidationError)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 360, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 346, in msgprint
_raise_exception()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 315, in _raise_exception
raise raise_exception(msg)
LinkValidationError: Could not find Document Name: Purchase Invoice-auto_repeat

The doctype Purchase Invoice does not have any custom fields. What solutions can I check for this bug or message?

Have you made any change in workflow relates to Purchase Order?

Hi @Suresh_Thakor no. There is no created workflow for purchase order but I have a workflow for purchase invoice which was inactive for 7 months already.

Have you linked Auto Repeat doctype to Purchase Invoice?

Hi @Suresh_Thakor When I open the Purchase Invoice on the doctype list, it has a link. But the same message still shows. I cannot double check it on the customize form because the list of fields does not show or load so I need to check it on the doctype list.

Do you have other things in mind I can also check? I dont know how to resolve this.

Attaching a screenshot video of the ERPNext. Maybe others can also help me with this. Thank you.

https://drive.google.com/file/d/1vnf3oAZZQIqebk9XdqKdiYcJOlNyL6sd/view?usp=sharing

Please go through this thread.