fix(erpsetup): intake marker links to the mail
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5a6d9d26aa
commit
433baf3740
2 files changed
+6
-3
No files matched your search
@@ -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."
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user