brotherton-erpnext/erpnext/patches/v13_0/germany_make_custom_fields.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
510 B
Python
Raw Normal View History

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-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()