Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

pymysql.err.InternalError: (1054, "Unknown column 'sales_partner' in 'where clause'")

Hi,

Installed Apps

ERPNext: v12.18.0 (version-12)
Frappe Framework: v12.15.0 (version-12)

Procedure: https://docs.erpnext.com/docs/user/manual/en/selling/sales-partner

What Works:
Creating the Partner, Publishing to Web works.
Example: Create a partner - “microsoft”

What does not work:
When Clicking on the Partner Web link on ERPNext instance( hosted at https://mycompany.com )

https://mycompany.com/partners/microsoft

gives following error message
========Error Message ====
Uncaught Server Exception
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 50, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 177, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 193, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 200, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 215, in build_page
context = get_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 28, in get_context
context = build_context(context)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 87, in build_context
ret = context.doc.get_context(context)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/sales_partner/sales_partner.py”, line 32, in get_context
address = frappe.db.get_value(“Address”,
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 400, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug,
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 445, in get_values
out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 590, in _get_values_from_table
r = self.sql(“select {0} from tab{1} {2} {3} {4}”
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 156, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 1075, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 684, in _read_packet
packet.check_error()
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1054, “Unknown column ‘sales_partner’ in ‘where clause’”)

You can solve it adding the column on address table, you can do it declarative using personalization address form

regards