Repository navigation
Conversation
Merging a second pending gift (same sponsorship, type and year) read other_gift_vals["instructions"], which gift creation from a payment never provides: the gift job failed with KeyError and the gift was never created. Also decorate account.move.line.create with api.model_create_multi.
New journal item field gift_instructions ("Gift message"), copied into the
gift's instructions when the gift is created from a payment line.
Contract fields (e.g. in the reconcile view) only searched the contract reference, while the contract name shows the sponsor ref and the child code: typing what is displayed found nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[T3675] Reconcile view: no thank-you letter, ambassador, gift message
This ticket is part of the ticket T3268 which include this one.
Related PR
CompassionCH/compassion-accounting#300
Problem
In the bank reconciliation view (Manual operation tab), a payment booked on a donation or gift product could not be kept from getting a thank-you letter, could not get an ambassador, and could not carry a message for the child's gift. The Contract field also found nothing when typing the sponsor number or the child code it displays.
While analysing it, a bug showed up: when a second gift arrives for the same sponsorship, gift type and year while the first one is still a draft, the gift job fails with
KeyError: 'instructions'and the second gift is never created.Changes
gift_compassion(18.0.1.0.1):other_gift_vals.get("instructions")): fixes the failed gift job.gift_instructions), copied into the gift's instructions when the gift is created from a payment line. Merged gifts join the messages with "; ".account.move.line.createdecorated withapi.model_create_multi.tests/test_gift_from_payment.py(merge without message, message from the payment line, two payments merged). They use an existing active sponsorship of the database and skip themselves when there is none.sponsorship_compassion:_rec_names_search). This applies to every Contract field.account_reconcile_compassion_ce(18.0.1.0.1, now depends oncrm_compassion):avoid_thankyou_letter, saved before the lines are created, read-only once reconciled.user_id). Prefilled with the contract's ambassador when a contract is chosen or found from the gift QRR reference.Not in this PR
Tests
After deployment
Upgrade
gift_compassionandaccount_reconcile_compassion_ce(new field, view and style). Thesponsorship_compassionchange only needs the server restart.