summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuldeep Joshi (OpenERP) <kjo@tinyerp.com>2011-11-10 12:42:45 +0530
committerKuldeep Joshi (OpenERP) <kjo@tinyerp.com>2011-11-10 12:42:45 +0530
commit8764f304bce59d9cb79dd5ea6818f4e4b02a879b (patch)
treeae35e94c071f1007fb7a2a8c41275260b855dccf
parent9b457c2bcdf44e2dc43477e6b2203de1e73020df (diff)
[FIX]change in all analysis report
bzr revid: kjo@tinyerp.com-20111110071245-fxof230tqmtnbepc
-rw-r--r--addons/account/report/account_entries_report.py4
-rw-r--r--addons/account/report/account_invoice_report.py3
-rw-r--r--addons/account_voucher/report/account_voucher_sales_receipt.py2
-rw-r--r--addons/auction/report/report_auction.py3
-rw-r--r--addons/event/report/report_event_registration.py6
-rw-r--r--addons/hr_expense/report/hr_expense_report.py2
-rw-r--r--addons/hr_recruitment/report/hr_recruitment_report.py2
-rw-r--r--addons/hr_timesheet_sheet/report/hr_timesheet_report.py4
-rw-r--r--addons/hr_timesheet_sheet/report/timesheet_report.py3
-rw-r--r--addons/point_of_sale/report/pos_order_report.py3
-rw-r--r--addons/stock/report/report_stock.py1
-rw-r--r--addons/stock/report/report_stock_move.py5
12 files changed, 5 insertions, 33 deletions
diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
index 04a139ff1b6..36a7ceb8ce9 100644
--- a/addons/account/report/account_entries_report.py
+++ b/addons/account/report/account_entries_report.py
@@ -149,9 +149,7 @@ class account_entries_report(osv.osv):
left join account_account a on (l.account_id = a.id)
left join account_move am on (am.id=l.move_id)
left join account_period p on (am.period_id=p.id)
- left join product_product pr on (l.product_id=pr.id)
- left join res_partner rp on (l.partner_id=rp.id)
- where l.state != 'draft' and a.active='true' and rp.active='true' and pr.active='true'
+ where l.state != 'draft'
)
""")
account_entries_report()
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index e48d57cdce8..ff98088f0fd 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -163,12 +163,9 @@ class account_invoice_report(osv.osv):
left join product_product pr on (pr.id=ail.product_id)
left join product_template pt on (pt.id=pr.product_tmpl_id)
left join product_uom u on (u.id=ail.uos_id)
- left join res_partner rp on (ai.partner_id=rp.id)
- left join account_account aa on (ail.account_id=aa.id),
res_currency_rate cr
where cr.id in (select id from res_currency_rate cr2 where (cr2.currency_id = ai.currency_id)
and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) limit 1)
- and rp.active='true' and pr.active='true' and aa.active='true'
group by ail.product_id,
ai.date_invoice,
ai.id,
diff --git a/addons/account_voucher/report/account_voucher_sales_receipt.py b/addons/account_voucher/report/account_voucher_sales_receipt.py
index 8d1517ac79f..b31dedc8aa1 100644
--- a/addons/account_voucher/report/account_voucher_sales_receipt.py
+++ b/addons/account_voucher/report/account_voucher_sales_receipt.py
@@ -103,7 +103,7 @@ class sale_receipt_report(osv.osv):
left join account_voucher as av on (av.id=avl.voucher_id)
left join res_partner as rp ON (rp.id=av.partner_id)
left join account_journal as aj ON (aj.id=av.journal_id)
- where av.type='sale' and aj.type in ('sale','sale_refund') and rp.active='true'
+ where av.type='sale' and aj.type in ('sale','sale_refund')
group by
av.date,
av.id,
diff --git a/addons/auction/report/report_auction.py b/addons/auction/report/report_auction.py
index e704b09edc7..012ea3c891e 100644
--- a/addons/auction/report/report_auction.py
+++ b/addons/auction/report/report_auction.py
@@ -86,9 +86,8 @@ class report_auction(osv.osv):
auction_lots al,
auction_dates ad,
auction_deposit ade
- left join res_partner rp on (ade.partner_id=rp.id)
where
- ad.id=al.auction_id and ade.id=al.bord_vnd_id and rp.active='true'
+ ad.id=al.auction_id and ade.id=al.bord_vnd_id
group by
ad.auction1,
al.ach_uid,
diff --git a/addons/event/report/report_event_registration.py b/addons/event/report/report_event_registration.py
index b65d2ed15e0..61e2238b585 100644
--- a/addons/event/report/report_event_registration.py
+++ b/addons/event/report/report_event_registration.py
@@ -100,11 +100,7 @@ class report_event_registration(osv.osv):
event_registration c ON (e.id=c.event_id)
LEFT JOIN
event_type t ON (e.type=t.id)
- LEFT JOIN
- product_product p ON (e.product_id=p.id)
- LEFT JOIN
- res_partner rp ON (e.main_speaker_id=rp.id)
- WHERE c.active = 'true' and p.active='true' and rp.active='true'
+ WHERE c.active = 'true'
GROUP BY
to_char(e.date_begin, 'YYYY'),
to_char(e.date_begin, 'MM'),
diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py
index 41627d1864d..df630931875 100644
--- a/addons/hr_expense/report/hr_expense_report.py
+++ b/addons/hr_expense/report/hr_expense_report.py
@@ -100,8 +100,6 @@ class hr_expense_report(osv.osv):
from hr_expense_line l
left join hr_expense_expense s on (s.id=l.expense_id)
left join product_uom u on (u.id=l.uom_id)
- left join product_product pp on (pp.id=l.product_id)
- where pp.active='true'
group by
date_trunc('day',s.date),
to_char(date_trunc('day',s.create_date), 'YYYY'),
diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py
index e04144744df..5234e933813 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report.py
+++ b/addons/hr_recruitment/report/hr_recruitment_report.py
@@ -99,8 +99,6 @@ class hr_recruitment_report(osv.osv):
extract('epoch' from (s.date_closed-s.create_date))/(3600*24) as delay_close,
count(*) as nbr
from hr_applicant s
- left join res_partner rp on (s.partner_id=rp.id)
- where rp.active='true'
group by
to_char(s.create_date, 'YYYY'),
to_char(s.create_date, 'MM'),
diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py
index c2276e35436..d20ad3a5f4c 100644
--- a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py
+++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py
@@ -68,10 +68,6 @@ class hr_timesheet_report(osv.osv):
from
hr_analytic_timesheet as t
left join account_analytic_line as l ON (t.line_id=l.id)
- left join product_product as pp on (l.product_id=pp.id)
- left join account_account as aa on (l.general_account_id=aa.id)
- left join res_users as u on (l.user_id= u.id)
- where pp.active='true' and aa.active='true' and u.active='true'
group by
l.date,
l.account_id,
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py
index 61f39846cd6..a8c0440a053 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report.py
+++ b/addons/hr_timesheet_sheet/report/timesheet_report.py
@@ -98,9 +98,6 @@ class timesheet_report(osv.osv):
from account_analytic_line as aal
left join hr_analytic_timesheet as hat ON (hat.line_id=aal.id)
left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id)
- left join account_account as aa on (aal.general_account_id=aa.id)
- left join product_product as pp on (aal.product_id=pp.id)
- where aa.active='true' and pp.active='true'
group by
to_char(htss.date_current,'YYYY'),
to_char(htss.date_current,'MM'),
diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py
index f4c88fc0d05..ceb20a11a36 100644
--- a/addons/point_of_sale/report/pos_order_report.py
+++ b/addons/point_of_sale/report/pos_order_report.py
@@ -77,9 +77,6 @@ class pos_order_report(osv.osv):
left join pos_order s on (s.id=l.order_id)
left join product_template pt on (pt.id=l.product_id)
left join product_uom u on (u.id=pt.uom_id)
- left join res_partner rp on (s.partner_id=rp.id)
- left join product_product pp on (pp.id=l.product_id)
- where rp.active='true' and pp.active='true'
group by
to_char(s.date_order, 'dd-MM-YYYY'),to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),
to_char(s.date_order, 'YYYY-MM-DD'), s.partner_id,s.state,
diff --git a/addons/stock/report/report_stock.py b/addons/stock/report/report_stock.py
index 6344fe2c044..37e4f28c858 100644
--- a/addons/stock/report/report_stock.py
+++ b/addons/stock/report/report_stock.py
@@ -159,6 +159,7 @@ class report_stock_lines_date(osv.osv):
left outer join stock_inventory_line l on (p.id=l.product_id)
left join stock_inventory s on (l.inventory_id=s.id)
and s.state = 'done'
+ where p.active='true'
group by p.id
)""")
report_stock_lines_date()
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index 93635e27dda..021c88e0c31 100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
@@ -128,9 +128,6 @@ class report_stock_move(osv.osv):
LEFT JOIN product_uom pu ON (sm.product_uom=pu.id)
LEFT JOIN product_uom pu2 ON (sm.product_uom=pu2.id)
LEFT JOIN product_template pt ON (pp.product_tmpl_id=pt.id)
- LEFT JOIN stock_location sl ON (sm.location_id = sl.id)
- LEFT JOIN res_partner rp on(sm.partner_id = rp.id)
- where pp.active = 'true' and rp.active='true' and sl.active='true'
GROUP BY
sm.id,sp.type, sm.date,sm.address_id,
sm.product_id,sm.state,sm.product_uom,sm.date_expected,
@@ -189,7 +186,6 @@ CREATE OR REPLACE view report_stock_inventory AS (
LEFT JOIN product_uom pu2 ON (m.product_uom=pu2.id)
LEFT JOIN product_uom u ON (m.product_uom=u.id)
LEFT JOIN stock_location l ON (m.location_id=l.id)
- WHERE pp.active = 'true' and l.active='true'
GROUP BY
m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id, m.location_dest_id,
m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id
@@ -211,7 +207,6 @@ CREATE OR REPLACE view report_stock_inventory AS (
LEFT JOIN product_uom pu2 ON (m.product_uom=pu2.id)
LEFT JOIN product_uom u ON (m.product_uom=u.id)
LEFT JOIN stock_location l ON (m.location_dest_id=l.id)
- WHERE pp.active = 'true' and l.active='true'
GROUP BY
m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id, m.location_dest_id,
m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id