From 477af5167d481dab311c922af1908730c452bc05 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Fri, 4 Nov 2011 15:53:15 +0530 Subject: [PATCH 1/4] [FIX]project: task analysis show only task not tamplate lp bug: https://launchpad.net/bugs/885610 fixed bzr revid: kjo@tinyerp.com-20111104102315-y2vi54kx3vbg5r08 --- addons/project/report/project_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py index fb1b0b030d6..e42cd523dc1 100644 --- a/addons/project/report/project_report.py +++ b/addons/project/report/project_report.py @@ -91,7 +91,7 @@ class report_project_task_user(osv.osv): (extract('epoch' from (t.date_start-t.create_date)))/(3600*24) as opening_days, abs((extract('epoch' from (t.date_deadline-t.date_end)))/(3600*24)) as delay_endings_days FROM project_task t - + where t.active = 'true' GROUP BY t.id, remaining_hours, From c5727fbb9c829bb85a75c8fa0ace2bf3391a7b75 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 8 Nov 2011 15:23:26 +0530 Subject: [PATCH 2/4] [FIX]all anlysis not show active=false bzr revid: kjo@tinyerp.com-20111108095326-glcdy7gnv0rshkn3 --- addons/crm/report/crm_lead_report.py | 1 + addons/crm_fundraising/report/crm_fundraising_report.py | 1 + addons/crm_helpdesk/report/crm_helpdesk_report.py | 1 + addons/project_issue/report/project_issue_report.py | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py index 24f48e7de86..a2215d28740 100644 --- a/addons/crm/report/crm_lead_report.py +++ b/addons/crm/report/crm_lead_report.py @@ -147,6 +147,7 @@ class crm_lead_report(osv.osv): extract('epoch' from (c.date_open-c.create_date))/(3600*24) as delay_open FROM crm_lead c + WHERE c.active = 'true' )""") crm_lead_report() diff --git a/addons/crm_fundraising/report/crm_fundraising_report.py b/addons/crm_fundraising/report/crm_fundraising_report.py index 107ebf06bf5..c0f3ec8c3a6 100644 --- a/addons/crm_fundraising/report/crm_fundraising_report.py +++ b/addons/crm_fundraising/report/crm_fundraising_report.py @@ -97,6 +97,7 @@ class crm_fundraising_report(osv.osv): avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close from crm_fundraising c + where c.active = 'true' group by to_char(c.date, 'YYYY'), to_char(c.date, 'MM'),\ c.state, c.user_id,c.section_id,c.categ_id,type_id,c.partner_id,c.company_id, c.create_date,to_char(c.date, 'YYYY-MM-DD') diff --git a/addons/crm_helpdesk/report/crm_helpdesk_report.py b/addons/crm_helpdesk/report/crm_helpdesk_report.py index 80fc07db38d..55643d9b0f8 100644 --- a/addons/crm_helpdesk/report/crm_helpdesk_report.py +++ b/addons/crm_helpdesk/report/crm_helpdesk_report.py @@ -101,6 +101,7 @@ class crm_helpdesk_report(osv.osv): abs(avg(extract('epoch' from (c.date_deadline - c.date_closed)))/(3600*24)) as delay_expected from crm_helpdesk c + where c.active = 'true' group by to_char(c.date, 'YYYY'), to_char(c.date, 'MM'),to_char(c.date, 'YYYY-MM-DD'),\ c.state, c.user_id,c.section_id,c.priority,\ c.partner_id,c.company_id,c.date_deadline,c.create_date,c.date,c.date_closed,\ diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py index 36ce72f2a70..b550b5c47ce 100644 --- a/addons/project_issue/report/project_issue_report.py +++ b/addons/project_issue/report/project_issue_report.py @@ -104,7 +104,7 @@ class project_issue_report(osv.osv): FROM project_issue c - WHERE c.categ_id IN (select id from crm_case_categ where object_id in (select id from ir_model where model = 'project.issue')) + WHERE c.active= 'true' and c.categ_id IN (select id from crm_case_categ where object_id in (select id from ir_model where model = 'project.issue')) )""") project_issue_report() From 9b457c2bcdf44e2dc43477e6b2203de1e73020df Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Wed, 9 Nov 2011 18:12:20 +0530 Subject: [PATCH 3/4] [FIX] set active=true in anlysis report bzr revid: kjo@tinyerp.com-20111109124220-xllj7xr4yh4krvz7 --- addons/account/report/account_entries_report.py | 4 +++- addons/account/report/account_invoice_report.py | 5 ++++- .../account_voucher/report/account_voucher_sales_receipt.py | 2 +- addons/auction/report/report_auction.py | 3 ++- addons/event/report/report_event_registration.py | 5 +++++ addons/hr_expense/report/hr_expense_report.py | 2 ++ addons/hr_recruitment/report/hr_recruitment_report.py | 2 ++ addons/hr_timesheet_sheet/report/hr_timesheet_report.py | 4 ++++ addons/hr_timesheet_sheet/report/timesheet_report.py | 3 +++ addons/membership/report/report_membership.py | 2 +- addons/point_of_sale/report/pos_order_report.py | 3 +++ addons/stock/report/report_stock_move.py | 6 ++++-- 12 files changed, 34 insertions(+), 7 deletions(-) diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py index 266b4a056d7..04a139ff1b6 100644 --- a/addons/account/report/account_entries_report.py +++ b/addons/account/report/account_entries_report.py @@ -149,7 +149,9 @@ 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) - where l.state != 'draft' + 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' ) """) account_entries_report() diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index 839c9b13043..e48d57cdce8 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -162,10 +162,13 @@ class account_invoice_report(osv.osv): left join account_invoice as ai ON (ai.id=ail.invoice_id) 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 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 b31dedc8aa1..8d1517ac79f 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') + where av.type='sale' and aj.type in ('sale','sale_refund') and rp.active='true' group by av.date, av.id, diff --git a/addons/auction/report/report_auction.py b/addons/auction/report/report_auction.py index 012ea3c891e..e704b09edc7 100644 --- a/addons/auction/report/report_auction.py +++ b/addons/auction/report/report_auction.py @@ -86,8 +86,9 @@ 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 + ad.id=al.auction_id and ade.id=al.bord_vnd_id and rp.active='true' 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 e78179b9b5e..b65d2ed15e0 100644 --- a/addons/event/report/report_event_registration.py +++ b/addons/event/report/report_event_registration.py @@ -100,6 +100,11 @@ 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' 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 df630931875..41627d1864d 100644 --- a/addons/hr_expense/report/hr_expense_report.py +++ b/addons/hr_expense/report/hr_expense_report.py @@ -100,6 +100,8 @@ 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 5234e933813..e04144744df 100644 --- a/addons/hr_recruitment/report/hr_recruitment_report.py +++ b/addons/hr_recruitment/report/hr_recruitment_report.py @@ -99,6 +99,8 @@ 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 d20ad3a5f4c..c2276e35436 100644 --- a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py @@ -68,6 +68,10 @@ 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 a8c0440a053..61f39846cd6 100644 --- a/addons/hr_timesheet_sheet/report/timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/timesheet_report.py @@ -98,6 +98,9 @@ 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/membership/report/report_membership.py b/addons/membership/report/report_membership.py index c5d82332fc1..631acab46b1 100644 --- a/addons/membership/report/report_membership.py +++ b/addons/membership/report/report_membership.py @@ -109,7 +109,7 @@ class report_membership(osv.osv): LEFT JOIN membership_membership_line ml ON (ml.partner = p.id) LEFT JOIN account_invoice_line il ON (ml.account_invoice_line = il.id) LEFT JOIN account_invoice ai ON (il.invoice_id = ai.id) - WHERE p.membership_state != 'none' + WHERE p.membership_state != 'none' and p.active = 'true' GROUP BY p.id, p.user_id, diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py index ceb20a11a36..f4c88fc0d05 100644 --- a/addons/point_of_sale/report/pos_order_report.py +++ b/addons/point_of_sale/report/pos_order_report.py @@ -77,6 +77,9 @@ 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_move.py b/addons/stock/report/report_stock_move.py index d728cbf0e29..93635e27dda 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -129,14 +129,14 @@ class report_stock_move(osv.osv): 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, sm.product_id,pt.standard_price, sm.picking_id, sm.product_qty, sm.company_id,sm.product_qty, sm.location_id,sm.location_dest_id,pu.factor,pt.categ_id, sp.stock_journal_id) AS al - GROUP BY al.out_qty,al.in_qty,al.curr_year,al.curr_month, al.curr_day,al.curr_day_diff,al.curr_day_diff1,al.curr_day_diff2,al.dp,al.location_id,al.location_dest_id, @@ -189,6 +189,7 @@ 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 @@ -210,6 +211,7 @@ 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 From 8764f304bce59d9cb79dd5ea6818f4e4b02a879b Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Thu, 10 Nov 2011 12:42:45 +0530 Subject: [PATCH 4/4] [FIX]change in all analysis report bzr revid: kjo@tinyerp.com-20111110071245-fxof230tqmtnbepc --- addons/account/report/account_entries_report.py | 4 +--- addons/account/report/account_invoice_report.py | 3 --- .../account_voucher/report/account_voucher_sales_receipt.py | 2 +- addons/auction/report/report_auction.py | 3 +-- addons/event/report/report_event_registration.py | 6 +----- addons/hr_expense/report/hr_expense_report.py | 2 -- addons/hr_recruitment/report/hr_recruitment_report.py | 2 -- addons/hr_timesheet_sheet/report/hr_timesheet_report.py | 4 ---- addons/hr_timesheet_sheet/report/timesheet_report.py | 3 --- addons/point_of_sale/report/pos_order_report.py | 3 --- addons/stock/report/report_stock.py | 1 + addons/stock/report/report_stock_move.py | 5 ----- 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