This commit is contained in:
gsinghpal
2026-03-13 12:38:28 -04:00
parent db4b9aa278
commit fc3c966484
2975 changed files with 1614 additions and 498 deletions

View File

@@ -0,0 +1,22 @@
# Fusion Accounting - Balance Sheet Report Handler
from odoo import models
class BalanceSheetCustomHandler(models.AbstractModel):
"""Handler for balance sheet report customizations."""
_name = 'account.balance.sheet.report.handler'
_inherit = 'account.report.custom.handler'
_description = 'Balance Sheet Report Handler'
def _customize_warnings(self, report, options, all_column_groups_expression_totals, warnings):
"""Flag a warning when currency translation adjustment is active.
If the selected currency table type is 'cta', there may be unbalanced
entries caused by the currency translation process. This method injects
the appropriate warning template so the user is informed.
"""
currency_cfg = options.get('currency_table', {})
if currency_cfg.get('type') == 'cta':
warnings['fusion_accounting.common_possibly_unbalanced_because_cta'] = {}