account-closing/account_cutoff_base/wizards/res_config_settings.py

45 lines
1.8 KiB
Python
Raw Permalink Normal View History

2021-04-28 14:52:58 +00:00
# Copyright 2013-2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from flectra import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
# I can't name it default_cutoff_journal_id
# because default_ is a special prefix
dft_cutoff_journal_id = fields.Many2one(
2021-08-15 02:09:43 +00:00
related="company_id.default_cutoff_journal_id",
readonly=False,
domain="[('type', '=', 'general'), ('company_id', '=', company_id)]",
2021-04-28 14:52:58 +00:00
)
dft_cutoff_move_partner = fields.Boolean(
related="company_id.default_cutoff_move_partner", readonly=False
)
accrual_taxes = fields.Boolean(related="company_id.accrual_taxes", readonly=False)
2023-05-19 08:19:13 +00:00
post_cutoff_move = fields.Boolean(
related="company_id.post_cutoff_move", readonly=False
)
2021-04-28 14:52:58 +00:00
dft_accrued_revenue_account_id = fields.Many2one(
2021-08-15 02:09:43 +00:00
related="company_id.default_accrued_revenue_account_id",
readonly=False,
domain="[('deprecated', '=', False), ('company_id', '=', company_id)]",
2021-04-28 14:52:58 +00:00
)
dft_accrued_expense_account_id = fields.Many2one(
2021-08-15 02:09:43 +00:00
related="company_id.default_accrued_expense_account_id",
readonly=False,
domain="[('deprecated', '=', False), ('company_id', '=', company_id)]",
2021-04-28 14:52:58 +00:00
)
dft_prepaid_revenue_account_id = fields.Many2one(
2021-08-15 02:09:43 +00:00
related="company_id.default_prepaid_revenue_account_id",
readonly=False,
domain="[('deprecated', '=', False), ('company_id', '=', company_id)]",
2021-04-28 14:52:58 +00:00
)
dft_prepaid_expense_account_id = fields.Many2one(
2021-08-15 02:09:43 +00:00
related="company_id.default_prepaid_expense_account_id",
readonly=False,
domain="[('deprecated', '=', False), ('company_id', '=', company_id)]",
2021-04-28 14:52:58 +00:00
)