refactor!: Remove custom cashflow report mapper (#35523)

* refactor: Remove custom cashflow mapper

* chore: patch to delete docs

* fix: Cleanup defaults during install

* fix: Remove custom cashflow mapper from consolidated financial statement
This commit is contained in:
Deepesh Garg
2023-06-02 17:48:59 +05:30
committed by GitHub
parent f11d9b019d
commit abc6fe0b06
31 changed files with 8 additions and 1679 deletions

View File

@@ -8,7 +8,6 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to
from frappe.utils import cint
from erpnext.accounts.doctype.cash_flow_mapper.default_cash_flow_mapper import DEFAULT_MAPPERS
from erpnext.setup.default_energy_point_rules import get_default_energy_point_rules
from erpnext.setup.doctype.incoterm.incoterm import create_incoterms
@@ -23,7 +22,6 @@ def after_install():
set_single_defaults()
create_print_setting_custom_fields()
add_all_roles_to("Administrator")
create_default_cash_flow_mapper_templates()
create_default_success_action()
create_default_energy_point_rules()
create_incoterms()
@@ -116,13 +114,6 @@ def create_print_setting_custom_fields():
)
def create_default_cash_flow_mapper_templates():
for mapper in DEFAULT_MAPPERS:
if not frappe.db.exists("Cash Flow Mapper", mapper["section_name"]):
doc = frappe.get_doc(mapper)
doc.insert(ignore_permissions=True)
def create_default_success_action():
for success_action in get_default_success_action():
if not frappe.db.exists("Success Action", success_action.get("ref_doctype")):