Skip to Content
Menu
This question has been flagged

Hello, i am using cybrosys accounting report, I want to ask, why everytime I generate accounting report like Profit and Loss, General Ledger, etc, the CoA will has (en_US) in front of it. I tried to change the database language but the result still the same. How can I remove this?



Avatar
Discard
Best Answer

Hi,

Please replace the financial_report_template with the below code: Then it will work fine.


<template id="dynamic_accounts_report.balance_sheet">
        <t t-call="web.html_container">
            <t t-call="web.internal_layout">
                <t t-set="data_report_margin_top" t-value="12"/>
<t t-set="data_report_header_spacing" t-value="9"/>
                <t t-set="data_report_dpi" t-value="110"/>
                <div class="page">
<h3><span t-esc="Filters.get('company_name')"/>:
                        <span t-esc="report_name"/>
                    </h3>

                    <div>
<span t-if="Filters.get('date_from')">
                            <strong>From:</strong>
                            <t t-esc="Filters['date_from']"/>
                        </span>

                        <span t-if="Filters.get('date_to')">
                            <strong>To:</strong>
                            <t t-esc="Filters['date_to']"/>
                        </span>

                        <div>
                            <div style="text-align:centre;" class="row">

                                <div class="col-2">
                                    <strong>Journals:</strong>
<t t-foreach="Filters['journals']"
                                       t-as="ps">
                                        <li>
                                            <t t-esc="ps"/>
                                        </li>
                                    </t>
                                </div>

                                <div class="col-2">
                                    <strong>Accounts:</strong>
<t t-foreach="Filters['accounts']"
                                       t-as="ps">
                                        <li>
                                            <t t-esc="ps"/>
                                        </li>
                                    </t>
                                </div>

                                <div class="col-2">
                                    <strong>Account Tags:</strong>
<t t-foreach="Filters['account_tags']"
                                       t-as="ps">
                                        <li>
                                            <t t-esc="ps"/>
                                        </li>
                                    </t>
                                </div>
                                <div class="col-2">
                                    <strong>Analytic:</strong>
<t t-foreach="Filters['analytics']"
                                       t-as="ps">
                                        <li>
                                            <t t-esc="ps"/>
                                        </li>
                                    </t>
                                </div>

                                <!--                                 <div class="col-2">-->
                                <!--                                        <strong>Analytic Tag:</strong>-->
<!-- <t t-foreach="Filters['analytic_tags']" t-as="ps">-->
                                <!--                                            <li>-->
                                <!--                                                <t t-esc="ps"/>-->
                                <!--                                            </li>-->
                                <!--                                        </t>-->
                                <!--                                </div>-->

                                <div class="col-3">
                                    <strong>Target move:</strong>
                                    <li>
<t t-esc="Filters['target_move']"/>
                                    </li>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br></br>

                    <table class="table table-sm table-reports">
                        <thead>
                            <tr>
                                <th></th>
                                <th class="text-right">Debit</th>
                                <th class="text-right">Credit</th>
<th class="text-right">Balance001</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr t-foreach="report_lines" t-as="a">

                                <t t-if="a['level'] != 0">
                                    <t t-if="a.get('level') &gt; 2">
                                        <t t-set="style"
                                           t-value="'font-weight: normal;'"/>
                                    </t>
                                    <t t-if="not a.get('level') &gt; 2">
                                        <t t-set="style"
                                           t-value="'font-weight: bold;'"/>
                                    </t>
                                    <t t-if="a.get('code')">
                                        <t t-foreach="account_data" t-as="line">
                                            <t t-if="line['id'] == a.get('account')">
                                                <tr>
                                                    <td>
                                                        <span style="color: white;"
                                                              t-esc="'..' * a.get('level', 0) * 3"/>
                                                        <span>
                                                            <t t-set="language"
t-value="request.env.context.get('lang')"/>
                                                            <t t-esc="line['code']"/>
                                                            -
                                                            <t t-if="language != 'en_US'">
                                                                <t t-if="line['name'][lang] and lang != 'en_US'">
                                                                    <t t-esc="line['name'][lang]"/>
                                                                </t>
<t t-elif="line['name']['en_US']">
<t t-esc="line['name']['en_US']"/>
                                                                </t>
                                                            </t>
                                                            <t t-else="">
                                                                <t t-esc="line['name']"/>
                                                            </t>
                                                        </span>
                                                    </td>
                                                    <td class="text-right">
                                                        <span t-esc="line['debit']"
                                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                                    </td>
                                                    <td class="text-right">
                                                        <span t-esc="line['credit']"
                                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                                    </td>
                                                    <td class="text-right">
                                                        <span t-esc="line['balance']"
                                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                                    </td>
                                                </tr>
                                            </t>
                                        </t>
                                    </t>
                                    <t t-else="">
                                        <td>
                                            <span style="color: white;"
                                                  t-esc="'..' * a.get('level', 0) * 3"/>
                                            <span t-att-style="style"
                                                  t-esc="a.get('name')"/>
                                        </td>
                                        <td class="text-right"
                                           >
                                            <span t-att-style="style"
                                                  t-esc="a.get('debit')"
                                                  t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                        </td>
                                        <td class="text-right"
                                           >
                                            <span t-att-style="style"
                                                  t-esc="a.get('credit')"
                                                  t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                        </td>
                                        <td class="text-right"
                                           >
                                            <span t-att-style="style"
                                                  t-esc="a.get('balance')"
                                                  t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                        </td>
                                    </t>

                                </t>
                            </tr>
                        </tbody>
                    </table>


                </div>
            </t>
        </t>
    </template>

We will soon update this on the Odoo App Store.

Hope it helps

Avatar
Discard
Best Answer

Hi,
This may be some bugs happens with a recent update, as it is a third party app, you can report the same to the author in their support channel and get is solved.

Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Jun 24
1483
0
Mar 24
4032
1
Apr 24
1377
1
Mar 24
2327
3
Jun 24
2172