Files
Odoo-18.0-20251222/account_spread_cost_revenue/models/res_company.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

41 lines
1.3 KiB
Python
Executable File

# Copyright 2018-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
default_spread_revenue_account_id = fields.Many2one(
"account.account", string="Revenue Spread Account"
)
default_spread_expense_account_id = fields.Many2one(
"account.account", string="Expense Spread Account"
)
default_spread_revenue_journal_id = fields.Many2one(
"account.journal", string="Revenue Spread Journal"
)
default_spread_expense_journal_id = fields.Many2one(
"account.journal", string="Expense Spread Journal"
)
allow_spread_planning = fields.Boolean(
default=True,
help="Disable this option if you do not want to allow the "
"spreading before the invoice is validated.",
)
force_move_auto_post = fields.Boolean(
"Auto-post spread lines",
help="Enable this option if you want to post automatically the "
"accounting moves of all the spreads.",
)
auto_archive_spread = fields.Boolean(
"Auto-archive spread",
help="Enable this option if you want the cron job to automatically "
"archive the spreads when all lines are posted.",
)