diff --git a/account_financial_report/report/templates/general_ledger.xml b/account_financial_report/report/templates/general_ledger.xml
index 2b55c4d6..3419615d 100644
--- a/account_financial_report/report/templates/general_ledger.xml
+++ b/account_financial_report/report/templates/general_ledger.xml
@@ -227,16 +227,22 @@
                 </t>
                 <!--## matching_number-->
                 <div class="act_as_cell" />
+                <t
+                    t-set="misc_domain"
+                    t-value="[('account_id', '=', account['id']),('date', '&lt;', date_from)]"
+                />
+                <t
+                    t-set="partner_domain"
+                    t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
+                />
                 <!--## debit-->
                 <div class="act_as_cell amount">
+                    <t t-set="debit_domain" t-value="[('debit', '&lt;&gt;', 0)]" />
                     <t t-if="type == 'account_type'">
-                        <t
-                            t-set="domain"
-                            t-value="[('account_id', '=', account['id']),
-                                     ('date', '&lt;', date_from),
-                                     ('debit', '&lt;&gt;', 0)]"
-                        />
-                        <span t-att-domain="domain" res-model="account.move.line">
+                        <span
+                            t-att-domain="misc_domain+debit_domain"
+                            res-model="account.move.line"
+                        >
                             <t
                                 t-raw="account_or_group_item_object['init_bal']['debit']"
                                 t-options="{'widget': 'monetary', 'display_currency': company_currency}"
@@ -244,14 +250,10 @@
                         </span>
                     </t>
                     <t t-if="type == 'grouped_type'">
-                        <t
-                            t-set="domain"
-                            t-value="[('account_id', '=', account['id']),
-                                     ('partner_id', '=', group_item['id']),
-                                     ('date', '&lt;', date_from),
-                                     ('debit', '&lt;&gt;', 0)]"
-                        />
-                        <span t-att-domain="domain" res-model="account.move.line">
+                        <span
+                            t-att-domain="misc_domain+debit_domain+partner_domain"
+                            res-model="account.move.line"
+                        >
                             <t
                                 t-raw="account_or_group_item_object['init_bal']['debit']"
                                 t-options="{'widget': 'monetary', 'display_currency': company_currency}"
@@ -261,14 +263,12 @@
                 </div>
                 <!--## credit-->
                 <div class="act_as_cell amount">
+                    <t t-set="credit_domain" t-value="[('credit', '&lt;&gt;', 0)]" />
                     <t t-if="type == 'account_type'">
-                        <t
-                            t-set="domain"
-                            t-value="[('account_id', '=',  account['id']),
-                                     ('date', '&lt;', date_from),
-                                     ('credit', '&lt;&gt;', 0)]"
-                        />
-                        <span t-att-domain="domain" res-model="account.move.line">
+                        <span
+                            t-att-domain="misc_domain+credit_domain"
+                            res-model="account.move.line"
+                        >
                             <t
                                 t-raw="account_or_group_item_object['init_bal']['credit']"
                                 t-options="{'widget': 'monetary', 'display_currency': company_currency}"
@@ -276,14 +276,10 @@
                         </span>
                     </t>
                     <t t-if="type == 'grouped_type'">
-                        <t
-                            t-set="domain"
-                            t-value="[('account_id', '=', account['id']),
-                                     ('partner_id', '=', group_item['id']),
-                                     ('date', '&lt;', date_from),
-                                     ('credit', '&lt;&gt;', 0)]"
-                        />
-                        <span t-att-domain="domain" res-model="account.move.line">
+                        <span
+                            t-att-domain="misc_domain+credit_domain+partner_domain"
+                            res-model="account.move.line"
+                        >
                             <t
                                 t-raw="account_or_group_item_object['init_bal']['credit']"
                                 t-options="{'widget': 'monetary', 'display_currency': company_currency}"
@@ -294,12 +290,7 @@
                 <!--## balance cumulated-->
                 <div class="act_as_cell amount">
                     <t t-if="type == 'account_type'">
-                        <t
-                            t-set="domain"
-                            t-value="[('account_id', '=', account['id']),
-                                     ('date', '&lt;', date_from)]"
-                        />
-                        <span t-att-domain="domain" res-model="account.move.line">
+                        <span t-att-domain="misc_domain" res-model="account.move.line">
                             <t
                                 t-raw="account_or_group_item_object['init_bal']['balance']"
                                 t-options="{'widget': 'monetary', 'display_currency': company_currency}"
@@ -307,13 +298,10 @@
                         </span>
                     </t>
                     <t t-if="type == 'grouped_type'">
-                        <t
-                            t-set="domain"
-                            t-value="[('account_id', '=', account['id']),
-                                     ('partner_id', '=', group_item['id']),
-                                     ('date', '&lt;', date_from)]"
-                        />
-                        <span t-att-domain="domain" res-model="account.move.line">
+                        <span
+                            t-att-domain="misc_domain+partner_domain"
+                            res-model="account.move.line"
+                        >
                             <t
                                 t-raw="account_or_group_item_object['init_bal']['balance']"
                                 t-options="{'widget': 'monetary', 'display_currency': company_currency}"
@@ -325,13 +313,8 @@
                     <t t-if="account['currency_id']">
                         <div class="act_as_cell amount" style="width: 3.63%;">
                             <t t-if="type == 'account_type'">
-                                <t
-                                    t-set="domain"
-                                    t-value="[('account_id', '=', account['id']),
-                                             ('date', '&lt;', o.date_from)]"
-                                />
                                 <span
-                                    t-att-domain="domain"
+                                    t-att-domain="misc_domain"
                                     res-model="account.move.line"
                                 >
                                     <t
@@ -341,14 +324,8 @@
                                 </span>
                             </t>
                             <t t-if="type == 'grouped_type'">
-                                <t
-                                    t-set="domain"
-                                    t-value="[('account_id', '=', account['id']),
-                                             ('partner_id', '=', group_item['id']),
-                                             ('date', '&lt;', o.date_from)]"
-                                />
                                 <span
-                                    t-att-domain="domain"
+                                    t-att-domain="misc_domain+partner_domain"
                                     res-model="account.move.line"
                                 >
                                     <t
@@ -679,18 +656,21 @@
                     />
                 </div>
                 <!--## currency_name + amount_currency-->
+                <t
+                    t-set="misc_domain"
+                    t-value="[('account_id', '=', account['id']),('date', '&lt;', date_from)]"
+                />
+                <t
+                    t-set="partner_domain"
+                    t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
+                />
                 <t t-if="foreign_currency">
                     <t t-if="account['currency_id']">
                         <div class="act_as_cell amount" style="width: 3.63%;">
                             <t t-if="type == 'account_type'">
-                                <t
-                                    t-set="domain"
-                                    t-value="[('account_id', '=', account['id']),
-                                             ('date', '&lt;', date_from)]"
-                                />
                                 <span>
                                     <a
-                                        t-att-data-t-att-domain="domain"
+                                        t-att-data-t-att-domain="misc_domain"
                                         t-att-data-res-model="'account.move.line'"
                                         class="o_account_financial_reports_web_action_monetary_multi"
                                         style="color: black;"
@@ -703,15 +683,9 @@
                                 </span>
                             </t>
                             <t t-if="type == 'grouped_type'">
-                                <t
-                                    t-set="domain"
-                                    t-value="[('account_id', '=', account['id']),
-                                             ('partner_id', '=', group_item['id']),
-                                             ('date', '&lt;', date_from)]"
-                                />
                                 <span>
                                     <a
-                                        t-att-data-t-att-domain="domain"
+                                        t-att-data-t-att-domain="misc_domain+partner_domain"
                                         t-att-data-res-model="'account.move.line'"
                                         class="o_account_financial_reports_web_action_monetary_multi"
                                         style="color: black;"