Error while creating or viewing 'Opportunity'

Comments 0
ASSIGNED TO
Assign
ATTACHMENTS
Attach File
TAGS

Add a tag…
SHARED WITH
0
You edited this
5 minutes ago
You created this
5 minutes ago
LostClose
Related Documents
RELATED

Quotation
Supplier Quotation
Opportunity From

Lead

LEAD-00002
Customer / Lead Name
Khokhawat Solar Energy
Opportunity Type

Status

Mins to first response
With Items
CONTACT INFO
SOURCE
NEXT CONTACT
Add a comment Comment

New Email
You Created – 5 minutes ago
LEAD-00002
Something went wrong

Server Error: Please check your server logs or contact tech support.
Traceback (most recent call last):
File “/home/navitas/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/navitas/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/navitas/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/navitas/frappe-bench/apps/frappe/frappe/init.py”, line 890, in call
return fn(*args, **newargs)
File “/home/navitas/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 204, in get_open_count
filters=filters, limit=6, distinct=True, ignore_ifnull=True))
File “/home/navitas/frappe-bench/apps/frappe/frappe/init.py”, line 1096, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/navitas/frappe-bench/apps/frappe/frappe/init.py”, line 1069, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/navitas/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 80, in execute
result = self.build_and_run()
File “/home/navitas/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 104, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/home/navitas/frappe-bench/apps/frappe/frappe/database.py”, line 148, in sql
self._cursor.execute(query)
File “/home/navitas/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/navitas/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘tabSupplier Quotation.prevdoc_docname’ in ‘where clause’”)
Report this issue

1 Like

did you write any query related to this…if so share the query

i didnt write any query for this. while using the standard feature when i try and save the i get this error.

I am getting the same error on fresh bench-backed install.

I’m having the same issue, just upgraded from v6.27 (with a ton of errors btw).

Also when I click on Supplier Quotation this appears:

Warning: Unable to find prevdoc_docname in any table related to Supplier Quotation

This post also mentions the same problem:

I am getting the same error. I created a new topic on the same.

Looks there is a problem on the update.

There was a recent commit on this file:

opportunity_dashboard.py

this is the commit:

fa1cdd5bf05b152e21a29ee609d1f28d43021b4b

Hi

I am experiencing error once I create an opportunity in CRM module.

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 55, in application
   response = frappe.handler.handle()
   File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
  execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
  ret = frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 890, in call
   return fn(*args, **newargs)
 File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 204, in get_open_count
   filters=filters, limit=6, distinct=True, ignore_ifnull=True))
 File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1096, in get_all
   return get_list(doctype, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1069, in get_list
  return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 80, in execute
 result = self.build_and_run()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 104, in build_and_run
  return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 148, in sql
  self._cursor.execute(query)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205,        in execute
self.errorhandler(self, exc, value)
 File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, "Unknown column 'tabSupplier Quotation.prevdoc_docname' in 'where clause'")

Hi @domainadmin . Same issue with this post .

Might be due to the latest update.

Thanks!

Hi Guys,

I’m brand new to ERPNext and playing with the system before putting it in production mode for our team. Do you know why we’re getting the below error while trying to save new opportunity? Thank you.

App Versions

{
“erpnext”: “7.1.0-beta”,
“frappe”: “7.1.0-beta”
}
Route

Form/Opportunity/OPTY-00002
Error Report

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 890, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 204, in get_open_count
filters=filters, limit=6, distinct=True, ignore_ifnull=True))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1096, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1069, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 80, in execute
result = self.build_and_run()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 104, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 148, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘tabSupplier Quotation.prevdoc_docname’ in ‘where clause’”)
Request Data

{
“type”: “GET”,
“args”: {
“doctype”: “Opportunity”,
“name”: “OPTY-00002”,
“cmd”: “frappe.desk.notifications.get_open_count”
},
“url”: “/”
}
Response JSON

{}

opportunity is nothing to do with supplier quotation . Do you have any custom scripts running ?

Try bench migrate and check if this issue persists or not

Thanks Ragav, we’re not running any custom script.
i tried bench migrate but the issue remains

1 Like

Hi @Biruk . Run bench update and if you are struck please post the output from the terminal .

Thanks

Hey ragav, thank you for your help with this. I did ‘bench update’ even though it finished without any issue I’m still getting the error.

Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 55, in application response = frappe.handler.handle() File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle execute_cmd(cmd) File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd ret = frappe.call(method, **frappe.form_dict) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 890, in call return fn(*args, **newargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 204, in get_open_count filters=filters, limit=6, distinct=True, ignore_ifnull=True)) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1096, in get_all return get_list(doctype, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1069, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 80, in execute result = self.build_and_run() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 104, in build_and_run return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update) File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 148, in sql self._cursor.execute(query) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute self.errorhandler(self, exc, value) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1054, "Unknown column 'tabSupplier Quotation.prevdoc_docname' in 'where clause'") Report this issue

I did a fresh install today, same error

No, the issue still persists, did the work around mentioned in this discussion.

Hi,
I am also facing the same issue.

Traceback (most recent call last):
File “/home/itwork/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/itwork/frappe-bench/apps/frappe/frappe/init.py”, line 890, in call
return fn(*args, **newargs)
File “/home/itwork/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 204, in get_open_count
filters=filters, limit=6, distinct=True, ignore_ifnull=True))
File “/home/itwork/frappe-bench/apps/frappe/frappe/init.py”, line 1096, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/itwork/frappe-bench/apps/frappe/frappe/init.py”, line 1069, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/itwork/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 80, in execute
result = self.build_and_run()
File “/home/itwork/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 104, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/home/itwork/frappe-bench/apps/frappe/frappe/database.py”, line 148, in sql
self._cursor.execute(query)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘tabSupplier Quotation.prevdoc_docname’ in ‘where clause’”)

Also there is no Quotation button, only the dashboard item (it’s there in the .js file so I’m not sure why not).

I ended up changing opportunity.js, opportunity.py and opportunity_dashboard.py with the v7.0.x branch files until this is fixed

  • 1 Same issue.

Hi,

Same issue with me, while no error with bench update nor bench migrate.

ERPNext: v7.1.5
Frappe Framework: v7.1.4

Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 55, in application response = frappe.handler.handle() File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle execute_cmd(cmd) File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd ret = frappe.call(method, **frappe.form_dict) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 890, in call return fn(*args, **newargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 204, in get_open_count filters=filters, limit=6, distinct=True, ignore_ifnull=True)) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1096, in get_all return get_list(doctype, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1069, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 80, in execute result = self.build_and_run() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 104, in build_and_run return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update) File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 148, in sql self._cursor.execute(query) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute self.errorhandler(self, exc, value) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1054, "Unknown column 'tabSupplier Quotation.prevdoc_docname' in 'where clause'")