Skip to content

T3271 - FIX Wrong message at sponsorship creation#2106

Open
danpa32 wants to merge 1 commit into
18.0from
T3271-FIX-Wrong-message-at-sponsorship-creation
Open

T3271 - FIX Wrong message at sponsorship creation#2106
danpa32 wants to merge 1 commit into
18.0from
T3271-FIX-Wrong-message-at-sponsorship-creation

Conversation

@danpa32

@danpa32 danpa32 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The bug was in the @api.depends decorator (line 507) — it only lists payment_mode_id but the compute body also reads child_id, birthday_invoice, and christmas_invoice. So when you add a child on a new form, the compute doesn't re-run, is_gift_authorized stays False from the previous run, and the view shows the warning even though no annual gift is set.

…e_id but the compute body also reads child_id, birthday_invoice, and christmas_invoice. So when you add a child on a new form, the compute doesn't re-run, is_gift_authorized stays False from the previous run, and th view shows the warning even though no annual gift is set.
@danpa32 danpa32 requested review from NoeBerdoz and ecino June 26, 2026 07:08

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the @api.depends decorator for the _compute_is_gift_auth method in sponsorship_compassion/models/contracts.py to include additional dependencies: child_id, birthday_invoice, and christmas_invoice. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

Safe to merge.

The change is narrowly scoped to compute dependencies for an existing sponsorship field and does not alter the underlying business logic.

T-Rex T-Rex Logs

What T-Rex did

  • Observed that the initial base dependencies included only payment_mode_id.
  • Set child_id and observed that no onchange recompute was triggered, after_is_gift_authorized remained False, and after_warning_condition remained True.
  • Observed after setting child_id that the head dependencies expanded to include payment_mode_id, child_id, birthday_invoice, and christmas_invoice; recompute was triggered, after_is_gift_authorized became True, and after_warning_condition became False.
  • Both commands exited with status 0 and captured the full command, working directory, commit, executed source, scenario inputs, operation, and resulting values.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "The bug was in the @api.depends decorato..." | Re-trigger Greptile

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