README.md aktualisiert

This commit is contained in:
2026-06-08 15:27:31 +02:00
parent e4eadb5fc7
commit 6acc7753f8
+43 -4
View File
@@ -18,10 +18,10 @@ bench new-app erpnext_custom
Bei den Fragen: Bei den Fragen:
App Title: NEXTErp Custom - App Title: NEXTErp Custom
App Description: WooCommerce ACF Custom Fields Sync - App Description: WooCommerce ACF Custom Fields Sync
App Publisher: Jens Falk - App Publisher: Jens Falk
App Email: service@falk.plus - App Email: service@falk.plus
```bash ```bash
cd ~/frappe-bench/apps/erpnext_custom/erpnext_custom cd ~/frappe-bench/apps/erpnext_custom/erpnext_custom
@@ -104,3 +104,42 @@ Danach ausführen
```bash ```bash
bench restart bench restart
``` ```
### 2. DocType anlegen
DocType Name: WooCommerce ACF Mapping
**Felder:**
- erp_field → Data → Pflicht
- acf_field → Data → Pflicht
- enabled → Check → Default = 1
- description → Small Text
**Title Field:** erp_field
### Client Script mit Button
Custom Script → New
- DocType: Item
- Script Type: Client Script
```js
frappe.ui.form.on('Item', {
refresh: function(frm) {
frm.add_custom_button('Custom Fields zu WooCommerce syncen', function() {
if (!frm.doc.woocommerce_servers || frm.doc.woocommerce_servers.length === 0) {
frappe.msgprint("Kein WooCommerce Server verknüpft!", "Warnung");
return;
}
frappe.call({
method: 'erpnext_custom.api.sync_custom_fields_to_woocommerce',
args: { item_code: frm.doc.name }
});
}, "WooCommerce");
}
});
```