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

[9.0] mis_builder Sorrento #189

Merged
merged 182 commits into from May 24, 2016
Merged

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Apr 29, 2016

This is the work done on mis_builder at the Sorrento Sprint.

Thanks to all who contributed code and ideas! It was a great event.

This branch should be usable as is, although not yet perfect.

Sprinters (in particular @adrienpeiffer @sebastienbeau @gfcapalbo), feel free to commit your last small changes here if any.

Then let's review and merge fast so the work in account_financial_report_qweb that depends on this can continue.

sbidoul and others added 30 commits April 29, 2016 12:11
Code is simpler too but here we really lose functionality.
…h the debit and the credit are zero and balances among which debit and credit nullify
@sbidoul
Copy link
Member Author

sbidoul commented May 17, 2016

@moylop260 I'm still lost with the hanging indent errors.

I installed the latest flake8 locally in a fresh virtualenv and run it without errors. Do you have a suggestion?

@ThomasBinsfeld
Copy link

@sbidoul Launch flake8 with --ignore ("flake8 --ignore E128 " for example) and it will show the under/over-indented lines

@sbidoul
Copy link
Member Author

sbidoul commented May 17, 2016

@ThomasBinsfeld thanks! I would not have thought ignoring an error would raise others.

@coveralls
Copy link

coveralls commented May 17, 2016

Coverage Status

Coverage remained the same at 77.77% when pulling 022b8a8 on oca-sorrento:9.0-mis_builder-sorrento into be32b21 on OCA:9.0.

@sbidoul
Copy link
Member Author

sbidoul commented May 17, 2016

Ok, so now I consider the code is much cleaner and maintainable with a proper separation of concerns:

  • mis_report.py: the core module providing the report templates and computation logic relying on a bunch of lower level features (aep, accounting_none, simple_array, mis_report_style)
  • mis_report_instance.py: providing instanciation of report templates for given time periods
  • the various renderings: widget, qweb-pdf, xslx

There is full feature parity across the 3 renderings.

For more information on new features and fixes compared to the v8 version, see the changelog: https://github.com/oca-sorrento/account-financial-reporting/blob/022b8a8998d7f38fb40f0e82185211b2f044ab62/mis_builder/CHANGES.rst

The test coverage is reasonably complete (78%, with the AccoutingExpressionProcessor fully tested except some error cases).

I still have plenty of ideas for improvements and features, but I'll stop here for now!

Happy reviewing!

@moylop260
Copy link

moylop260 commented May 17, 2016

Should we fix the duplicated csv id?

mis_builder/__init__.py:1: [W7906(duplicate-id-csv), ] Duplicate id "access_mis_report_kpi_expression" in ir.model.access.csv file
mis_builder/__init__.py:1: [W7906(duplicate-id-csv), ] Duplicate id "access_mis_report_subkpi" in ir.model.access.csv file
mis_builder/__init__.py:1: [W7906(duplicate-id-csv), ] Duplicate id "access_mis_report_style" in ir.model.access.csv file

@sbidoul
Copy link
Member Author

sbidoul commented May 17, 2016

@moylop260 perhaps, perhaps. I don't know (yet) what this warning means.

@moylop260
Copy link

moylop260 commented May 17, 2016

Help me to use a clearer message for the following case:
csv

duplicate-id-csv

@moylop260
Copy link

If you have a proposal for this message you could comment here: OCA/pylint-odoo#32

@sbidoul
Copy link
Member Author

sbidoul commented May 17, 2016

@moylop260 the message is just fine. Useful check, thanks! Fixed.

@coveralls
Copy link

coveralls commented May 17, 2016

Coverage Status

Coverage remained the same at 77.77% when pulling 910cd1e on oca-sorrento:9.0-mis_builder-sorrento into be32b21 on OCA:9.0.

@moylop260
Copy link

Thanks @sbidoul
👍

<data noupdate="1">

<record id="ir_cron_crm_action" model="ir.cron">
<field name="name">Vaccum temporary report</field>
Copy link
Member

Choose a reason for hiding this comment

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

Vacuum

…sh 0 from null in initial balances

This should be slightly on the safer side. Ideally, this rounding precision
should come from the kpi style (which defaults to the report style), but
that would be a lot of code for little benefits.
@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage remained the same at 77.786% when pulling 5319238 on oca-sorrento:9.0-mis_builder-sorrento into be32b21 on OCA:9.0.

# -*- coding: utf-8 -*-
# © 2014-2015 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
""" A trivial immutable array that supports basic arithmetic operations.
Copy link
Member

Choose a reason for hiding this comment

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

This is somewhat like numpy.array without pulling all of numpy, am I right?

Copy link
Member Author

Choose a reason for hiding this comment

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

@lepistone it is. I kind of thought pulling numpy was not appropriate 😉
In the end SimpleArray does a bit more wrt exception handling (DataError).

Copy link
Member

Choose a reason for hiding this comment

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

OK!

@lepistone
Copy link
Member

Great work, thanks! 👍

I think I can merge this!

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.

None yet