2020-09-07 14:31:18 +02:00
|
|
|
# Copyright 2018-2020 Onestein (<https://www.onestein.eu>)
|
2018-10-22 12:27:50 +02:00
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
|
|
|
|
|
|
class ResCompany(models.Model):
|
2020-09-07 14:17:04 +02:00
|
|
|
_inherit = "res.company"
|
2018-10-22 12:27:50 +02:00
|
|
|
|
|
|
|
default_spread_revenue_account_id = fields.Many2one(
|
2020-09-07 14:17:04 +02:00
|
|
|
"account.account", string="Revenue Spread Account"
|
|
|
|
)
|
2018-10-22 12:27:50 +02:00
|
|
|
|
|
|
|
default_spread_expense_account_id = fields.Many2one(
|
2020-09-07 14:17:04 +02:00
|
|
|
"account.account", string="Expense Spread Account"
|
|
|
|
)
|
2018-10-22 12:27:50 +02:00
|
|
|
|
|
|
|
default_spread_revenue_journal_id = fields.Many2one(
|
2020-09-07 14:17:04 +02:00
|
|
|
"account.journal", string="Revenue Spread Journal"
|
|
|
|
)
|
2018-10-22 12:27:50 +02:00
|
|
|
|
|
|
|
default_spread_expense_journal_id = fields.Many2one(
|
2020-09-07 14:17:04 +02:00
|
|
|
"account.journal", string="Expense Spread Journal"
|
|
|
|
)
|
2019-04-05 12:04:42 +02:00
|
|
|
|
|
|
|
allow_spread_planning = fields.Boolean(
|
|
|
|
default=True,
|
|
|
|
help="Disable this option if you do not want to allow the "
|
2020-09-07 14:17:04 +02:00
|
|
|
"spreading before the invoice is validated.",
|
|
|
|
)
|
2019-04-05 14:40:52 +02:00
|
|
|
force_move_auto_post = fields.Boolean(
|
2020-09-07 14:17:04 +02:00
|
|
|
"Auto-post spread lines",
|
2019-04-05 14:40:52 +02:00
|
|
|
help="Enable this option if you want to post automatically the "
|
2020-09-07 14:17:04 +02:00
|
|
|
"accounting moves of all the spreads.",
|
|
|
|
)
|
2020-09-07 14:31:18 +02:00
|
|
|
auto_archive_spread = fields.Boolean(
|
2020-09-07 14:17:04 +02:00
|
|
|
"Auto-archive spread",
|
2019-08-21 12:11:26 +02:00
|
|
|
help="Enable this option if you want the cron job to automatically "
|
2020-09-07 14:17:04 +02:00
|
|
|
"archive the spreads when all lines are posted.",
|
|
|
|
)
|