Go to file
Denis Ledoux 9fe040e592 [FIX] account: invoice analysis residual amount
When having an invoice with multiple lines having the same
product_id and account_id, the residual amount was wrong.

This is due to the fact the residual amount of each line
was computed on the residual amount of the invoice divided
by the number of lines of the invoice, and the fact the main
select of the sql view was grouped by product_id, account_id.

So, for an invoice defined as
Product Account Total
A       1       10
A       1       10
B       1       10

The invoice analysis, grouped by product, account, computed
Product Account Total   Residual
A       1       20      10
B       1       10      10

The residual amount '10' of the first line being
30 (the residual amount of the invoice)
divided by 3 (the number of lines in the invoice)

The residual amount of the invoice should actually be divided by
the number of lines in the invoice * the count
of occurences in the group by clause
So, in this case, (30 / 3) * 2 = 20

Replacing the big jointure by
SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id
to get the number of lines in the invoice
is just an optimization for performances

opw-621672
2015-02-11 13:10:54 +01:00
addons [FIX] account: invoice analysis residual amount 2015-02-11 13:10:54 +01:00
debian [FIX] packaging: debian: references to README.md removed 2014-12-24 09:45:10 +01:00
doc [IMP] update the documentation patch 2013-09-04 14:58:42 +02:00
history [IMP] use exact writing for fsf address 2013-05-14 16:29:26 +02:00
openerp [FIX] res: currency, rates name_search 2015-01-30 15:04:20 +01:00
scripts [IMP] disable the document_ftp in the run_all_with_test script 2012-09-04 12:29:25 +02:00
setup [FIX] Packaging: RedHat: prompt overriden in docker 2015-01-20 17:35:34 +01:00
.gitignore [IMP] .gitignore maintenance migration scripts 2014-10-29 19:49:26 +01:00
LICENSE [IMP] license: renamed general license file, and included note about other applicable licenses 2010-12-08 14:33:25 +01:00
LICENSE.web Put back readme and license 2012-10-11 10:52:18 +02:00
MANIFEST.in [FIX] packaging: debian: references to README.md removed 2014-12-24 09:45:10 +01:00
Makefile [IMP] *: one Makefile to rules them all. 2014-11-05 19:30:28 +01:00
README [IMP] improve experience on for openerp developers on windows, notes in setup.py and fix some imports 2012-11-07 02:57:08 +01:00
README.web Put back readme and license 2012-10-11 10:52:18 +02:00
openerp-server openerp apps main moved to cli ready for new commands 2012-11-27 01:55:13 +01:00
openerp-wsgi.py [IMP] remove shebang 2013-05-14 13:40:45 +02:00
setup.cfg [REF] Packaging: Backport of v8 packaging 2014-12-19 17:31:35 +01:00
setup.py [REF] Packaging: Backport of v8 packaging 2014-12-19 17:31:35 +01:00

README

About OpenERP
-------------

OpenERP is an OpenSource/Free software Enterprise Resource Planning and
Customer Relationship Management software. More info at:

    http://www.openerp.com

Installation on Debian/Ubuntu
-----------------------------

Add the the apt repository

    deb http://nightly.openerp.com/6.1/deb/ ./

in your source.list and type:

    $ sudo apt-get update
    $ sudo apt-get install openerp

Or download the deb file and type:

    $ sudo dpkg -i <openerp-deb-filename>
    $ sudo apt-get install install -f

Installation on RedHat, Fedora, CentOS
--------------------------------------

Install the required dependencies:

    $ yum install python
    $ easy_install pip
    $ pip install .....

Install the openerp rpm

    $ rpm -i openerp-VERSION.rpm

Installation on Windows
-----------------------

    Check the notes in setup.py

Installation on MacOSX
-----------------------

Setuping you first database
---------------------------

Point your browser to http://localhost:8069/ and click "Manage Databases", the
default master password is "admin".

Detailed System Requirements
----------------------------

The dependencies are listed in setup.py

For Luxembourg localization, you also need:

 pdftk (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/)