IFRS / NIIF Accounting

Rational

For those countries that do not have an accounting module in Tryton (trytond_account_ ??) or countries that implement IFRS (NIIF in spanish) or for non-normalized countries, it makes sense that Tryton can provide a module that implements the IFRS (International Financial Reporting Standards) / NIIF (Normas Internacionales de Informacion Financiera) as a basis or starting point for them.

Proposal

account_ifrs module.

It would contain a main chart.xml file with Account Type Template and Account Template records implementing IFRS, which name fields are subject of translation, this way we can then create a diferent file for each defined language using XSLT.

It is how Account type chart would look like

account_type_1
account_typ_2

Extending

This module can be extended or updated by specific needs, for example, countries could have diferent names for an account, or need more/less accounts than it provides.
Taxes are not covered by IFRS, just how they are showed in reporting, so each country must create custom module for its taxes implementation

Considerations

We are already working on an IFRS module, since it can be used as basis for Panama, Costa Rica and Venezuela accounting, you can look at here for review, We used recomendations from panamian public accountants as guidence based on this Goverment resolution, along with IFRS Taxonomy 2020 - A view of the IFRS Taxonomy 2020 (organised by financial statement)

Based on this module we are also working on account_pa module, which extends it and defines taxes for Panama.

It would be desireble if more people (specailly accountants) can review it and contribute with their comments.

I think we do not have the functionality to extend a chart of accounts. So if you want to reuse the IFRS chart of account in your country code you should have to copy paste all the definition of the account_ifrs module into the account_pa module. Otherwise activating the account_pa module will force any user of the IFRS chart to load the panama accounts which is not correct for other countries.

If we go this way probably we should think on how to improve this situatoin.

I see your point, it would be a problem in a multi company environment…

One suggestion is to use XSLT to take the chart from the account_ifrs module and another file containing just the Panama specific changes and output the full account_pa chart. Something a bit like this:

create_chart.xsl:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:param name="chart" />

  <xsl:variable name="update_records" select="document($chart)/tryton/data/record" />

  <xsl:template match="data">
    <xsl:copy>
      <xsl:apply-templates select="record|text()" />
      <xsl:apply-templates select="$update_records[not(@id = current()/record/@id)]" />
    </xsl:copy>
  </xsl:template>

  <xsl:template match="record">
    <xsl:choose>
      <xsl:when test="not(@id = $update_records/@id)">
        <xsl:copy-of select="."/>
      </xsl:when>
      <xsl:when test="@id = $update_records/@id and count($update_records[@id = current()/@id]/field) &gt; 1">
        <xsl:copy-of select="$update_records[@id = current()/@id]"/>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

Then run like this:

cd account_pa
xsltproc --stringparam chart account_template.xml create_chart.xsl /full/path/to/account_ifrs/account_template.xml >account_pa.xml

I’m wondering if it will not be better to use IFRS in account module to replace the minimal chart of account.

No because a template can be used to one chart per company.

I do not think it is needed to have such machinery.
Indeed if IFRS becomes the new minimal chart, the custom implementation could just be a copy of the corresponding translated chart from account module. It can be a plain copy and it is easy to maintain as it is just a copy.

3 Likes

I think this is a good idea.

I agree that using ifrs as default chart plan and coping the chart to other country modules will be a the easiest way to maintain such charts.

@formateli if you want to work on it feel free to open and issue and submit a review proposal to include both charts

I created Issue9642 - Replace minimal chart of account with IFRS in account module

Maybe a compromise is more viable.

Rename the minimal account chart names and structure with IFRS terms. Also create a new module account_ifrs which re-use or re-defines the accounts from minimal chart of accounts and extend it with the missing IFRS.
This way we preserve a very simple minimal chart for testing purposes, which can be completed by a separated module.

Did you test the proposed chart of account? Why is not good enough?

No, I didn’t test. My proposal was about the topic, to rescue the minimal account chart which is good designed for testing purposes. I find it handy and easy to understand having only one account for one accounting functionality. The minimal accounts are generic named, which also helps. The minimal chart let the understanding of test cases and scenarios focus on the minimal functional needs.
I fear when we use the IFRS to replace the minimal chart, that the number of accounts and the separate upstream makes writing and understanding test cases and scenarios more complicated.

But maybe it is better to re-use the actual minimal chart internally for testing purposes only. We can use it solely by the helper script. But I have no idea how we could make the minimal chart available internal only.

Please comment about facts so test the proposal.

1 Like

Yes, you are right. I reviewed the changes for the tests and the provided solution in the old code review is to just limit the results from account search to one. So the solution from @formateli is much simpler and better then my proposal.

So we just need someone to convert it into a merge request.
And probably check how upgrade is working.

1 Like