# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields
from odoo import models


class ResConfigSettings(models.TransientModel):
    _inherit = "res.config.settings"

    membership_monthly_invoicing_enabled = fields.Boolean(
        string="Automatic monthly membership invoicing",
        config_parameter="membership_monthly_invoicing.enabled",
        default=True,
        help="When enabled, a scheduled action creates a draft membership "
        "invoice each month for every active member, copying the fee from "
        "their last membership line.",
    )
