<commit_before>##############################################################################
#
#    Copyright (C) 2019 Compassion CH (http://www.compassion.ch)
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __manifest__.py
#
##############################################################################

from odoo import api, models, fields


class CMSFormSettings(models.TransientModel):
    """ Settings configuration for any Notifications."""

    _inherit = "res.config.settings"

    match_validation_responsible = fields.Many2one(
        "res.users",
        string="Match partner validation responsible for activity schedule",
        domain=[("share", "=", False)],
        readonly=False,
    )

    @api.multi
    def set_values(self):
        super().set_values()
        # This is stored in page template for additional B2S pages
        config = self.env["ir.config_parameter"].sudo()
        config.set_param(
            "cms_form_compassion.match_validation_responsible", str(self.match_validation_responsible.id or 0)
        )

    @api.model
    def get_values(self):
        res = super().get_values()
        config = self.env["ir.config_parameter"].sudo()

        res["match_validation_responsible"] = int(
            config.get_param("cms_form_compassion.match_validation_responsible", 0)
        )
        return res<commit_msg>FIX flake8<commit_after>##############################################################################
#
#    Copyright (C) 2019 Compassion CH (http://www.compassion.ch)
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __manifest__.py
#
##############################################################################

from odoo import api, models, fields


class CMSFormSettings(models.TransientModel):
    """ Settings configuration for any Notifications."""

    _inherit = "res.config.settings"

    match_validation_responsible = fields.Many2one(
        "res.users",
        string="Match partner validation responsible for activity schedule",
        domain=[("share", "=", False)],
        readonly=False,
    )

    @api.multi
    def set_values(self):
        super().set_values()
        # This is stored in page template for additional B2S pages
        config = self.env["ir.config_parameter"].sudo()
        config.set_param(
            "cms_form_compassion.match_validation_responsible", str(
                self.match_validation_responsible.id or 0)
        )

    @api.model
    def get_values(self):
        res = super().get_values()
        config = self.env["ir.config_parameter"].sudo()

        res["match_validation_responsible"] = int(
            config.get_param("cms_form_compassion.match_validation_responsible", 0)
        )
        return res
{'fraction_non_alphanumeric': 0.2134587554269175, 'fraction_numerical': 0.006150506512301013, 'mean_word_length': 3.340659340659341, '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': '1078267', 'n_tokens_mistral': 771, 'n_tokens_neox': 707, 'n_words': 159}