Skip to content

[T3646] FIX: own layout for GMC S10 child letters, no translation over page 2's printed text - #2213

Merged
Danielgergely merged 1 commit into
18.0from
T3646-b2s-s10-layout
Nov 16, 2026
Merged

Danielgergely merged 1 commit into
18.0from
T3646-b2s-s10-layout

Conversation

@Danielgergely

Copy link
Copy Markdown
Member

Problem
Many child letters arrive on GMC's S10 stationery (XX-C-1S10-2 "Thanks!" card, XX-G-1S10-1 activity sheet). Odoo only reads the layout digit from GMC's code, so these get the L1 layout. On this stationery, L1's page-2 translation box lands on printed text, so a translation that overflows page 1 is printed over it (e.g. letter 653407).

Fix

  • New layout B2S - S10: page 1 as L1, page 2 without a translation box, so the overflow goes to the additional translation page.
  • json_to_data maps GMC codes containing -1S10- to it.
  • Migration 18.0.1.0.8 moves only the existing S10 letters that have translation text on page 2

@Danielgergely

Copy link
Copy Markdown
Member Author

tested on stage

@Danielgergely
Danielgergely marked this pull request as ready for review November 16, 2026 15:35
@Danielgergely
Danielgergely merged commit f8ae8e3 into 18.0 Nov 16, 2026
1 check passed
@Danielgergely
Danielgergely deleted the T3646-b2s-s10-layout branch November 16, 2026 15:35
@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches the S10 child-letter import, printing, and upgrade workflows.

Fix the migration's per-letter matching before merging.

Findings

  1. P1 Migration changes unrelated letters ▶

Reviews (1) · Last reviewed commit: "[T3646] FIX: own layout for GMC S10 chil..." · Reviewed by Greptile

Comment on lines +12 to +18
messages = env["gmc.message"].search([("content", "like", "-1S10-")])
messages = messages.filtered(lambda m: m.action_id.model == "correspondence")
letter_ids = [
int(letter_id)
for message in messages
for letter_id in (message.object_ids or str(message.object_id)).split(",")
if letter_id.strip().isdigit()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Migration changes unrelated letters. The search matches an entire message, then collects every ID in its object_ids. But process_commkit supports a Responses batch and returns all its letter IDs. If a batch contains both S10 and ordinary L1 letters, ordinary L1 letters with page-2 translations also get moved to the S10 layout. Their valid page-2 translation area is removed, and their text moves to an extra page when composed. Parse each response's Template and match only its own letter before changing template_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant