caf333eb59
The SQL view implementing the "Invoice Analysis" report JOINs the res.currency.rate table in order to obtain the correct currency rate to convert each invoice line amount in the same currency. The matching of the rate needs to be done on the date of that rate (`name` column) - the last rate preceding the invoice date is presumed to be the right one. However there is no simple way to make a direct JOIN between account.invoice.line and res.currency.rate with a single match, without using an ORDER BY clause and LIMIT 1. This requires a costly SUBSELECT query for each invoice line, quickly becoming prohibitive. Through the use of PostgreSQL's Common Table Expressions (CTE) it is possible to construct a temporary table with the rates' start and end date of application. This temporary table can then be used in a direct JOIN with account.invoice.line, delivering much better performance (no SUBSELECT needed for each invoice line) On a database with 50k invoice lines this makes invoice analysis return results in less than 800 ms instead of 10+ seconds. |
||
---|---|---|
addons | ||
debian | ||
doc | ||
openerp | ||
setup | ||
.gitignore | ||
.mailmap | ||
CONTRIBUTING.md | ||
LICENSE | ||
MANIFEST.in | ||
Makefile | ||
README.md | ||
odoo.py | ||
openerp-gevent | ||
openerp-server | ||
openerp-wsgi.py | ||
requirements.txt | ||
setup.cfg | ||
setup.py |
README.md
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
If you are a developer you may type the following command at your terminal:
wget -O- https://raw.githubusercontent.com/odoo/odoo/8.0/odoo.py | python
Then follow the developer tutorials
For Odoo employees
To add the odoo-dev remote use this command:
$ ./odoo.py setup_git_dev
To fetch odoo merge pull requests refs use this command:
$ ./odoo.py setup_git_review