ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

AttributeError v11

bug

#1

Traceback (most recent call last):
File “/home/erpn/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 848, in submit
self._submit()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 837, in _submit
self.save()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 313, in _save
self.run_post_save_methods()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 908, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 1033, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/erpn/frappe-bench/apps/sehacloud_healthcare/sehacloud_healthcare/sehacloud_healthcare/utils.py”, line 26, in manage_revenue_sharing
source = ref_doc.source
AttributeError: ‘LabTest’ object has no attribute ‘source’

Traceback (most recent call last):
File “/home/erpn/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/erpn/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/erpn/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/erpn/frappe-bench/apps/frappe/frappe/init.py”, line 1007, in call
return fn(*args, **newargs)
File “/home/erpn/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 848, in submit
self._submit()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 837, in _submit
self.save()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 313, in _save
self.run_post_save_methods()
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 908, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpn/frappe-bench/apps/frappe/frappe/model/document.py”, line 1033, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/erpn/frappe-bench/apps/sehacloud_healthcare/sehacloud_healthcare/sehacloud_healthcare/utils.py”, line 26, in manage_revenue_sharing
source = ref_doc.source
AttributeError: ‘LabTest’ object has no attribute ‘source’


#2

Hello,

This error is being caused by code in your custom app sehacloud_healthcare. The LabTest DocType doesn’t have a field named source in v11.


#3

how can i solved this problem ?


#4

You’ll need to update the code in the custom app to support v11.


#5

Okay, Thanks Sagar