<commit_before>##############################################################################
#
#    Copyright (C) 2015 Compassion CH (http://www.compassion.ch)
#    Releasing children from poverty in Jesus' name
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __manifest__.py
#
##############################################################################

import logging
from datetime import datetime

from dateutil.relativedelta import relativedelta

from odoo.exceptions import UserError
from odoo.tools import mod10r
from odoo.addons.child_compassion.models.compassion_hold import HoldType
from odoo.addons.queue_job.job import job, related_action

from odoo import api, models, fields, _

logger = logging.getLogger(__name__)


class RecurringContracts(models.Model):
    _inherit = 'recurring.contract'

    first_open_invoice = fields.Date(compute='_compute_first_open_invoice')
    mandate_date = fields.Datetime(string='State last time mandate')
    has_mandate = fields.Boolean(compute='_compute_has_mandate')
    church_id = fields.Many2one(
        related='partner_id.church_id', readonly=True
    )
    previous_child_id = fields.Many2one(
        'compassion.child', 'Previous child', related='parent_id.child_id')
    is_already_a_sponsor = fields.Boolean(
        compute="_compute_already_a_sponsor", store=True)
    next_waiting_reminder = fields.Datetime(
        'Next reminder',
        compute='_compute_next_reminder', store=True
    )
    partner_lang = fields.Selection(
        'res.partner', 'Partner language', related='partner_id.lang',
        store=True)
    hillsong_ref = fields.Char(related='origin_id.hillsong_ref', store=True)
<commit_msg>fix flake<commit_after>##############################################################################
#
#    Copyright (C) 2015 Compassion CH (http://www.compassion.ch)
#    Releasing children from poverty in Jesus' name
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __manifest__.py
#
##############################################################################

import logging
from datetime import datetime

from dateutil.relativedelta import relativedelta

from odoo.exceptions import UserError
from odoo.tools import mod10r
from odoo.addons.child_compassion.models.compassion_hold import HoldType

from odoo import api, models, fields, _

logger = logging.getLogger(__name__)


class RecurringContracts(models.Model):
    _inherit = 'recurring.contract'

    first_open_invoice = fields.Date(compute='_compute_first_open_invoice')
    mandate_date = fields.Datetime(string='State last time mandate')
    has_mandate = fields.Boolean(compute='_compute_has_mandate')
    church_id = fields.Many2one(
        related='partner_id.church_id', readonly=True
    )
    previous_child_id = fields.Many2one(
        'compassion.child', 'Previous child', related='parent_id.child_id')
    is_already_a_sponsor = fields.Boolean(
        compute="_compute_already_a_sponsor", store=True)
    next_waiting_reminder = fields.Datetime(
        'Next reminder',
        compute='_compute_next_reminder', store=True
    )
    partner_lang = fields.Selection(
        'res.partner', 'Partner language', related='partner_id.lang',
        store=True)
    hillsong_ref = fields.Char(related='origin_id.hillsong_ref', store=True)

{'fraction_non_alphanumeric': 0.18209134615384615, 'fraction_numerical': 0.004807692307692308, 'mean_word_length': 4.987410071942446, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '663907', 'n_tokens_mistral': 1011, 'n_tokens_neox': 974, 'n_words': 200}