From 25671003d3f5da3a0ea0f726f1eff322c9fde046 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 9 May 2023 13:00:05 +0200 Subject: [PATCH] feat: remove transaction logs --- erpnext_germany/__init__.py | 26 -------------------------- erpnext_germany/hooks.py | 5 +---- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/erpnext_germany/__init__.py b/erpnext_germany/__init__.py index 05f6c77..81f0fde 100644 --- a/erpnext_germany/__init__.py +++ b/erpnext_germany/__init__.py @@ -1,27 +1 @@ __version__ = "0.0.4" - -import frappe -from frappe import _ - -from erpnext import get_region - - -def create_transaction_log(doc, method): - """ - Appends the transaction to a chain of hashed logs for legal resons. - Called on submit of Sales Invoice and Payment Entry. - """ - region = get_region() - if region != "Germany": - return - - data = str(doc.as_dict()) - - frappe.get_doc( - { - "doctype": "Transaction Log", - "reference_doctype": doc.doctype, - "document_name": doc.name, - "data": data, - } - ).insert(ignore_permissions=True) diff --git a/erpnext_germany/hooks.py b/erpnext_germany/hooks.py index fc23d57..8d36a66 100644 --- a/erpnext_germany/hooks.py +++ b/erpnext_germany/hooks.py @@ -117,10 +117,7 @@ # } # } -doc_events = { - "Sales Invoice": {"on_submit": "erpnext_germany.create_transaction_log"}, - "Payment Entry": {"on_submit": "erpnext_germany.create_transaction_log"}, -} +# doc_events = {} # Scheduled Tasks # ---------------