Files
Odoo-18.0-20251222/database_size/models/res_config_settings.py
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

33 lines
1.2 KiB
Python
Executable File

# Copyright 2025 Opener B.V. <https://opener.amsterdam>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
database_size_purge = fields.Boolean(
string="Purge Older Model Size Measurements",
config_parameter="database_size.purge_enable",
)
database_size_retention_daily = fields.Integer(
string="Keep Daily Measurements for",
config_parameter="database_size.retention_daily",
help=(
"The period of time (in days) during which the daily database size "
"measurements are kept. If set to 0, measurements will be kept "
"forever."
),
default="366",
)
database_size_retention_monthly = fields.Integer(
string="Keep Monthly Measurements for",
config_parameter="database_size.retention_monthly",
help=(
"The period of time (in days) during which database size measurmeents "
"are kept of the first day of each month. If set to 0, measurements "
"will be kept forever."
),
default="0",
)