9fe040e592
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 |
||
---|---|---|
addons | ||
debian | ||
doc | ||
history | ||
openerp | ||
scripts | ||
setup | ||
.gitignore | ||
LICENSE | ||
LICENSE.web | ||
MANIFEST.in | ||
Makefile | ||
README | ||
README.web | ||
openerp-server | ||
openerp-wsgi.py | ||
setup.cfg | ||
setup.py |
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/)