From 486a8b5b02672775dd2df0daee47c4fefd2063bf Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Wed, 2 Nov 2022 12:48:31 +0100 Subject: [PATCH] fix: Employee Health Insurance depends on HRMS --- README.md | 2 ++ erpnext_germany/install.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 0bdc076..d406c90 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ App to hold regional code for Germany, built on top of ERPNext. - List of religios denominations ("Konfessionen") - List of German health insurance providers + Requires [HRMS](https://github.com/frappe/hrms) to be installed first. + ## Installation ### On Frappe Cloud diff --git a/erpnext_germany/install.py b/erpnext_germany/install.py index 82e2707..f1af710 100644 --- a/erpnext_germany/install.py +++ b/erpnext_germany/install.py @@ -17,6 +17,9 @@ def import_data(): ("Religious Denomination", "religious_denomination.csv"), ("Employee Health Insurance", "employee_health_insurance.csv"), ): + if not frappe.db.exists("DocType", doctype): + continue + path = frappe.get_app_path("erpnext_germany", "data", filename) import_csv(doctype, path)