-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afeea13
commit 2567100
Showing
2 changed files
with
1 addition
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters