2021-04-08 14:31:00 +00:00
|
|
|
# Copyright (c) 2019, Frappe and Contributors
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
|
|
|
|
import frappe
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2021-04-08 14:31:00 +00:00
|
|
|
from erpnext.regional.germany.setup import make_custom_fields
|
|
|
|
|
2021-04-08 14:57:20 +00:00
|
|
|
|
2021-04-08 14:31:00 +00:00
|
|
|
def execute():
|
2021-04-08 14:57:20 +00:00
|
|
|
"""Execute the make_custom_fields method for german companies.
|
|
|
|
|
|
|
|
It is usually run once at setup of a new company. Since it's new, run it
|
|
|
|
once for existing companies as well.
|
|
|
|
"""
|
2021-04-08 14:31:00 +00:00
|
|
|
company_list = frappe.get_all("Company", filters={"country": "Germany"})
|
|
|
|
if not company_list:
|
|
|
|
return
|
|
|
|
|
|
|
|
make_custom_fields()
|