README.md aktualisiert
This commit is contained in:
@@ -18,10 +18,10 @@ bench new-app erpnext_custom
|
||||
|
||||
Bei den Fragen:
|
||||
|
||||
App Title: NEXTErp Custom
|
||||
App Description: WooCommerce ACF Custom Fields Sync
|
||||
App Publisher: Jens Falk
|
||||
App Email: service@falk.plus
|
||||
- App Title: NEXTErp Custom
|
||||
- App Description: WooCommerce ACF Custom Fields Sync
|
||||
- App Publisher: Jens Falk
|
||||
- App Email: service@falk.plus
|
||||
|
||||
```bash
|
||||
cd ~/frappe-bench/apps/erpnext_custom/erpnext_custom
|
||||
@@ -104,3 +104,42 @@ Danach ausführen
|
||||
```bash
|
||||
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");
|
||||
}
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user