Skip to content

T0492 sponsorship qr code - #2121

Open
Danielgergely wants to merge 3 commits into
18.0from
T0492-sponsorship-qr-code
Open

T0492 sponsorship qr code#2121
Danielgergely wants to merge 3 commits into
18.0from
T0492-sponsorship-qr-code

Conversation

@Danielgergely

Copy link
Copy Markdown
Member
  • Port the v14 childpack QR concept (child_switzerland) into the shared child_compassion core so the Nordic v18 instance gets it.
  • Adds a computed qr_code_data on compassion.child linking to /my2/new-sponsorship/ and renders it on the small (A4) childpack.
  • Optional qr code on full and small child packs

- Port the v14 childpack QR concept (child_switzerland) into the shared child_compassion core so the Nordic v18 instance gets it.
- Adds a computed qr_code_data on compassion.child linking to /my2/new-sponsorship/<id> and renders it on the small (A4) childpack.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@Danielgergely

Copy link
Copy Markdown
Member Author

Related PR
CompassionCH/compassion-switzerland#1780

Comment thread child_compassion/__manifest__.py
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

T-Rex T-Rex Logs

What T-Rex did

  • I compared the baseline state in the before log to confirm there was no QR compute, wizard option, conditional report image, or full/small optional behavior.
  • I compared the after state in the after log and confirmed valid decoded PNG signatures, the sponsorship path /my2/new-sponsorship/321, correct default and overridden UTMs, and QR node counts of 1 and 0 for the two report types.
  • I noted that runtime availability and the reusable fallback harness are preserved separately, and that the evidence relies on partial source-backed execution rather than a fabricated QWeb/PDF capture.
  • I prepared and linked artifacts to support review, aligning each artifact with the corresponding proof.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
child_compassion/models/child_compassion.py Adds a context-aware computed QR image containing the child-specific sponsorship URL.
child_compassion/report/childpack.xml Conditionally renders the generated QR image in the child-pack report.
child_compassion/wizards/print_childpack.py Adds the QR-printing option and forwards it to the report data.
child_compassion/views/print_childpack_view.xml Exposes the QR option for the supported full and small child-pack types.
child_compassion/manifest.py Declares PyQRCode and PyPNG using their Odoo 18-compatible distribution names.
requirements.txt Adds the QR-generation packages to the environment requirements.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Print child-pack wizard] -->|print_qr| B[Child-pack report]
  B -->|when enabled| C[Compute child qr_code_data]
  C --> D[Build sponsorship URL with UTM parameters]
  D --> E[Generate base64 PNG]
  E --> F[Render QR image in child pack]
Loading

Reviews (2): Last reviewed commit: "[T0492] STYLE: pre-commit" | Re-trigger Greptile

@Danielgergely

Copy link
Copy Markdown
Member Author

@greptile review
pypng is resolved on the first line — importlib.metadata.version("pypng") returns
0.20220715.0 — and passes with no ImportError. Verified: -u child_compassion installs cleanly with pypng declared.

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