addons14/account_tax_balance/models/account_tax.py
def _account_tax_ids_with_moves(self):
        """Return all account.tax ids for which there is at least
        one account.move.line in the context period
        for the user company.

        Caveat: this ignores record rules and ACL but it is good
        enough for filtering taxes with activity during the period.
        """
        from_date, to_date, company_ids, _ = self.get_context_values()
        company_ids = tuple(company_ids)
        req = """
            SELECT id
            FROM account_tax at
            WHERE
            company_id in %s AND
            EXISTS (
              SELECT 1 FROM account_move_Line aml
              WHERE
                date >= %s AND
                date <= %s AND
                company_id in %s AND (
                  tax_line_id = at.id OR
                  EXISTS (
                    SELECT 1 FROM account_move_line_account_tax_rel
                    WHERE account_move_line_id = aml.id AND
                      account_tax_id = at.id
                  )
                )
            )
        """
        self.env.cr.execute(req, (company_ids, from_date, to_date, company_ids))
        return [r[0] for r in self.env.cr.fetchall()]
Return all account.tax ids for which there is at least
        one account.move.line in the context period
        for the user company.

        Caveat: this ignores record rules and ACL but it is good
        enough for filtering taxes with activity during the period.
        
Return all account.tax ids for which there is at least
one account.move.line in the context period
for the user company.

this ignores record rules and ACL but it is good
enough for filtering taxes with activity during the period.
Return all account . tax ids for which there is at least one account . move . line in the context period for the user company . this ignores record rules and ACL but it is good enough for filtering taxes with activity during the period .
def _account_tax_ids_with_moves(self):
        from_date, to_date, company_ids, _ = self.get_context_values()
        company_ids = tuple(company_ids)
        req = """
            SELECT id
            FROM account_tax at
            WHERE
            company_id in %s AND
            EXISTS (
              SELECT 1 FROM account_move_Line aml
              WHERE
                date >= %s AND
                date <= %s AND
                company_id in %s AND (
                  tax_line_id = at.id OR
                  EXISTS (
                    SELECT 1 FROM account_move_line_account_tax_rel
                    WHERE account_move_line_id = aml.id AND
                      account_tax_id = at.id
                  )
                )
            )
        """
        self.env.cr.execute(req, (company_ids, from_date, to_date, company_ids))
        return [r[0] for r in self.env.cr.fetchall()]
def _account_tax_ids_with_moves ( self ) : from_date , to_date , company_ids , _ = self . get_context_values ( ) company_ids = tuple ( company_ids ) req = """
            SELECT id
            FROM account_tax at
            WHERE
            company_id in %s AND
            EXISTS (
              SELECT 1 FROM account_move_Line aml
              WHERE
                date >= %s AND
                date <= %s AND
                company_id in %s AND (
                  tax_line_id = at.id OR
                  EXISTS (
                    SELECT 1 FROM account_move_line_account_tax_rel
                    WHERE account_move_line_id = aml.id AND
                      account_tax_id = at.id
                  )
                )
            )
        """ self . env . cr . execute ( req , ( company_ids , from_date , to_date , company_ids ) ) return [ r [ 0 ] for r in self . env . cr . fetchall ( ) ]
Return all account.tax ids for which there is at least
one account.move.line in the context period
for the user company.
Return all account . tax ids for which there is at least one account . move . line in the context period for the user company .
"""Return all account.tax ids for which there is at least
        one account.move.line in the context period
        for the user company.

        Caveat: this ignores record rules and ACL but it is good
        enough for filtering taxes with activity during the period.
        """
self