Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 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'] = {}