fix(erpsetup): intake marker links to the mail
ci / shared (pull_request) Successful in 14s
ci / test (pull_request) Successful in 25m31s
ci / image (pull_request) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-10-20 09:23:53 +02:00
1 parent 5a6d9d26aa
commit 433baf3740
2 files changed
+6 -3

No files matched your search

+5 -2
View File
@@ -29,9 +29,12 @@ const (
)
func intakeFields() []map[string]any {
pi := customField("Purchase Invoice", "intake_communication", "Aus E-Mail", "Data", "bill_date", true)
ei := customField("E Invoice Import", "intake_communication", "Aus E-Mail", "Data", "einvoice", true)
// A Link, so the draft leads to the mail. Frappe stores an empty unique
// field as NULL, so hand-made invoices without a mail don't collide.
pi := customField("Purchase Invoice", "intake_communication", "Aus E-Mail", "Link", "bill_date", true)
ei := customField("E Invoice Import", "intake_communication", "Aus E-Mail", "Link", "einvoice", true)
for _, f := range []map[string]any{pi, ei} {
f["options"] = "Communication"
f["read_only"] = 1
f["description"] = "Vom Rechnungseingang gesetzt: die E-Mail (Communication), aus der dieser Entwurf stammt. Nicht ändern."
}
+1 -1
View File
@@ -16,7 +16,7 @@ func TestIntakeSetup(t *testing.T) {
}
for _, name := range []string{"Purchase Invoice-intake_communication", "E Invoice Import-intake_communication"} {
cf := f.docs["Custom Field"][name]
if cf == nil || cf["unique"] != float64(1) || cf["read_only"] != float64(1) {
if cf == nil || cf["unique"] != float64(1) || cf["read_only"] != float64(1) || cf["fieldtype"] != "Link" || cf["options"] != "Communication" {
t.Errorf("custom field %s: %v", name, cf)
}
}