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

[14.0] [ADD] script to generate bs and pl xml #6

Open
wants to merge 4 commits into
base: 14.0
Choose a base branch
from

Conversation

mathisjacoby
Copy link
Collaborator

No description provided.

Copy link
Member

@ThomasBinsfeld ThomasBinsfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first quick review.

Enable pre-commit and trigger the reformatting of your script.

l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
@mathisjacoby mathisjacoby force-pushed the 14.0-add_l10n_be_mis_reports_scripts_mja branch 2 times, most recently from 1065308 to ed44120 Compare February 21, 2023 16:15
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
l10n_be_mis_reports/script/generate_xml.py Outdated Show resolved Hide resolved
@mathisjacoby mathisjacoby force-pushed the 14.0-add_l10n_be_mis_reports_scripts_mja branch 2 times, most recently from fbd56c4 to 8283c77 Compare February 24, 2023 08:03
@rousseldenis
Copy link
Member

@ThomasBinsfeld Could you update your review ?

@mathisjacoby mathisjacoby marked this pull request as draft March 17, 2023 14:28
<field name="report_id" ref="mis_report_pl" />
<field name="name">acc_76A</field>
<field name="description">Of which: non-recurring operating income [76A]</field>
<field name="expression">balp[76A%]</field>
Copy link
Member

@sbidoul sbidoul Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mathisjacoby This expression is suspicious. As far as I know, there is no account code starting with 76A in the official belgium chart of accounts. See for instance https://github.com/odoo/odoo/blob/16.0/addons/l10n_be/data/account.account.template.csv or https://plancomptablebelge.be/#classe-7

@mathisjacoby mathisjacoby force-pushed the 14.0-add_l10n_be_mis_reports_scripts_mja branch from 8283c77 to 3a5169f Compare April 11, 2023 07:14
<field name="report_id" ref="new_mis_report_pl" />
<field name="name">acc_70</field>
<field name="description">Turnover [70]</field>
<field name="expression">balp[70%]</field>
Copy link
Member

@sbidoul sbidoul Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since balp is debit - credit and revenue is typically credit on 70, this expression will give a negative result.
So we want -balp[70%] here and several other places.

For P&L accounts, this is relatively straightforward (minus balp for accounts 7, plus balp for accounts 6). For BS accounts (1-5), it is less obvious.

<field name="report_id" ref="new_mis_report_pl" />
<field name="name">acc_67_77</field>
<field name="description">Income taxes on the result [67/77]</field>
<field name="expression">balp[67%,68%,69%,71%,72%,73%,74%,76%,77%]</field>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not correct. Looking at the official account chart, it's probably this:

Suggested change
<field name="expression">balp[67%,68%,69%,71%,72%,73%,74%,76%,77%]</field>
<field name="expression">balp[67%,77%]</field>

@mathisjacoby mathisjacoby force-pushed the 14.0-add_l10n_be_mis_reports_scripts_mja branch from 3a5169f to 0159051 Compare May 12, 2023 13:13
@mathisjacoby mathisjacoby marked this pull request as ready for review May 12, 2023 13:17
@mathisjacoby mathisjacoby force-pushed the 14.0-add_l10n_be_mis_reports_scripts_mja branch 3 times, most recently from 600b2f1 to 4062d27 Compare May 17, 2023 07:57
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2023

Codecov Report

Merging #6 (e5562a2) into 14.0 (56a3e0c) will decrease coverage by 13.33%.
The diff coverage is 20.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##             14.0       #6       +/-   ##
===========================================
- Coverage   73.63%   60.30%   -13.33%     
===========================================
  Files          54       60        +6     
  Lines        1961     2615      +654     
  Branches      304      486      +182     
===========================================
+ Hits         1444     1577      +133     
- Misses        405      925      +520     
- Partials      112      113        +1     
Impacted Files Coverage Δ
...account_xbrl/models/l10n_be_annual_account_xbrl.py 14.39% <14.39%> (ø)
l10n_be_annual_account_xbrl/models/res_partner.py 39.72% <39.72%> (ø)
l10n_be_annual_account_xbrl/models/res_company.py 44.11% <44.11%> (ø)
l10n_be_annual_account_xbrl/__init__.py 100.00% <100.00%> (ø)
l10n_be_annual_account_xbrl/models/__init__.py 100.00% <100.00%> (ø)
l10n_be_annual_account_xbrl/models/mis_report.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e3ea6b...e5562a2. Read the comment docs.

@mathisjacoby mathisjacoby force-pushed the 14.0-add_l10n_be_mis_reports_scripts_mja branch from 4062d27 to e5562a2 Compare May 17, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants