[FIX]change in all analysis report

bzr revid: kjo@tinyerp.com-20111110071245-fxof230tqmtnbepc
This commit is contained in:
Kuldeep Joshi (OpenERP) 2011-11-10 12:42:45 +05:30
parent 9b457c2bcd
commit 8764f304bc
12 changed files with 5 additions and 33 deletions

View File

@ -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()

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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'),

View File

@ -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'),

View File

@ -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'),

View File

@ -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,

View File

@ -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'),

View File

@ -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,

View File

@ -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()

View File

@ -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