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
7.0 mis builder backport from 8.0 #90
Conversation
My PR fixing the travis and runbot builds on the 8.0 branch were recently merged. Can you rebase your PR? |
5547c0f
to
b666d1f
Compare
@gurneyalex done. |
b666d1f
to
c6a732b
Compare
I let you backport the fixes asked on #86 when they get applied in there 😸 |
I implemented this module on a 7.0 instance for some statistics unrelated to accounting, it works like a charm (with SUM and AVG queries). 👍 |
275a8e6
to
e717d5c
Compare
rebased |
Can you squash the commit history. 179 commit seems a lot of commits. |
@pedrobaeza the commits are in the 8.0 branch. And there are several authors. Not sure why travis is complaining. Anyway errors seem unrelated so 👍 Thanks @jbeficent for the last effort. |
|
All commits from different authors come together, so not too much, but I'm not going to force you. |
@sbidoul Not sure why Travis fails. It's not related to the changes made. |
elif query.aggregate == 'max': | ||
agg = max | ||
elif query.aggregate == 'avg': | ||
agg = lambda l: sum(l) / float(len(l)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I encounter a problem here, a division by 0 could happen if there is no rows to compute.
I fixed it with the following line:
agg = lambda l: l and sum(l) / float(len(l)) or 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbidoul @jbeficent thanks
Travis says: But in OCA maintainer-tools template: https://github.com/OCA/maintainer-tools/blob/master/template/module/__openerp__.py I don't see this parameter being a requirement. |
We been using MIS Builder V7 successfully and would be glad if its gets pushed to OCA asap. Thanks, |
…style reports Such reports combine accounting and operational data. This initial commit is a first proof-of-concept prototype.
…or posted). Add onchange and check function on report
…ooltip on the result (to display val_c). add from to. right align for column header and values. update preview form to have better display. define security
…w to compare column with any column of the table.
Conflicts: mis_builder/__openerp__.py cherry-pick from v8
Make it closer to the evaluation context available for server actions. Conflicts: mis_builder/models/mis_builder.py cherry-pick from v8
The dependency is indeed declared in __openerp__.py and will be enforced. Odoo evaluates all python files, even for modules which are not installed, and crashes if an unneeded dependency is needed. Conflicts: mis_builder/report/__init__.py cherry picked
The description has been generated using rst2html5. The path to the images has been manually fixed by removing 'static/description/' from the path. The body element has been replaced by a section wrapping the whole content.
Conflicts: mis_builder/README.rst cherry pick to v7
so min(x, y, ...) and min([x, y, ..]) both work as expected.
Conflicts: mis_builder/models/mis_builder.py cherry pick from v8
30744ab
to
e6ecd5b
Compare
I rebased. No idea why travis fails. Seems unrelated. IMO, this is good for merging. |
There are 2 pytlint errors
And travis need to fixed. The tests fails since the dependencies are no more checked out in the directory exepected by |
Pep8 issue is fixed and travis runs but it seems that we have a regression. https://travis-ci.org/OCA/account-financial-reporting/jobs/94815699#L335
|
bac9872
to
1cdf38d
Compare
@sbidoul Travis is green. It's ready to be merged |
I'm merging now. Many thanks to all who contributed to this backport. |
7.0 mis builder backport from 8.0
[8.0] account_default_draft_move uses tuples instead of lists in sql operations
Back port mis_builder from 8.0 (#86)