35 lines
1007 B
Python
35 lines
1007 B
Python
# Copyright 2023 Dixmit
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import _, fields, models
|
|
|
|
|
|
class AccountJournal(models.Model):
|
|
_inherit = "account.journal"
|
|
|
|
reconcile_mode = fields.Selection(
|
|
[("edit", "Edit Move"), ("keep", "Keep Suspense Accounts")],
|
|
default="edit",
|
|
required=True,
|
|
)
|
|
company_currency_id = fields.Many2one(related="company_id.currency_id")
|
|
reconcile_aggregate = fields.Selection(
|
|
[
|
|
("statement", "Statement"),
|
|
("day", "Day"),
|
|
("week", "Week"),
|
|
("month", "Month"),
|
|
],
|
|
string="Reconcile aggregation",
|
|
help="Aggregation to use on reconcile view",
|
|
)
|
|
|
|
def get_rainbowman_message(self):
|
|
self.ensure_one()
|
|
if (
|
|
self._get_journal_dashboard_data_batched()[self.id]["number_to_reconcile"]
|
|
> 0
|
|
):
|
|
return False
|
|
return _("Well done! Everything has been reconciled")
|