Commit Graph

54 Commits

Author SHA1 Message Date
Christophe Simonis d73eeab5ba [MERGE] forward port of branch 7.0 up to 9fe040e 2015-02-11 16:39:11 +01:00
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
Gery Debongnie 4b3076e955 [IMP] improves the reporting views in account module (work on the Pivot tables, and remove some useless day/month/year attributes) (addon account)
bzr revid: ged@openerp.com-20140129160348-230nvcutbdqh1hx1
2014-01-29 17:03:48 +01:00
Quentin (OpenERP) f2e942ac44 [IMP] account: added the possibility to group by country in invoice analysis, uppon urgent request of fp
bzr revid: qdp-launchpad@openerp.com-20130514120518-2u7j3xaslxj8j1c7
2013-05-14 14:05:18 +02:00
Quentin (OpenERP) 33f27b362b [MERGE] forward port of addons v7 up to revision 9045
bzr revid: qdp-launchpad@openerp.com-20130422153449-c62emljfa4a49758
2013-04-22 17:34:49 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Quentin (OpenERP) 50c9f116a5 [FIX] account: fixed invoice analysis in multi-currency.
bzr revid: qdp-launchpad@openerp.com-20130321185541-21uce7bzo82y059g
2013-03-21 19:55:41 +01:00
Cecile Tonglet a3939acfa5 [FIX] replace from/import decimal_precision by from/import openerp.addons.decimal_precision
bzr revid: cto@openerp.com-20121217152303-8e3b1x30rlw9cb0d
2012-12-17 16:23:03 +01:00
Vo Minh Thu e7f4891d46 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy
2012-12-06 15:56:32 +01:00
Quentin (OpenERP) b75fde3773 [FIX] account, sale_crm: fixed invoices analysis
bzr revid: qdp-launchpad@openerp.com-20121129134842-cro77z9siesjifdm
2012-11-29 14:48:42 +01:00
Quentin (OpenERP) b6997b7c74 [FIX] account: not enough argument given during format string
bzr revid: qdp-launchpad@openerp.com-20121129130346-ewydqj74l8h9qrby
2012-11-29 14:03:46 +01:00
Quentin (OpenERP) 7a50367e84 [IMP] account: optimized the account invoice analysis report to lower the response time. Removed the fields due_delay and delay_to_pay that were the reasons of the bad performances besides being a bit useless and having wrong values computed
bzr revid: qdp-launchpad@openerp.com-20121129101228-6cxv07svxnbabfr0
2012-11-29 11:12:28 +01:00
Vijaykumar Baladaniya d17568d572 [IMP] Add section_id in the invoice analysis report.
bzr revid: vba@tinyerp.com-20121121101909-hez6fxcqcyn3njy8
2012-11-21 15:49:09 +05:30
Vijaykumar Baladaniya 4cbd5c58fc [IMP]Add section_id in the invoice analysis report.
bzr revid: vba@tinyerp.com-20121121055817-3sw9yoac1xv12l2i
2012-11-21 11:28:17 +05:30
Mayur Maheshwari (OpenERP) 8346293d72 [MERGE]: Merge with lp:openobject-addons
bzr revid: mma@tinyerp.com-20121015090200-irfaskfn9i1p68j9
bzr revid: mma@tinyerp.com-20121016052513-vl56jxtp7xbpa2ry
2012-10-16 10:55:13 +05:30
Quentin (OpenERP) b5b9bc9872 [FIX] account, invoice analysis report: fixed 2 bugs in multi-currency environments (1) wrong currency rate chosen for transformation into base currency because of missing 'order by' statement; (2) re-transformation of amounts into user's currency instead of leaving them in base currency (rate=1)
bzr revid: qdp-launchpad@openerp.com-20121015112530-6bbo1xia2f3i5fzf
2012-10-15 13:25:30 +02:00
Mayur Maheshwari (OpenERP) 0b87880029 [IMP]all: imporve string state to status
bzr revid: mma@tinyerp.com-20121012114258-w2q3hg1wb5wlt8wi
2012-10-12 17:12:58 +05:30
Fabien Pinckaers 5c791531aa [IMP] improved typos
bzr revid: fp@tinyerp.com-20120522161055-6013qr1s4p773hoj
2012-05-22 18:10:55 +02:00
Saurang Suthar (OpenERP) 2ad3b32160 [IMP]:improved title Minimum Salesman by Salesperson everywhere
bzr revid: ssu@tinyerp.com-20120504121326-nqpx2eyqc1qrp04w
2012-05-04 17:43:26 +05:30
Jagdish Panchal (Open ERP) 7f9855ee2c [IMP] UOM to Unit of Measure everywhere in account and Picking and Invoicing Policy to Invoicing Policy in sale/res_config.py
bzr revid: jap@tinyerp.com-20120425070825-r8z56xhz42dpthep
2012-04-25 12:38:25 +05:30
Kuldeep Joshi (OpenERP) a082f8a977 [IMP] account: remove address filed
bzr revid: kjo@tinyerp.com-20120305101605-swk7at0hi1ghcr4c
2012-03-05 15:46:05 +05:30
Kuldeep Joshi (OpenERP) fd384fe645 [IMP] account : remove invoice address
bzr revid: kjo@tinyerp.com-20120305064845-aezglwmj86fi2ndc
2012-03-05 12:18:45 +05:30
ARA (OpenERP) ba5429610f [REM] account: removing total with tax field from invoice anlysis report
bzr revid: ara@tinyerp.com-20110510115133-r34pmomampl983x5
2011-05-10 17:21:33 +05:30
Quentin (OpenERP) 4d24d51f03 [MERGE] lp: 748178 (+ improved button label)
bzr revid: qdp-launchpad@openerp.com-20110506113252-24701a0nxguw4jaz
2011-05-06 13:32:52 +02:00
Ferdinand @ Camptocamp 0cf43b7857 [FIX] account: Improved invoice analysis report for calculation of total without tax
lp bug: https://launchpad.net/bugs/748178 fixed

bzr revid: pso@tinyerp.com-20110413073211-nktkleb1izezr7o0
2011-04-13 13:02:11 +05:30
Jay Vora (OpenERP) 3b75f9a266 [MERGE] Merged Tejas' branch for the fix of invoice analysis query (Ref : Cases 4963,5061
bzr revid: jvo@tinyerp.com-20110407122955-oa38ldo2abtfxbr4
2011-04-07 17:59:55 +05:30
Tejas (OpenERP) 787f38b5c5 FIX : Account Invoice Report, append active and limit 1 with subquery
bzr revid: tta@openerp.com-20110407115220-f1qp273vl3gpa6ke
2011-04-07 17:22:20 +05:30
qdp-launchpad@tinyerp.com afca671b1b [FIX] account: invoice analysis enhanced in order to avoid having crashes because of zero division (if a line has qtty = 0..)
bzr revid: qdp-launchpad@tinyerp.com-20110125162808-v8c5y97800szf741
2011-01-25 17:28:08 +01:00
qdp-launchpad@tinyerp.com da2b68f725 [FIX] account: invoice analysis enhanced in order to avoid having crashes because of zero division (if a line has qtty = 0..)
bzr revid: qdp-launchpad@tinyerp.com-20110125141833-0ih3owdepldifts3
2011-01-25 15:18:33 +01:00
pso a0c6493743 [FIX] account, sale, purchase: Improved analysis report
lp bug: https://launchpad.net/bugs/673835 fixed

bzr revid: pso@tinyerp.com-20101220122422-kqao990cf3q582df
2010-12-20 17:54:22 +05:30
Fabien Pinckaers 256bca359d [IMP] better useability
bzr revid: fp@tinyerp.com-20101009160143-rrcfgoyudey22zv4
2010-10-09 18:01:43 +02:00
ARA(OpenERP) 78862490d1 [IMP] Account: invoice analysis report with new field => avg due delay
bzr revid: mra@mra-laptop-20100924115017-qxjexskl8v99xtrs
2010-09-24 17:20:17 +05:30
pap (openerp) 8117491765 [IMP] Account: renamed term fiscal position to term fiscal mapping and other related terms accordingly in all the files
bzr revid: pap@tinyerp.co.in-20100916135102-w2wb0au8kdijabkt
2010-09-16 19:21:02 +05:30
qdp-launchpad@tinyerp.com e20699efa6 [FIX] account, invoice analysis: 1) price_total_tax was wrongly computed 2) invoices in other currency than the company currency are now correclty computed
bzr revid: qdp-launchpad@tinyerp.com-20100908092435-fez0zyv7wql4r651
2010-09-08 11:24:35 +02:00
vra 754a0cec0d [FIX] account: Fixed AVG calculation in invoice analysis statistic report.
bzr revid: vra@tinyerp.com-20100831070148-fyyz311ind2kizne
2010-08-31 12:31:48 +05:30
Mustufa Rangwala 451388d0b9 [IMP] Account: Invoice analysis report improved
bzr revid: mra@mra-laptop-20100814032558-ze1d30hpkczh5duj
2010-08-14 08:55:58 +05:30
Mustufa Rangwala 3eb486b62a [IMP] Account: invoice analysis=> remove reconciled field
bzr revid: mra@mra-laptop-20100813120607-6xdp3ay212y3kcdq
2010-08-13 17:36:07 +05:30
Mantavya Gajjar 3adba48137 [FIX]: fix a problme bug/544287 - partner_bank to be partner_bank_id
lp bug: https://launchpad.net/bugs/544287 fixed

bzr revid: mga@tinyerp.com-20100719134709-7vuwjnto8s5p43jz
2010-07-19 19:17:09 +05:30
apa-tiny 2e8f20a49c [FIX]:account:Invoice Analysis:improved avereage delay
bzr revid: apa@tinyerp.com-20100708120706-93lfy7hbbvhv9d40
2010-07-08 17:37:06 +05:30
apa-tiny 86d52f1a90 [FIX]:account:Invoice Analysis:improved average price
bzr revid: apa@tinyerp.com-20100708113913-xjk08pc4zi5qoly3
2010-07-08 17:09:13 +05:30
apa-tiny 7c4179edd7 [FIX]:account:Invoice Analysis:residual amount problem
bzr revid: apa@tinyerp.com-20100708104852-hanh85h3znag8o01
2010-07-08 16:18:52 +05:30
apa-tiny ec460a76eb [IMP]:account:Corrected Invoice Analysis SQL report.
bzr revid: apa@tinyerp.com-20100708094842-3a807noial4th9fz
2010-07-08 15:18:42 +05:30
vra bf8d2a73c0 [IMP][REF] Sql-injection changes, remove print statement, some space improvement.
bzr revid: vra@tinyerp.com-20100616115139-cql5oiqf622spa6p
2010-06-16 17:21:39 +05:30
nel@tinyerp.com d4b07711c1 [IMP] leads report
bzr revid: nel@tinyerp.com-20100607072419-h27um4kir4g2z31b
2010-06-07 09:24:19 +02:00
apa-tiny fc5904091a [IMP]:account:Improved Invioce Analysis report as guidline defined by al and nel.
bzr revid: apa@tinyerp.com-20100531101833-p2nx1tz2xn2327tk
2010-05-31 15:48:33 +05:30
apa-tiny c1d50b9c54 [FIX]:Fix the residual problem in invoice reports.
bzr revid: apa@tinyerp.com-20100505113955-3bxz8hjqxzu9e6ps
2010-05-05 17:09:55 +05:30
nel@tinyerp.com d73f08c4cb rename labels to be more clear
modify colspan to avoid scrolling on report timesheet

bzr revid: nel@tinyerp.com-20100503091940-ous2eyyz875op1ux
2010-05-03 11:19:40 +02:00
rch (Open ERP) 889d4d7ebc [IMP]: Improve SQL report for Invoice by adding sum Residual and Delay To Pay fields.
bzr revid: rch_open_erp-20100429114649-o46vjjrf11y4ulyx
2010-04-29 17:16:49 +05:30
rch (Open ERP) 68137a3117 [IMP]: Improve SQL report for Invoice.
bzr revid: rch_open_erp-20100429082753-ao26rotnkwjwmtfh
2010-04-29 13:57:53 +05:30
apa-tiny 3590fc02e3 [IMP]:account:improved SQL report.(Invoices)
bzr revid: apa@tinyerp.com-20100420110424-45c5c50r2kxk5iw8
2010-04-20 16:34:24 +05:30