This is for all the Purchase Invoices. Below is the error log that I’m getting in the browser’s console.
Traceback (most recent call last):
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/handler.py”, line 52, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/init.py”, line 907, in call
return fn(*args, **newargs)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in save
return self._save(*args, **kwargs)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 253, in _save
self.insert()
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 192, in insert
self.run_before_save_methods()
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 771, in run_before_save_methods
self.run_method(“validate”)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 891, in composer
return composed(self, method, *args, **kwargs)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 874, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/vavcoders/frappe-bench/apps/erpnext/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py”, line 44, in validate
super(PurchaseInvoice, self).validate()
File “/home/vavcoders/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 29, in validate
super(BuyingController, self).validate()
File “/home/vavcoders/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py”, line 16, in validate
super(StockController, self).validate()
File “/home/vavcoders/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 43, in validate
validate_return(self)
File “/home/vavcoders/frappe-bench/apps/erpnext/erpnext/controllers/sales_and_purchase_return.py”, line 15, in validate_return
validate_return_against(doc)
File “/home/vavcoders/frappe-bench/apps/erpnext/erpnext/controllers/sales_and_purchase_return.py”, line 30, in validate_return_against
.format(doc.meta.get_label(“return_against”), doc.return_against))
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/init.py”, line 316, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/init.py”, line 306, in msgprint
_raise_exception()
File “/home/vavcoders/frappe-bench/apps/frappe/frappe/init.py”, line 279, in _raise_exception
raise raise_exception, encode(msg)
ValidationError: Invalid Return Against Purchase Invoice: PINV-00513