Et si besoin, je vois dans mon journal d’erreur le log suivant (ci cela peut aider à identifier l’erreur) :
Traceback with variables (most recent call last):
File « apps/frappe/frappe/app.py », line 114, in application
response = frappe.api.handle(request)
request = <Request ‹ https://batiment25.dokos.cloud/api/method/frappe.desk.notifications.get_open_count?doctype=Customer&name=Magalie%20Fernandes&items=[« Opportunity »,« Quotation »,« Contract »,« Sales%20Order »,« Delivery%20Note »,« Sales%20Invoice »,« Payment%20Entry »,« Bank%20Account »,« Dunning »,« Issue »,« Maintenance%20Visit »,« Installation%20Note »,« Warranty%20Claim »,« Project »,« Pricing%20Rule »,« Subscription »,« Party%20Specific%20Item »,« Sepa%20Mandate »] › [GET]>
response = None
rollback = True
e = OperationalError(1054, « Unknown column ‹ datefield › in ‹ WHERE › »)
File « apps/frappe/frappe/api/init.py », line 49, in handle
data = endpoint(**arguments)
request = <Request ‹ https://batiment25.dokos.cloud/api/method/frappe.desk.notifications.get_open_count?doctype=Customer&name=Magalie%20Fernandes&items=[« Opportunity »,« Quotation »,« Contract »,« Sales%20Order »,« Delivery%20Note »,« Sales%20Invoice »,« Payment%20Entry »,« Bank%20Account »,« Dunning »,« Issue »,« Maintenance%20Visit »,« Installation%20Note »,« Warranty%20Claim »,« Project »,« Pricing%20Rule »,« Subscription »,« Party%20Specific%20Item »,« Sepa%20Mandate »] › [GET]>
endpoint = <function handle_rpc_call at 0x7f9b9e617060>
arguments = {‹ method ›: ‹ frappe.desk.notifications.get_open_count ›}
File « apps/frappe/frappe/api/v1.py », line 36, in handle_rpc_call
return frappe.handler.handle()
method = ‹ frappe.desk.notifications.get_open_count ›
frappe = <module ‹ frappe › from ‹ apps/frappe/frappe/init.py ›>
File « apps/frappe/frappe/handler.py », line 49, in handle
data = execute_cmd(cmd)
cmd = ‹ frappe.desk.notifications.get_open_count ›
data = None
File « apps/frappe/frappe/handler.py », line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
cmd = ‹ frappe.desk.notifications.get_open_count ›
from_async = False
server_script = None
method = <function get_open_count at 0x7f9b9cc54720>
File « apps/frappe/frappe/init.py », line 1749, in call
return fn(args, **newargs)
fn = <function get_open_count at 0x7f9b9cc54720>
args = ()
kwargs = {‹ doctype ›: ‹ Customer ›, ‹ name ›: ‹ Magalie Fernandes ›, ‹ items ›: ‹ [« Opportunity »,« Quotation »,« Contract »,« Sales Order »,« Delivery Note »,« Sales Invoice »,« Payment Entry »,« Bank Account »,« Dunning »,« Issue »,« Maintenance Visit »,« Installation Note »,« Warranty Claim »,« Project »,« Pricing Rule »,« Subscription »,« Party Specific Item »,« Sepa Mandate »] ›, ‹ cmd ›: ‹ frappe.desk.notifications.get_open_count ›}
newargs = {‹ doctype ›: ‹ Customer ›, ‹ name ›: ‹ Magalie Fernandes ›, ‹ items ›: ‹ [« Opportunity »,« Quotation »,« Contract »,« Sales Order »,« Delivery Note »,« Sales Invoice »,« Payment Entry »,« Bank Account »,« Dunning »,« Issue »,« Maintenance Visit »,« Installation Note »,« Warranty Claim »,« Project »,« Pricing Rule »,« Subscription »,« Party Specific Item »,« Sepa Mandate »] ›}
File « apps/frappe/frappe/utils/typing_validations.py », line 30, in wrapper
return func(args, **kwargs)
args = []
kwargs = {‹ doctype ›: ‹ Customer ›, ‹ name ›: ‹ Magalie Fernandes ›, ‹ items ›: ‹ [« Opportunity »,« Quotation »,« Contract »,« Sales Order »,« Delivery Note »,« Sales Invoice »,« Payment Entry »,« Bank Account »,« Dunning »,« Issue »,« Maintenance Visit »,« Installation Note »,« Warranty Claim »,« Project »,« Pricing Rule »,« Subscription »,« Party Specific Item »,« Sepa Mandate »] ›}
apply_condition = <function whitelist..innerfn.. at 0x7f9b9cc54540>
func = <function get_open_count at 0x7f9b9cc54680>
File « apps/frappe/frappe/init.py », line 915, in wrapper_fn
retval = fn(args, **get_newargs(fn, kwargs))
args = ()
kwargs = {‹ doctype ›: ‹ Customer ›, ‹ name ›: ‹ Magalie Fernandes ›, ‹ items ›: ‹ [« Opportunity »,« Quotation »,« Contract »,« Sales Order »,« Delivery Note »,« Sales Invoice »,« Payment Entry »,« Bank Account »,« Dunning »,« Issue »,« Maintenance Visit »,« Installation Note »,« Warranty Claim »,« Project »,« Pricing Rule »,« Subscription »,« Party Specific Item »,« Sepa Mandate »] ›}
switched_connection = False
fn = <function get_open_count at 0x7f9b9cc545e0>
File « apps/frappe/frappe/desk/notifications.py », line 310, in get_open_count
out[« timeline_data »] = module.get_timeline_data(doctype, name)
doctype = ‹ Customer ›
name = ‹ Magalie Fernandes ›
items = [‹ Opportunity ›, ‹ Quotation ›, ‹ Contract ›, ‹ Sales Order ›, ‹ Delivery Note ›, ‹ Sales Invoice ›, ‹ Payment Entry ›, ‹ Bank Account ›, ‹ Dunning ›, ‹ Issue ›, ‹ Maintenance Visit ›, ‹ Installation Note ›, ‹ Warranty Claim ›, ‹ Project ›, ‹ Pricing Rule ›, ‹ Subscription ›, ‹ Party Specific Item ›, ‹ Sepa Mandate ›]
doc = <Customer: Magalie Fernandes>
meta = <Meta: Customer>
links = {‹ heatmap ›: True, ‹ heatmap_message ›: ‹ Basé sur les transactions avec ce client. Voir la chronologie ci-dessous pour plus de détails ›, ‹ fieldname ›: ‹ customer ›, ‹ non_standard_fieldnames ›: {‹ Payment Entry ›: ‹ party ›, ‹ Quotation ›: ‹ party_name ›, ‹ Opportunity ›: ‹ party_name ›, ‹ Contract ›: ‹ party_name ›, ‹ Bank Account ›: ‹ party ›, ‹ Party Specific Item ›: ‹ party ›}, ‹ dynamic_links ›: {‹ party_name ›: [‹ Customer ›, ‹ quotation_to ›], ‹ party ›: [‹ Customer ›, ‹ party_type ›]}, ‹ transactions ›: [{‹ label ›: ‹ Prévente ›, ‹ items ›: [‹ Opportunity ›, ‹ Quotation ›, ‹ Contract ›]}, {‹ label ›: ‹ Commandes ›, ‹ items ›: [‹ Sales Order ›, ‹ Delivery Note ›, ‹ Sales Invoice ›]}, {‹ label ›: ‹ Paiements ›, ‹ items ›: [‹ Payment Entry ›, ‹ Bank Account ›, ‹ Dunning ›]}, {‹ label ›: ‹ Support ›, ‹ items ›: [‹ Issue ›, ‹ Maintenance Visit ›, ‹ Installation Note ›, ‹ Warranty Claim ›]}, {‹ label ›: ‹ Projets ›, ‹ items ›: [‹ Project ›]}, {‹ label ›: ‹ Tarification ›, ‹ items ›: [‹ Pricing Rule ›]}, {‹ label ›: ‹ Abonnements ›, ‹ items ›: [‹ Subscription ›]}, {‹ label ›: ‹ Allowed Items ›, ‹ items ›: [‹ Pa…
out = {‹ count ›: {‹ external_links_found ›: [{‹ doctype ›: ‹ Opportunity ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Quotation ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Contract ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Sales Order ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Delivery Note ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Sales Invoice ›, ‹ count ›: 1, ‹ open_count ›: 0, ‹ docname ›: ‹ ACC-SINV-2025-00175 ›}, {‹ doctype ›: ‹ Payment Entry ›, ‹ count ›: 1, ‹ open_count ›: 0, ‹ docname ›: ‹ ACC-PAY-2025-00275 ›}, {‹ doctype ›: ‹ Bank Account ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Dunning ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Issue ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Maintenance Visit ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Installation Note ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}, {‹ doctype ›: ‹ Warranty Claim ›, ‹ count ›: 0, ‹ open_count ›: 0, …
d = ‹ Sepa Mandate ›
internal_link_for_doctype = None
external_links_data_for_d = {‹ doctype ›: ‹ Sepa Mandate ›, ‹ count ›: 0, ‹ open_count ›: 0, ‹ docname ›: ‹ ›}
module = <module ‹ erpnext.selling.doctype.customer.customer › from ‹ apps/erpnext/erpnext/selling/doctype/customer/customer.py ›>
File « apps/erpnext/erpnext/selling/doctype/customer/customer.py », line 900, in get_timeline_data
return get_timeline_data(
doctype = ‹ Customer ›
name = ‹ Magalie Fernandes ›
get_timeline_data = <function get_timeline_data at 0x7f9b5f482de0>
File « apps/erpnext/erpnext/accounts/party.py », line 881, in get_timeline_data
if not frappe.has_permission(doctype, « read »):
doctype = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
name = ‹ Magalie Fernandes ›
included_doctypes = [{‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}, {‹ name ›: ‹ Sales Order ›, ‹ datefield ›: ‹ transaction_date ›}, {‹ name ›: ‹ Delivery Note ›, ‹ datefield ›: ‹ posting_date ›}, {‹ name ›: ‹ Sales Invoice ›, ‹ datefield ›: ‹ posting_date ›}]
get_communication_data = <function get_communication_data at 0x7f9b9dd2d080>
out = {}
after = ‹ 2024-07-07 ›
communication_data = ((datetime.datetime(2024, 10, 25, 12, 54, 7, 394635), 10), (None, 0))
data = [(datetime.datetime(2024, 10, 25, 12, 54, 7, 394635), 10), (None, 0)]
File « apps/frappe/frappe/init.py », line 1068, in has_permission
out = frappe.permissions.has_permission(
doctype = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
ptype = ‹ read ›
doc = None
user = None
throw = False
parent_doctype = None
debug = False
frappe = <module ‹ frappe › from ‹ apps/frappe/frappe/init.py ›>
File « apps/frappe/frappe/permissions.py », line 51, in inner
result = func(args, **kwargs)
args = ({‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}, ‹ read ›)
kwargs = {‹ doc ›: None, ‹ user ›: None, ‹ print_logs ›: False, ‹ parent_doctype ›: None, ‹ debug ›: False}
print_logs = False
self_perm_check = True
func = <function has_permission at 0x7f9b9e7505e0>
File « apps/frappe/frappe/permissions.py », line 129, in has_permission
meta = frappe.get_meta(doctype)
doctype = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
ptype = ‹ read ›
doc = None
user = ‹ jerome.ruchou@gmail.com ›
parent_doctype = None
print_logs = False
debug = False
File « apps/frappe/frappe/init.py », line 1352, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
doctype = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
cached = True
frappe = <module ‹ frappe › from ‹ apps/frappe/frappe/init.py ›>
File « apps/frappe/frappe/model/meta.py », line 64, in get_meta
meta = Meta(doctype)
doctype = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
cached = False
File « apps/frappe/frappe/model/meta.py », line 119, in init
super().init(« DocType », doctype)
self = <Meta: {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}>
doctype = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
class = <class ‹ frappe.model.meta.Meta ›>
File « apps/frappe/frappe/model/document.py », line 126, in init
self.load_from_db()
self = <Meta: {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}>
args = (‹ DocType ›, {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›})
kwargs = {}
class = <class ‹ frappe.model.document.Document ›>
File « apps/frappe/frappe/model/meta.py », line 125, in load_from_db
super().load_from_db()
self = <Meta: {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}>
class = <class ‹ frappe.model.meta.Meta ›>
File « apps/frappe/frappe/model/document.py », line 167, in load_from_db
d = frappe.db.get_value(
self = <Meta: {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}>
get_value_kwargs = {‹ for_update ›: None, ‹ as_dict ›: True}
class = <class ‹ frappe.model.document.Document ›>
File « apps/frappe/frappe/database/database.py », line 511, in get_value
result = self.get_values(
self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f9b5f25ff90>
doctype = ‹ DocType ›
filters = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
fieldname = ' ›
ignore = None
as_dict = True
debug = False
order_by = ‹ KEEP_DEFAULT_ORDERING ›
cache = False
for_update = None
run = True
pluck = False
distinct = False
skip_locked = False
wait = True
File « apps/frappe/frappe/database/database.py », line 615, in get_values
out = self._get_values_from_table(
self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f9b5f25ff90>
doctype = ‹ DocType ›
filters = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
fieldname = '’
ignore = None
as_dict = True
debug = False
order_by = ‹ modified ›
update = None
cache = False
for_update = None
run = True
pluck = False
distinct = False
limit = 1
skip_locked = False
wait = True
out = None
fields = '’
File « apps/frappe/frappe/database/database.py », line 888, in _get_values_from_table
return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f9b5f25ff90>
fields = '’
filters = {‹ name ›: ‹ Quotation ›, ‹ datefield ›: ‹ transaction_date ›}
doctype = ‹ DocType ›
as_dict = True
debug = False
order_by = ‹ modified ›
update = None
for_update = None
skip_locked = False
wait = True
run = True
pluck = False
distinct = False
limit = 1
query = SELECT * FROM tabDocType
WHERE name
=‹ Quotation › AND datefield
=‹ transaction_date › ORDER BY modified
DESC LIMIT 1
File « apps/frappe/frappe/query_builder/utils.py », line 84, in execute_query
result = frappe.db.sql(query, params, *args, *kwargs) # nosemgrep
query = ‹ SELECT * FROM tabDocType
WHERE name
=%(param1)s AND datefield
=%(param2)s ORDER BY modified
DESC LIMIT 1 ›
args = ()
kwargs = {‹ as_dict ›: True, ‹ debug ›: False, ‹ update ›: None, ‹ run ›: True, ‹ pluck ›: False}
child_queries = []
params = {‹ param1 ›: ‹ Quotation ›, ‹ param2 ›: ‹ transaction_date ›}
execute_child_queries = <function patch_query_execute..execute_child_queries at 0x7f9ba05c8cc0>
prepare_query = <function patch_query_execute..prepare_query at 0x7f9ba0507740>
File « apps/frappe/frappe/database/database.py », line 226, in sql
self._cursor.execute(query, values)
self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f9b5f25ff90>
query = 'SELECT * FROM tabDocType
WHERE name
=%(param1)s AND datefield
=%(param2)s ORDER BY modified
DESC LIMIT 1 / FRAPPE_TRACE_ID: f93ae524-6b13-40ed-bfdf-97a5ffb0b448 /’
values = {‹ param1 ›: ‹ Quotation ›, ‹ param2 ›: ‹ transaction_date ›}
as_dict = True
as_list = 0
debug = False
ignore_ddl = 0
auto_commit = 0
update = None
explain = False
run = True
pluck = False
as_iterator = False
trace_id = ‹ f93ae524-6b13-40ed-bfdf-97a5ffb0b448 ›
File « env/lib/python3.11/site-packages/pymysql/cursors.py », line 153, in execute
result = self._query(query)
self = <pymysql.cursors.Cursor object at 0x7f9b7d818410>
query = "SELECT * FROM tabDocType
WHERE name
=‹ Quotation › AND datefield
=‹ transaction_date › ORDER BY modified
DESC LIMIT 1 / FRAPPE_TRACE_ID: f93ae524-6b13-40ed-bfdf-97a5ffb0b448 /"
args = {‹ param1 ›: ‹ Quotation ›, ‹ param2 ›: ‹ transaction_date ›}
File « env/lib/python3.11/site-packages/pymysql/cursors.py », line 322, in _query
conn.query(q)
self = <pymysql.cursors.Cursor object at 0x7f9b7d818410>
q = "SELECT * FROM tabDocType
WHERE name
=‹ Quotation › AND datefield
=‹ transaction_date › ORDER BY modified
DESC LIMIT 1 / FRAPPE_TRACE_ID: f93ae524-6b13-40ed-bfdf-97a5ffb0b448 /"
conn = <pymysql.connections.Connection object at 0x7f9b57eb2950>
File « env/lib/python3.11/site-packages/pymysql/connections.py », line 558, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
self = <pymysql.connections.Connection object at 0x7f9b57eb2950>
sql = b"SELECT * FROM tabDocType
WHERE name
=‹ Quotation › AND datefield
=‹ transaction_date › ORDER BY modified
DESC LIMIT 1 / FRAPPE_TRACE_ID: f93ae524-6b13-40ed-bfdf-97a5ffb0b448 */"
unbuffered = False
File « env/lib/python3.11/site-packages/pymysql/connections.py », line 822, in _read_query_result
result.read()
self = <pymysql.connections.Connection object at 0x7f9b57eb2950>
unbuffered = False
result = <pymysql.connections.MySQLResult object at 0x7f9b5c4dddd0>
File « env/lib/python3.11/site-packages/pymysql/connections.py », line 1200, in read
first_packet = self.connection._read_packet()
self = <pymysql.connections.MySQLResult object at 0x7f9b5c4dddd0>
File « env/lib/python3.11/site-packages/pymysql/connections.py », line 772, in _read_packet
packet.raise_for_error()
self = <pymysql.connections.Connection object at 0x7f9b57eb2950>
packet_type = <class ‹ pymysql.protocol.MysqlPacket ›>
buff = bytearray(b"\xff\x1e\x04#42S22Unknown column 'datefield' in 'WHERE'« )
packet_header = b’.\x00\x00\x01’
btrl = 46
btrh = 0
packet_number = 1
bytes_to_read = 46
recv_data = b »\xff\x1e\x04#42S22Unknown column ‹ datefield › in ‹ WHERE ›"
packet = <pymysql.protocol.MysqlPacket object at 0x7f9b5e1b9300>
File « env/lib/python3.11/site-packages/pymysql/protocol.py », line 221, in raise_for_error
err.raise_mysql_exception(self._data)
self = <pymysql.protocol.MysqlPacket object at 0x7f9b5e1b9300>
errno = 1054
File « env/lib/python3.11/site-packages/pymysql/err.py », line 143, in raise_mysql_exception
raise errorclass(errno, errval)
data = b"\xff\x1e\x04#42S22Unknown column ‹ datefield › in ‹ WHERE ›"
errno = 1054
errval = « Unknown column ‹ datefield › in ‹ WHERE › »
errorclass = <class ‹ pymysql.err.OperationalError ›>
pymysql.err.OperationalError: (1054, « Unknown column ‹ datefield › in ‹ WHERE › »)