Skip to Content
Menu
This question has been flagged

Hi Folks,

Using version 8.0


I have a chart of accounts with a fairly deep hierarchy.  the profit and loss reports (report_financial) renders these levels properly, except for the last level.  As an example, consider the following heirarchy:

Profit / Loss

-Expense

--Expenses

---Equipment

----Hardware

-----Hardware - Admin

On the profit and loss report, it should render like this:

Profit / Loss

  Expense

    Expenses

      Equipment

        Hardware

          Hardware - Admin


But instead renders like this:

Profit / Loss

  Expense

    Expenses

      Equipment

        Hardware

        Hardware - Admin


Note, "Hardware" and "Hardware - Admin" are on the same level.


When I check the report_financial template, I noticed that this indenting is achieved with:

<span style="color: white;" t-esc="'..' * a.get('level', 0)"/>

Or, '..' per level, coloured white


I next checked the level value in the database for these accounts, and I found this:

4 - Equipment

5 - Hardware

6 - Hardware - Admin


So, I then modified the template to add:

<span t-att-style="style" t-esc="a.get('level')"/>

Or, output the level number


What I found is this:

5 - Equipment

6 - Hardware

6 - Hardware - Admin


Even though "Hardware" and "Hardware - Admin" have different level values, the same level value outputs when the report it rendered.


So, is this a bug, or am I doing something wrong?


Avatar
Discard
Related Posts Replies Views Activity
2
Sep 24
255
0
Jun 22
3
0
Jun 22
3
5
Aug 19
45067
4
Jun 18
17979