...
This commit is contained in:
@@ -4,7 +4,7 @@ from frappe import _
|
||||
|
||||
@frappe.whitelist()
|
||||
def sync_custom_fields_to_woocommerce(item_code):
|
||||
"""Sync Custom Fields vom Item nach WooCommerce ACF (dynamisch)"""
|
||||
"""Sync Custom Fields vom Item nach WooCommerce ACF (dynamisch aus DocType)"""
|
||||
|
||||
if not item_code:
|
||||
frappe.throw(_("Kein Item Code angegeben"))
|
||||
@@ -18,7 +18,7 @@ def sync_custom_fields_to_woocommerce(item_code):
|
||||
frappe.msgprint(_("Item hat keine verknüpften WooCommerce Server"), indicator="orange")
|
||||
return False
|
||||
|
||||
# Dynamisches Mapping aus DocType laden
|
||||
# Dynamisches Mapping aus DocType "WooCommerce ACF Mapping"
|
||||
field_mapping = {}
|
||||
mappings = frappe.get_all("WooCommerce ACF Mapping",
|
||||
filters={"enabled": 1},
|
||||
@@ -29,8 +29,7 @@ def sync_custom_fields_to_woocommerce(item_code):
|
||||
field_mapping[m.erp_field] = m.acf_field
|
||||
|
||||
if not field_mapping:
|
||||
frappe.msgprint(_("Keine aktivierten Mappings im DocType 'WooCommerce ACF Mapping' gefunden."),
|
||||
indicator="orange")
|
||||
frappe.msgprint(_("Keine aktivierten Mappings im DocType 'WooCommerce ACF Mapping' gefunden."), indicator="orange")
|
||||
return False
|
||||
|
||||
success_count = 0
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
app_name = "erpnext_custom"
|
||||
app_title = "NEXTErp Custom"
|
||||
app_publisher = "Jens Falk"
|
||||
app_description = "Custom Extensions für NEXTErp - WooCommerce ACF Sync"
|
||||
app_description = "Custom Extensions für NEXTErp mit WooCommerce ACF Sync"
|
||||
app_email = "jens@falk.plus"
|
||||
app_license = "MIT"
|
||||
app_license = "MIT"
|
||||
|
||||
fixtures = []
|
||||
Reference in New Issue
Block a user