2018-02-21 05:37:33 +00:00
|
|
|
# Copyright (c) 2018, Frappe Technologies and contributors
|
|
|
|
# For license information, please see license.txt
|
|
|
|
|
2019-01-22 12:52:20 +00:00
|
|
|
from __future__ import unicode_literals
|
2018-02-21 05:37:33 +00:00
|
|
|
import frappe
|
|
|
|
from frappe import _
|
|
|
|
from erpnext import get_region
|
|
|
|
|
|
|
|
def create_transaction_log(doc, method):
|
|
|
|
region = get_region()
|
|
|
|
if region not in ["France"]:
|
|
|
|
return
|
|
|
|
else:
|
|
|
|
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)
|
|
|
|
|
|
|
|
# don't remove this function it is used in tests
|
|
|
|
def test_method():
|
|
|
|
'''test function'''
|
|
|
|
return 'overridden'
|