Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Total of all lines (General Ledger) #1174

Open
MahmoudTarkGP opened this issue May 22, 2024 · 1 comment
Open

Total of all lines (General Ledger) #1174

MahmoudTarkGP opened this issue May 22, 2024 · 1 comment
Labels
enhancement stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@MahmoudTarkGP
Copy link

MahmoudTarkGP commented May 22, 2024

hello oca community, first of all thanks for this great module and all your good work for odoo.

I'm trying to get a last row that get totals (Balance, Debit and Credit) for all lines like odoo default report, but I can't do it, can you help?

I tried to do it here in xml by set a variable for total then sum all values for each line or sum of totals from end line but I can't access this variable outside so I can create an individual raw for totals at end of report

how to make a global variable here that can be passed to other template and return the result?

<t t-foreach="general_ledger" t-as="account">
                <div class="page_break">
                    <!-- Display account header -->
                    <div class="act_as_table list_table" style="margin-top: 10px;" />
                    <div class="act_as_caption account_title" style="width: 100%">
                        <span t-esc="account['code']" /> - <span t-esc="account['name']" />
                    </div>
                    <t t-if="'list_grouped' not in account">
                        <!-- Display account move lines without partner regroup -->
                        <t t-set="type" t-value='"account_type"' />
                        <t
                            t-call="account_financial_report.report_general_ledger_lines"
                        >
                            <t t-set="account_or_group_item_object" t-value="account" />
                        </t>
                        <!-- Display account footer -->
                        <t
                            t-call="account_financial_report.report_general_ledger_ending_cumul"
                        >
                            <t t-set="account_or_group_item_object" t-value="account" />
                            <t t-set="type" t-value='"account_type"' />
                        </t>
                    </t>
                    <t t-if="'list_grouped' in account">
                        <!-- Display account partners -->
                        <t t-foreach="account['list_grouped']" t-as="group_item">
                            <t t-set="type" t-value='"grouped_type"' />
                            <div class="page_break">
                                <!-- Display partner header -->
                                <div class="act_as_caption account_title">
                                    <span t-esc="group_item['name']" />
                                </div>
                                <!-- Display partner move lines -->
                                <t
                                    t-call="account_financial_report.report_general_ledger_lines"
                                >
                                    <t
                                        t-set="account_or_group_item_object"
                                        t-value="group_item"
                                    />
                                </t>
                                <!-- Display partner footer -->
                                <t
                                    t-call="account_financial_report.report_general_ledger_ending_cumul"
                                >
                                    <t
                                        t-set="account_or_group_item_object"
                                        t-value="group_item"
                                    />
                                    <t t-set="type" t-value='"grouped_type"' />
                                </t>
                            </div>
                        </t>
                        <!-- Display account footer -->
                        <t t-if="not filter_partner_ids">
                            <t
                                t-call="account_financial_report.report_general_ledger_ending_cumul"
                            >
                                <t
                                    t-set="account_or_group_item_object"
                                    t-value="account"
                                />
                                <t t-set="type" t-value='"account_type"' />
                            </t>
                        </t>
                    </t>
                </div>
            </t>
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant