[T3236] FIX: gift recipient dropdown must only show accepted sponsorships#336
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a helper method _get_gift_eligible_sponsorships to filter sponsorships eligible for gifts and adds validation to ensure the recipient is valid and eligible, raising a BadRequest otherwise. The review feedback suggests changing _get_gift_eligible_sponsorships from a static method to an instance method to support Odoo's inheritance, and adding an optional partner parameter to _extract_donation_order_line_fields to allow correct validation when editing order lines for different partners.
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.
- STYLE: pre commit fix from previous change
|
@NoeBerdoz |
Proposed children (sub-sponsorships not yet accepted by the sponsor) are now not selectabel as gift recipients on the donation pages.