debug: log raw e-taxes payload to Error Log before sending

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ali 2026-04-01 14:13:52 +04:00
parent 731f020d6d
commit a7e6d697c5
1 changed files with 5 additions and 0 deletions

View File

@ -566,6 +566,11 @@ def create_invoice_on_etaxes(token, payload, serial_number):
headers = DEFAULT_HEADERS.copy() headers = DEFAULT_HEADERS.copy()
headers["x-authorization"] = f"Bearer {token}" headers["x-authorization"] = f"Bearer {token}"
frappe.log_error(
json.dumps(payload, indent=2, ensure_ascii=False),
"E-Taxes Send Payload DEBUG"
)
response = requests.post( response = requests.post(
INVOICE_URL, INVOICE_URL,
data=json.dumps(payload), data=json.dumps(payload),