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

7.0 mis builder backport from 8.0 #90

Merged
merged 184 commits into from Dec 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
c4a557f
[ADD] mis_builder: a module to build "Management Information System"-…
sbidoul Jul 18, 2014
9e64b91
Add the possibility to set the result of report instance in a dashboard
Jul 18, 2014
9befa37
Add demo data. Set computed result. In instance add target_move (all …
Jul 21, 2014
c587395
add datetime support, normalize query name and balance account name
Jul 23, 2014
d1bfc55
add little test for datetime support
Jul 23, 2014
0b9c532
Add mechanism to add comparison column
Jul 23, 2014
2d6887e
use openerp style to display result
Jul 23, 2014
cc430fa
correct instance to have unique period
Jul 28, 2014
ab5e88a
add company_id in period. in queries add the usable field name. add t…
Jul 30, 2014
1791b51
review of the computed table to get a more readable dict result. Allo…
Jul 30, 2014
58e07b1
add a css style expression on kpi
Jul 31, 2014
89ad437
compute average in comparison column
Jul 31, 2014
893759f
in utc_midnight use timezone to compute it
Jul 31, 2014
d5b5a53
in utc_midnight use timezone to compute it
Jul 31, 2014
0a49880
compute average only for kpi type num. Correct utc_midnight
Jul 31, 2014
f26284c
fix date in report instance to be able to test
Aug 1, 2014
128e8ce
use user format for number
Aug 1, 2014
be54ba3
set name in lower case when clean it
Aug 1, 2014
9500565
use a factor to normalize period
Aug 1, 2014
5a711db
add onchange on fields to fetch to get the list of fields name to use…
Aug 1, 2014
05d2553
Add excel export
Aug 1, 2014
6ba87e2
update excel export
Aug 4, 2014
f05e276
excel export - use dp
Aug 4, 2014
89a492c
excel export: set correct value for percentage, use format with 0 ins…
Aug 4, 2014
ca51764
set correct sequence for period/kpi
Aug 4, 2014
c22f0f0
set correct sequence for period/kpi
Aug 4, 2014
e1bb28e
add mis_builder_demo to contains some data
Aug 4, 2014
60e2ece
add some demo data
Aug 5, 2014
e4de6df
pep8
Aug 6, 2014
637c6fe
fix test
Aug 6, 2014
36c890b
Delete __init__.pyc
Aug 26, 2014
32081b8
use grouping to format number
Aug 29, 2014
4095552
[IMP] mis_builder: field_name is actually field_names
sbidoul Oct 11, 2014
d56fc27
[IMP] pep8
sbidoul Oct 11, 2014
3b326c8
[IMP] use relative imports in tests
sbidoul Oct 11, 2014
9173c34
[FIX] pep8
sbidoul Oct 11, 2014
960d1ce
[FIX] pep8
sbidoul Oct 11, 2014
f566857
[IMP] mis_builder: clarify the construction of python variables
sbidoul Oct 11, 2014
db7c487
[IMP] prepare performance optimization to fetch only used balances (WIP)
sbidoul Oct 11, 2014
9970ffe
[IMP] mis_builder performance: fetch only balances that we need
sbidoul Oct 11, 2014
4ae5083
pep8
sbidoul Oct 11, 2014
e3d8868
mis_builder: add TODO
sbidoul Oct 11, 2014
53904a7
[FIX] mis_builder: typos in docstrings
sbidoul Nov 19, 2014
7557330
add multi company record rule on mis report instance
Dec 19, 2014
918d8ba
Correct export excel from preview
Dec 19, 2014
b10cdbb
Add the variable bals_ to initialize the compute of solde
Dec 19, 2014
addc3f3
Add a default style on kpi, and combine it with the kpi style computed
Dec 23, 2014
40bdc18
add initial_balance in context
Jan 12, 2015
ac0151f
mis_builder : add computing of solde
Jan 22, 2015
e447c9e
rename default style
Jan 22, 2015
24acbaa
Refactor to get language only once. Do not compute balance if there i…
Mar 4, 2015
b95b5ef
Add tooltip to see the expression used. Add onclick to go to account.…
Mar 6, 2015
2f96d9b
mis_builder: minimal change / excel export doesn't work
Mar 6, 2015
fe71990
[ADD] Add credit and debit function
adrienpeiffer Apr 7, 2015
9563ca8
[ADD] Add initial parameter
adrienpeiffer Apr 7, 2015
8048680
[IMP] Pylint issues
adrienpeiffer Apr 7, 2015
2f9122d
[ADD] Add possibility to define domain on function
adrienpeiffer Apr 10, 2015
d8da62b
[FIX] XLS export works
adrienpeiffer Apr 10, 2015
a669fa1
[IMP] Some improvements
adrienpeiffer Apr 15, 2015
b4ec816
[FIX] Fix compute_domain method
adrienpeiffer Apr 15, 2015
2f4942a
[ADD] mis_builder: accounting expression processor
sbidoul Apr 19, 2015
f7c0ef1
[FIX] mis_builder: typos, pep8
sbidoul Apr 19, 2015
d6f69f0
[IMP] Refactor improvements using AEP
adrienpeiffer Apr 23, 2015
8a33bd9
[FIX] If user has no lang
adrienpeiffer Apr 23, 2015
2681397
[FIX] Add dependency on report_xls
adrienpeiffer Apr 23, 2015
d2b9c33
[FIX] Adapt tests for 8.0
adrienpeiffer Apr 23, 2015
0506966
[IMP] mis_builder: add method to get a domain on account.move.line fr…
sbidoul Apr 23, 2015
9a36751
[IMP] mis_builder: fix and improve get_aml_domain_for_expr
sbidoul Apr 23, 2015
b89d6b2
[IMP] mis_builder: get_aml_domain_for_expr OR domains
sbidoul Apr 23, 2015
b4da4c9
[IMP] Refactor improvements using AEP
adrienpeiffer Apr 23, 2015
cb5aec2
[IMP] Remove unnecessary code
adrienpeiffer Apr 24, 2015
4016c1e
[FIX] mis_builder: remove obsolete dependency
sbidoul Apr 24, 2015
97eac79
[IMP] mis_builder: solde -> end
sbidoul Apr 24, 2015
383258c
[FIX] mis_builder: forgot to rename one variable
sbidoul Apr 24, 2015
6072b51
[FIX] mis_builder: use safe_eval in aep
sbidoul Apr 25, 2015
b977b1c
[FIX] mis_builder: pep8 + reorder imports
sbidoul Apr 25, 2015
29939f3
[IMP] mis_builder: recompute on ValueError
sbidoul Apr 25, 2015
34acd17
[FIX] mis_builder: missing cascade delete
sbidoul Apr 25, 2015
621f5ed
[IMP] mis_builder: better list view for report instances
sbidoul Apr 25, 2015
1979248
[IMP] mis_builder: non breaking space
sbidoul Apr 25, 2015
9abd21f
[IMP] mis_builder: do not use th and label tag
sbidoul Apr 25, 2015
732779c
[IMP] mis_builder: links only on cells where drilldown is possible
sbidoul Apr 25, 2015
b513fa7
[IMP] mis_builder: code cosmetics
sbidoul Apr 25, 2015
3e65698
[IMP] mis_builder: css cosmetics
sbidoul Apr 25, 2015
10fc763
[IMP] mis_builder: refactor drilldown to move the logic to the server
sbidoul Apr 25, 2015
b09437f
[IMP] mis_builder: add KPI name in tooltips
sbidoul Apr 25, 2015
e84d6e4
[IMP] mis_builder: aep mode constants + prototype for period computation
sbidoul Apr 26, 2015
b58434d
[IMP] mis_builder: preliminary work to support expressions without ac…
sbidoul Apr 26, 2015
31f72c1
[IMP] mis_builder: support expresisons with no accounts (domain only)
sbidoul Apr 26, 2015
00c5c6d
[IMP] Refactor compute_period_domain
adrienpeiffer Apr 27, 2015
45f63f2
[IMP] mis_builder: code cosmetics
sbidoul Apr 27, 2015
4101adb
[IMP] mis_builder: rework periods computation
sbidoul Apr 27, 2015
38d34b9
[IMP] mis_builder: be more precise wrt the root account used
sbidoul Apr 28, 2015
5bf0097
[IMP] mis_builder: refactor to compute period only for modes actually…
sbidoul Apr 28, 2015
7e13cdd
[IMP] mis_builder: refactor drilldown to reuse period computation and…
sbidoul Apr 28, 2015
a1fd652
[FIX] mis_builder: fix detection of expression with accounting variables
sbidoul Apr 28, 2015
cf254c1
[IMP] mis_builder: query group by
sbidoul Apr 29, 2015
32ce310
[IMP] mis_builder: Move menus in Accounting/Configuration/Financial R…
adrienpeiffer Apr 30, 2015
ff68d74
add help in view, use NameError instead of ValueError
Apr 30, 2015
659d592
[FIX] mis builder: Catch exception on ValueError and on NameError
adrienpeiffer Apr 30, 2015
5325f46
[IMP] mis_builder: remove unncessary code for managing sequences
sbidoul May 1, 2015
ec6a03d
[FIX] mis_builder: do not raise inside function fields
sbidoul May 1, 2015
cffcae3
[IMP] mis_builder: improve documentation a bit
sbidoul May 1, 2015
2c66fa6
[IMP] mis_builder: improve legend wording
sbidoul May 1, 2015
40f281c
[IMP] mis_builder: date and modes i/e are not compatibles
sbidoul May 1, 2015
e6e96fc
[IMP] mis_builder: 8.0 remove deprecated checks and fast_suite
sbidoul May 2, 2015
afa27fc
[FIX] mis_builder: fix test suite
sbidoul May 2, 2015
3fc2bce
[IMP] mis_builder OpenERP->Odoo in headers + copyright year
sbidoul May 2, 2015
667f3f0
[IMP] mis_builder: replace groupby with a more useful aggregate
sbidoul May 3, 2015
d910987
[FIX] mis_builder: deleting mis.report cascade deletes mis.report.kpi
sbidoul May 3, 2015
71b340e
[IMP] mis_builder: refactor compute to display comparison columns aft…
sbidoul May 3, 2015
327bf39
[FIX] mis_builder: order by sequence, id so d01eb513f is correct
sbidoul May 3, 2015
b2367ab
[FIX] mis_builder: propagate context
sbidoul May 3, 2015
272de95
[IMP] mis_builder: tiny refactoring
sbidoul May 3, 2015
08a72bb
[FIX] mis_builder: OrderedDict serializes to json dict
sbidoul May 3, 2015
7cf8c30
[FIX] mis_builder: mis_widget was broken
sbidoul May 3, 2015
c2a4ff2
[FIX] mis_builder: blind attempt to fix xls report which does not eve…
sbidoul May 3, 2015
46bfc16
[FIX] mis_builder: excel export works again... strange
sbidoul May 4, 2015
2b77506
[IMP] mis_builder: add button icons and xls export from the report in…
sbidoul May 4, 2015
7cd6b56
[IMP] mis_builder: use non-breaking hyphen for negative sign
sbidoul May 5, 2015
ba77863
[IMP] mis_builder: code cosmetics
sbidoul May 5, 2015
31f6a20
[IMP] mis_buidler: avoid non-sense % comparisons with base value clos…
sbidoul May 5, 2015
f7fba77
[ADD] mis builder: Add read access for base user
adrienpeiffer May 7, 2015
ed6c06c
[IMP] mis builder: move report menu in Accounting/Reporting. Rename a…
adrienpeiffer May 7, 2015
b4eac6c
[IMP] mis_builder: add copyright header to aep.py
sbidoul May 14, 2015
ce64878
[IMP] mis_builder: improve position of MIS Report menu
adrienpeiffer May 18, 2015
34e8467
[IMP] mis_builder: no need to restrict report and instance name length
sbidoul May 18, 2015
3ec8213
[IMP] mis_builder: rename menu MIS Template -> MIS Report Template
sbidoul May 18, 2015
30be1c9
[IMP] mis_builder: pdf export embryo (working but not styled yet)
sbidoul May 4, 2015
d069c7d
[IMP] mis_builder: use internal layout for pdf export
sbidoul May 14, 2015
5d91bbf
[ADD] mis_builder: add css class on pdf report
adrienpeiffer May 26, 2015
aae1498
[ADD] mis_builder: Add possibility to define orientation on pdf report
adrienpeiffer May 26, 2015
5be0c59
[FIX] mis_builder: remove unnecessary logging
sbidoul May 27, 2015
2f4ad25
[IMP] mis_builder: improve docstrings
sbidoul Jun 6, 2015
5299f87
[IMP] mis_builder: Export as button name instead of XLS Export
sbidoul Jun 6, 2015
17f5c09
[IMP] mis_builder: manifest cosmetics
sbidoul Jun 6, 2015
af172d8
[FIX] mis_builder: percentage comparison in presence of negative values
sbidoul Jun 6, 2015
d36117e
[IMP] mis_builder: pep8
sbidoul Jun 6, 2015
ce483fb
[IMP] mis_builder: new api
sbidoul Jun 7, 2015
822e587
[IMP] mis_builder: cleanup manifest
sbidoul Jun 7, 2015
2c1d3c6
[FIX] mis_builder: fix regexp in legacy mode for account codes contai…
sbidoul Jun 7, 2015
f2f1c86
[IMP] mis_builder: root account must be selected by user
sbidoul Jun 7, 2015
02f4f71
[IMP] mis_builder_demo: use new balance syntax
sbidoul Jun 7, 2015
6c742b0
[IMP] mis_builder: more compact view
sbidoul Jun 7, 2015
826b831
[IMP] mis_builder: improve kpi _onchange_type
sbidoul Jun 7, 2015
3b4740d
[IMP] mis_builder: log conditional style evaluation errors
sbidoul Jun 7, 2015
3624b2b
[FIX] mis_builder: better locale-aware date headers
sbidoul Jun 7, 2015
df2d2f7
[FIX] mis_builder: translatable comparison column header
sbidoul Jun 7, 2015
9a77cf1
[IMP] mis_builder: remove old api remnant
sbidoul Jun 7, 2015
f79034f
[FIX] mis_builder: fix time computation regression introduced in new …
sbidoul Jun 7, 2015
fdd153e
[FIX] mis_builder: fix test
sbidoul Jun 7, 2015
6942f83
[IMP] mis_builder: unused imports in test
sbidoul Jun 7, 2015
2b60a19
[IMP] mis_builder: fix docstring and improve readability of get_aml_d…
sbidoul Jun 7, 2015
495693d
[ADD] backport mis_builder from 8.0
lmignon Jun 11, 2015
38a4eb2
[FIX] Tests
lmignon Jun 15, 2015
15b122b
fix little mistake with period computation
Jun 18, 2015
05b6a04
correct comparison function name call. correct drill_down
Jul 15, 2015
1d04f6b
[IMP] mis_builder: migration script to populate new column root_account
sbidoul Jun 12, 2015
3d796fe
[FIX] mis_builder: pep8
sbidoul Jun 12, 2015
64b5a14
[FIX] mis_builder: in some cases with other report, ids isn't initial…
adrienpeiffer Jun 17, 2015
764534e
[IMP] mis_builder: improve alignment with css class on pdf report
adrienpeiffer Jun 17, 2015
e5ec9e0
[FIX] mis_builder: do not crash on aggregate queries with no results
sbidoul Jun 19, 2015
18ea0fa
[FIX] mis_builder: do not arbitrarily filter on company in queries
sbidoul Jun 19, 2015
8543e13
[IMP] mis_builder: add README and screenshots
sbidoul Jul 26, 2015
e7ce944
Add ability to use ('user_id', '=', uid) in a domain
alexis-via Jul 29, 2015
621ce04
PEP8
alexis-via Jul 29, 2015
116c501
[FIX] Add OCA as author
lmignon Jul 29, 2015
0de1339
[IMP] Add module description
lmignon Jul 29, 2015
9ba019c
[IMP] mis_builder: improve eval context of query domain
sbidoul Aug 22, 2015
2a0df08
[IMP] cherry pick commits in V8 from a809796 to 09d69b9 and adapt th…
JordiBForgeFlow Oct 28, 2015
17560f6
import guard for report_xls
lepistone Aug 25, 2015
9d26832
Add static description to get a proper look on app store
lmignon Aug 26, 2015
9f28fe6
[FIX] Heading levels
lmignon Aug 26, 2015
1ee7dc0
[IMP] mis_builder: update min/max function signatures
sbidoul Aug 28, 2015
5420d7a
[FIX] mis_builder: correct implementation and doctests for _min/_max
sbidoul Aug 30, 2015
2105849
[IMP] cherry-pick commits from v8 and adapt.
JordiBForgeFlow Oct 30, 2015
50ed925
[IMP] manual cherry picking of v8 commits 4f60e4c af05e07 f4fbab3 and…
JordiBForgeFlow Nov 2, 2015
4260b11
[FIX] fix flake8 and pylint errors
JordiBForgeFlow Nov 2, 2015
12557f3
mis_builder backport: squash last pep8 errors
sbidoul Nov 2, 2015
29ea048
[FIX] remove field 'landscape_pdf' and reorganize views for better vi…
JordiBForgeFlow Nov 3, 2015
e6ecd5b
[FIX] avoid division by 0
JordiBForgeFlow Dec 3, 2015
6e96478
Upgrades travis.yml to latest OCA standard
lmignon Dec 4, 2015
35c47a2
PEP8 Make the docstring a raw string to avoid Pylint W1401
lmignon Dec 4, 2015
1cdf38d
Fixes date convert to _utc_midnight
lmignon Dec 4, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 15 additions & 8 deletions .travis.yml
@@ -1,32 +1,39 @@
sudo: false
cache: pip

addons:
apt:
packages:
sources:
- pov-wkhtmltopdf
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow
- wkhtmltopdf

language: python

python:
- "2.7"

env:
- VERSION="7.0" ODOO_REPO="odoo/odoo"
- VERSION="7.0" ODOO_REPO="OCA/OCB"
- VERSION="7.0" LINT_CHECK="1"
- VERSION="7.0" ODOO_REPO="odoo/odoo" LINT_CHECK="0"
- VERSION="7.0" ODOO_REPO="OCA/OCB" LINT_CHECK="0"

virtualenv:
system_site_packages: true

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

install:
- git clone https://github.com/OCA/reporting-engine ${HOME}/reporting-engine -b ${VERSION}
- git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-precise-amd64.deb
- sudo dpkg -i wkhtmltox-0.12.1_linux-precise-amd64.deb
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly

script:
- travis_run_flake8
- travis_run_tests

after_success:
coveralls
- travis_after_tests_success
2 changes: 1 addition & 1 deletion account_chart_report/__openerp__.py
Expand Up @@ -25,7 +25,7 @@
'name': 'Print chart of accounts',
'version': '1.0',
'category': 'Reports/pdf',
'description': """Print chart of accounts.
'description': r"""Print chart of accounts.

This module add the menu Accounting \ Charts \ Print chart of Accounts
and allow to print the selected chart of accounts.
Expand Down
27 changes: 27 additions & 0 deletions mis_builder/__init__.py
@@ -0,0 +1,27 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# mis_builder module for Odoo, Management Information System Builder
# Copyright (C) 2014-2015 ACSONE SA/NV (<http://acsone.eu>)
#
# This file is a part of mis_builder
#
# mis_builder is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License v3 or later
# as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# mis_builder is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License v3 or later for more details.
#
# You should have received a copy of the GNU Affero General Public License
# v3 or later along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import models
from . import wizard
from . import report
172 changes: 172 additions & 0 deletions mis_builder/__openerp__.py
@@ -0,0 +1,172 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# mis_builder module for Odoo, Management Information System Builder
# Copyright (C) 2014-2015 ACSONE SA/NV (<http://acsone.eu>)
#
# This file is a part of mis_builder
#
# mis_builder is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License v3 or later
# as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# mis_builder is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License v3 or later for more details.
#
# You should have received a copy of the GNU Affero General Public License
# v3 or later along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

{
'name': 'MIS Builder',
'version': '0.2',
'category': 'Reporting',
'summary': """
Build 'Management Information System' Reports and Dashboards
""",
'description': """
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
===========
MIS Builder
===========

This module allows you to build Management Information Systems dashboards.
Such style of reports presents KPI in rows and time periods in columns.
Reports mainly fetch data from account moves, but can also combine data coming
from arbitrary Odoo models. Reports can be exported to PDF, Excel and they
can be added to Odoo dashboards.

Installation
============

There is no specific installation procedure for this module.

Configuration and Usage
=======================

To configure this module, you need to:

* Go to Accounting > Configuration > Financial Reports > MIS Report Templates
where you can create report templates by defining KPI's. KPI's constitute
the rows of your reports. Such report templates are time independent.

* Then in Accounting > Reporting > MIS Reports you can create report instance
by binding the templates to time period, hence defining the columns of your
reports.

* From the MIS Report view, you can preview the report, add it to and Odoo
dashboard, and export it to Excel.

Developer notes
===============

A typical extension is to provide a mechanism to filter reports on analytic
dimensions or operational units. To implement this, you can override
_get_additional_move_line_filter and _get_additional_filter to further
filter move lines or queries based on a user selection. A typical use case
could be to add an analytic account field on mis.report.instance, or even
on mis.report.instance.period if you want different columns to show different
analytic accounts.

Known issues / Roadmap
======================

* Add 'Fiscal Year' period type.

* Allow selecting accounts by type. This is currently possible by expressing
a query such as balp[][('account_id.user_type.code', '=', ...)].
This will work but would be more efficient if one could write balp[
user_type=...], as it would involve much less queries to the database.

* More tests should be added. The first part is creating test data, then it
will be easier. At the minimum, We need the following test data:

* one account charts with a few normal accounts and view accounts,
* two fiscal years,
* an opening entry in the second fiscal year,
* to test multi-company consolidation, we need a second company with it's own
account chart and two fiscal years, but without opening entry; we also need
a third company which is the parent of the other two and has a
consolidation chart of account.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/account-financial-reporting/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and
welcomed feedback `here <https://github.com/OCA/account-financial-reporting
/issues/new?body=module:%20mis_builder%0Aversion:%208.0%0A%0A**Steps%20to%20
reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior
**>`_.

Credits
=======

Contributors
------------

* Stéphane Bidoul <stephane.bidoul@acsone.eu>
* Laetitia Gangloff <laetitia.gangloff@acsone.eu>
* Adrien Peiffer <adrien.peiffer@acsone.eu>
* Jordi Ballester <jordi.ballester@eficent.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.
""",
'author': 'ACSONE SA/NV,'
'Odoo Community Association (OCA)',
'website': 'http://acsone.eu',
'depends': [
'account',
'report_xls', # OCA/reporting-engine
],
'data': [
'wizard/mis_builder_dashboard.xml',
'views/mis_builder.xml',
'security/ir.model.access.csv',
'security/mis_builder_security.xml',
],
'test': [
],
'demo': [
'tests/mis.report.kpi.csv',
'tests/mis.report.query.csv',
'tests/mis.report.csv',
'tests/mis.report.instance.period.csv',
'tests/mis.report.instance.csv',
],
'js': [
'static/src/js/*.js'
],
'css': [
'static/src/css/*.css'
],
'qweb': [
'static/src/xml/*.xml'
],
'installable': True,
'application': True,
'auto_install': False,
'license': 'AGPL-3',
}
42 changes: 42 additions & 0 deletions mis_builder/migrations/7.0.0.2/pre-migration.py
@@ -0,0 +1,42 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# mis_builder module for Odoo, Management Information System Builder
# Copyright (C) 2014-2015 ACSONE SA/NV (<http://acsone.eu>)
#
# This file is a part of mis_builder
#
# mis_builder is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License v3 or later
# as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# mis_builder is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License v3 or later for more details.
#
# You should have received a copy of the GNU Affero General Public License
# v3 or later along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################


def migrate(cr, version):
if not version:
return

cr.execute("""
ALTER TABLE mis_report_instance
ADD COLUMN root_account INTEGER
""")
cr.execute("""
UPDATE mis_report_instance
SET root_account = (
SELECT id FROM account_account
WHERE parent_id IS NULL
AND company_id = mis_report_instance.company_id
LIMIT 1
)
""")
26 changes: 26 additions & 0 deletions mis_builder/models/__init__.py
@@ -0,0 +1,26 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# mis_builder module for Odoo, Management Information System Builder
# Copyright (C) 2014-2015 ACSONE SA/NV (<http://acsone.eu>)
#
# This file is a part of mis_builder
#
# mis_builder is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License v3 or later
# as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# mis_builder is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License v3 or later for more details.
#
# You should have received a copy of the GNU Affero General Public License
# v3 or later along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import mis_builder
from . import aep