The letter head step also compares source and footer_source (want: HTML/HTML).
ensureFields treats <tbody>/</tbody> as equal (Frappe's HTML editor adds them on a UI save).
Why
Live ERPNext letter head BreakPilot (last saved 2026-10-06 09:19 in the UI): source = Image, so documents use an image header instead of our HTML one, plus <tbody> in content and footer. The dry run showed letter head → would update on every run, and an apply would not have restored source.
Test plan
New test: tbody-only difference → exists; source Image → restored to HTML.
Existing erpsetup tests.
User: dry run shows letter head → would update once, apply, then exists; check one invoice PDF shows the HTML header.
Risk
Blast radius: Letter Head BreakPilot only (source fields). Rollback: set source back in the UI.
## What
- The letter head step also compares `source` and `footer_source` (want: HTML/HTML).
- `ensureFields` treats `<tbody>`/`</tbody>` as equal (Frappe's HTML editor adds them on a UI save).
## Why
Live ERPNext letter head `BreakPilot` (last saved 2026-10-06 09:19 in the UI): `source = Image`, so documents use an image header instead of our HTML one, plus `<tbody>` in content and footer. The dry run showed `letter head → would update` on every run, and an apply would not have restored `source`.
## Test plan
- [x] New test: tbody-only difference → `exists`; source Image → restored to HTML.
- [x] Existing erpsetup tests.
- [ ] User: dry run shows `letter head → would update` once, apply, then `exists`; check one invoice PDF shows the HTML header.
## Risk
**Blast radius:** Letter Head `BreakPilot` only (source fields). **Rollback:** set source back in the UI.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
The live letter head had source "Image" (saved in the UI on 2026-10-06), so
documents printed an image header instead of the HTML one. erpsetup compared
only content and footer and would never have put it back; it now also
compares source and footer_source.
The same UI save wrapped the table rows in <tbody>, which made content and
footer look changed on every run. Field comparison now ignores <tbody>.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang
merged commit 271c23e5f2 into main2026-10-13 09:23:41 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
sourceandfooter_source(want: HTML/HTML).ensureFieldstreats<tbody>/</tbody>as equal (Frappe's HTML editor adds them on a UI save).Why
Live ERPNext letter head
BreakPilot(last saved 2026-10-06 09:19 in the UI):source = Image, so documents use an image header instead of our HTML one, plus<tbody>in content and footer. The dry run showedletter head → would updateon every run, and an apply would not have restoredsource.Test plan
exists; source Image → restored to HTML.letter head → would updateonce, apply, thenexists; check one invoice PDF shows the HTML header.Risk
Blast radius: Letter Head
BreakPilotonly (source fields). Rollback: set source back in the UI.🤖 Generated with Claude Code
https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB