Skip to Content
Menu
This question has been flagged

Hello Odooers,

i am using Odoo 16 CE with the Accounting Kit from Cybrosys.
In the overview on the Server the "Balance in GL" is not loading and not being shown.
but with the same Database Restored and same Apps, on Localhost it's working perfectly:

Linux Server:



On Localhost (Windows):



What could be the Issue here ?

Avatar
Discard
Author

Just noticed that in Windows Version it's Called "Balance in GL", and in Linux Version it's Called "Running Balance". lol.

Hello, have you found the answer yet? Sometimes I have this issue too. And sometimes the Running Balance does not match with the actual account balance.

Author

Hello Mike.

Nope, still the same issue. Nothing resolved.

Have you tried to email Cybrosys Customer Support?

Author

Yes i did, they asked me to buy a Paid Support Package around 1,000$.

Author Best Answer
To who ever is following this thread, i found a walk around solution provided by  Mario Sls on Github.

Original Reply by Mario

ZIP module Link


Original Post:
Solution:
Create a module and add this...
from odoo import models

class Journal(models.Model):
    _inherit='account.journal'

    #Fix the Odoo change to Balance in GL
    def _fill_bank_cash_dashboard_data(self, dashboard_data):
        """Populate all bank and cash journal's data dict with relevant information for the kanban card."""
        bank_cash_journals = self.filtered(lambda journal: journal.type in ('bank', 'cash'))
        if not bank_cash_journals:
            return

        # Number to reconcile
        self._cr.execute("""
            SELECT st_line_move.journal_id,
                   COUNT(st_line.id)
              FROM account_bank_statement_line st_line
              JOIN account_move st_line_move ON st_line_move.id = st_line.move_id
             WHERE st_line_move.journal_id IN %s
               AND NOT st_line.is_reconciled
               AND st_line_move.to_check IS NOT TRUE
               AND st_line_move.state = 'posted'
          GROUP BY st_line_move.journal_id
        """, [tuple(bank_cash_journals.ids)])
        number_to_reconcile = {
            journal_id: count
            for journal_id, count in self.env.cr.fetchall()
        }

        # Last statement
        self.env.cr.execute("""
            SELECT journal.id, statement.id
              FROM account_journal journal
         LEFT JOIN LATERAL (
                      SELECT id
                        FROM account_bank_statement
                       WHERE journal_id = journal.id
                    ORDER BY first_line_index DESC
                       LIMIT 1
                   ) statement ON TRUE
             WHERE journal.id = ANY(%s)
        """, [self.ids])
        last_statements = {journal_id: statement_id for journal_id, statement_id in self.env.cr.fetchall()}
        self.env['account.bank.statement'].browse(i for i in last_statements.values() if i).mapped('balance_end_real')  # prefetch

        outstanding_pay_account_balances = bank_cash_journals._get_journal_dashboard_outstanding_payments()

        # To check
        to_check = {
            res['journal_id'][0]: (res['amount'], res['journal_id_count'])
            for res in self.env['account.bank.statement.line'].read_group(
                domain=[
                    ('journal_id', 'in', bank_cash_journals.ids),
                    ('move_id.to_check', '=', True),
                    ('move_id.state', '=', 'posted'),
                ],
                fields=['amount'],
                groupby=['journal_id'],
            )
        }


I have tested it on the Server that have this Issue and it worked.



Avatar
Discard
Related Posts Replies Views Activity
2
May 24
2543
2
Oct 23
1415
0
Feb 24
1829
1
Feb 24
4348
0
Feb 24
2138