diff --git a/sbc_compassion/models/correspondence.py b/sbc_compassion/models/correspondence.py index 8744cd3bc..aa17059c7 100644 --- a/sbc_compassion/models/correspondence.py +++ b/sbc_compassion/models/correspondence.py @@ -1364,6 +1364,8 @@ def check_postponed_christmas_letters(self): ("kit_identifier", "=", False), ("state", "=", "Exception"), ("on_hold", "=", True), + # Released with the project reactivation instead + ("child_id.project_id.hold_s2b_letters", "!=", True), ] ) correspondences.reactivate_letters(_("Christmas period started")) diff --git a/thankyou_letters/models/account_move_line.py b/thankyou_letters/models/account_move_line.py index 8cb1bc28d..08794182a 100644 --- a/thankyou_letters/models/account_move_line.py +++ b/thankyou_letters/models/account_move_line.py @@ -102,7 +102,14 @@ def generate_thank_you(self): all_thanks_config_ids = ( self.env["partner.communication.config"] - .search([("send_mode_pref_field", "like", "thankyou_preference")]) + .search( + [ + ("send_mode_pref_field", "like", "thankyou_preference"), + # Other configs (e.g. third party letters on res.partner) + # share the preference field but not the model. + ("model_id.model", "=", self._name), + ] + ) .ids )