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. |
||
---|---|---|
.. | ||
data | ||
demo | ||
edi | ||
i18n | ||
project | ||
report | ||
security | ||
static | ||
test | ||
tests | ||
views | ||
wizard | ||
README.md | ||
__init__.py | ||
__openerp__.py | ||
account.py | ||
account_analytic_line.py | ||
account_assert_test.xml | ||
account_bank.py | ||
account_bank_statement.py | ||
account_bank_view.xml | ||
account_cash_statement.py | ||
account_end_fy.xml | ||
account_financial_report.py | ||
account_financial_report_data.xml | ||
account_installer.xml | ||
account_invoice.py | ||
account_invoice_view.xml | ||
account_invoice_workflow.xml | ||
account_menuitem.xml | ||
account_move_line.py | ||
account_pre_install.yml | ||
account_report.xml | ||
account_unit_test.xml | ||
account_view.xml | ||
company.py | ||
company_view.xml | ||
installer.py | ||
ir_sequence.py | ||
ir_sequence_view.xml | ||
partner.py | ||
partner_view.xml | ||
product.py | ||
product_view.xml | ||
res_config.py | ||
res_config_view.xml | ||
res_currency.py |
README.md
Odoo Accounting
The Odoo Open Source Accounting app allows a better way to collaborate with your accountants, your customers and control your suppliers.
Activate features on demand, from integrated analytic accounting to budget, assets and multiple companies consolidation.
A Smart User Interface
Record transactions in a few clicks and easily manage all financial activities in one place. Odoo's user interface is designed with productivity in mind.
A Better Way To Work – Together
Share access to your latest business numbers with your team and your accountant – so everyone is up to speed. From work, home or on the go.
Connect Your Bank Accounts
Import your bank statements and reconcile them in just a few clicks. Prepare payment orders based on your supplier invoices and payment terms.
Electronic invoicing and automated follow-ups
Create and send professional invoices & get paid online. Get rid of the stress of having to constantly remind your debtors. Simply set-up and automate follow-ups to get paid quickly.
Sales Integration
Automatically create invoices from sales orders, delivery orders or base them on time and material. Re-invoice expenses on projects to your customer in just a few clicks.
Purchase Integration
Control supplier invocies based on purchase orders. Get real-time inventory valuation reports automatically posted in your accounts.
Multi-Level Analytic Accounting
Integrate your analytic accounting operations with timesheets, projects, invoices, expenses, etc. No need to record transactions, all analytic entries are posted automatically following your business rules.
Everything you need to grow
Manage your assets, track expenses, control budgets, multi-level analytic accounting; Odoo has all the features you need to sustain all your business activities.
Scale With Your Organization
Odoo supports multiple currencies, multiple users with different access rights, multiple companies with real time consolidation and unlimited analytic plans.