diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index 1c58efb161f..3fabb495ba1 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -61,6 +61,8 @@ 'sequence_view.xml', 'company_view.xml', 'account_installer.xml', + 'report/account_invoice_report_view.xml', + 'report/account_report_view.xml', ], 'demo_xml': [ #'demo/price_accuracy00.yml', diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py index 0311398420b..71f612e0329 100644 --- a/addons/account/report/__init__.py +++ b/addons/account/report/__init__.py @@ -34,7 +34,8 @@ import general_ledger_landscape import account_tax_code import account_balance_landscape import compare_account_balance - +import account_invoice_report +import account_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py new file mode 100644 index 00000000000..0d4ac30323d --- /dev/null +++ b/addons/account/report/account_invoice_report.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import tools +from osv import fields,osv + +class account_invoice_report(osv.osv): + _name = "account.invoice.report" + _description = "Invoices Statistics" + _auto = False + _rec_name = 'date' + _columns = { + 'date': fields.date('Date', readonly=True), + 'year': fields.char('Year', size=4, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), + ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), + 'product_id':fields.many2one('product.product', 'Product', readonly=True), + 'product_qty':fields.float('Qty', readonly=True), + 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True), + 'company_id':fields.many2one('res.company', 'Company', readonly=True), + 'user_id':fields.many2one('res.users', 'Salesman', readonly=True), + 'price_total':fields.float('Total Price', readonly=True), + 'price_average':fields.float('Average Price', readonly=True), + 'nbr':fields.integer('# of Lines', readonly=True), + 'type': fields.selection([ + ('out_invoice','Customer Invoice'), + ('in_invoice','Supplier Invoice'), + ('out_refund','Customer Refund'), + ('in_refund','Supplier Refund'), + ],'Type', readonly=True), + 'state': fields.selection([ + ('draft','Draft'), + ('proforma','Pro-forma'), + ('proforma2','Pro-forma'), + ('open','Open'), + ('paid','Done'), + ('cancel','Cancelled') + ], 'Order State', readonly=True), + } + _order = 'date desc' + def init(self, cr): + tools.drop_view_if_exists(cr, 'account_invoice_report') + cr.execute(""" + create or replace view account_invoice_report as ( + select + min(l.id) as id, + s.date_invoice as date, + to_char(s.date_invoice, 'YYYY') as year, + to_char(s.date_invoice, 'MM') as month, + l.product_id as product_id, + sum(l.quantity * u.factor) as product_qty, + s.partner_id as partner_id, + s.user_id as user_id, + s.company_id as company_id, + sum(l.quantity*l.price_unit) as price_total, + (sum(l.quantity*l.price_unit)/sum(l.quantity * u.factor))::decimal(16,2) as price_average, + count(*) as nbr, + s.type as type, + s.state + from + account_invoice_line l + left join + account_invoice s on (s.id=l.invoice_id) + left join product_uom u on (u.id=l.uos_id) + group by + s.type,s.date_invoice, s.partner_id, l.product_id, + l.uos_id, s.user_id, s.state, + s.company_id + ) + """) +account_invoice_report() diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml new file mode 100644 index 00000000000..de046de6211 --- /dev/null +++ b/addons/account/report/account_invoice_report_view.xml @@ -0,0 +1,113 @@ + + + + + account.invoice.report.tree + account.invoice.report + tree + + + + + + + + + + + + + + + + + + + + + + account.invoice.report.graph + account.invoice.report + graph + + + + + + + + + + account.invoice.report.search + account.invoice.report + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invoices + account.invoice.report + form + tree,graph + + + + + + + diff --git a/addons/report_account/report_receivable.py b/addons/account/report/account_report.py similarity index 100% rename from addons/report_account/report_receivable.py rename to addons/account/report/account_report.py diff --git a/addons/report_account/report_receivable_view.xml b/addons/account/report/account_report_view.xml similarity index 100% rename from addons/report_account/report_receivable_view.xml rename to addons/account/report/account_report_view.xml diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index 271a4efe0ab..656e05e2a9b 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -88,3 +88,10 @@ "access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1 "access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0 "access_account_installer","account.installer","model_account_installer","base.group_user",1,0,0,0 +"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,0,0,0 +"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0 +"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,0,0,0 +"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_account_manager",1,0,0,0 +"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,0,0,0 +"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,0,0,0 +"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,0,0,0 diff --git a/addons/board_manufacturing/__terp__.py b/addons/board_manufacturing/__terp__.py index 9c644262969..50afa0d6cbc 100644 --- a/addons/board_manufacturing/__terp__.py +++ b/addons/board_manufacturing/__terp__.py @@ -32,7 +32,7 @@ * List of procurement in exception """, 'author': 'Tiny', - 'depends': ['board', 'mrp', 'stock', 'report_mrp'], + 'depends': ['board', 'mrp', 'stock' ], 'update_xml': ['board_manufacturing_view.xml'], 'demo_xml': ['board_manufacturing_demo.xml'], 'installable': True, diff --git a/addons/board_manufacturing/board_manufacturing_view.xml b/addons/board_manufacturing/board_manufacturing_view.xml index 7e913209c4a..df4a6805afb 100644 --- a/addons/board_manufacturing/board_manufacturing_view.xml +++ b/addons/board_manufacturing/board_manufacturing_view.xml @@ -20,9 +20,9 @@ - + - + diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py index 994f11f3212..72222a00668 100644 --- a/addons/crm/__terp__.py +++ b/addons/crm/__terp__.py @@ -41,73 +41,74 @@ appropriate staff, and making sure all future correspondence gets to the right place. The CRM module has a email gateway for the synchronisation interface -between mails and Open ERP.""", - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['base', 'base_action_rule', - 'process', - 'mail_gateway', +between mails and Open ERP.""", + 'author': 'Tiny', + 'website': 'http://www.openerp.com', + 'depends': ['base', 'base_action_rule', + 'process', + 'mail_gateway', 'base_calendar', - ], - 'init_xml': ['crm_data.xml', - 'crm_meeting_data.xml', - 'crm_claims_data.xml', - 'crm_fund_data.xml', - 'crm_helpdesk_data.xml', - 'crm_lead_data.xml', - 'crm_meeting_data.xml', - 'crm_opportunity_data.xml', - 'crm_phonecall_data.xml', - ], + ], + 'init_xml': ['crm_data.xml', + 'crm_meeting_data.xml', + 'crm_claims_data.xml', + 'crm_fund_data.xml', + 'crm_helpdesk_data.xml', + 'crm_lead_data.xml', + 'crm_meeting_data.xml', + 'crm_opportunity_data.xml', + 'crm_phonecall_data.xml', + ], 'update_xml': [ - 'crm_wizard.xml', - 'crm_view.xml', - 'crm_action_rule_view.xml', - 'crm_lead_wizard.xml', - 'crm_lead_view.xml', - 'crm_lead_menu.xml', - 'crm_meeting_wizard.xml', - 'crm_meeting_view.xml', - 'crm_meeting_menu.xml', - 'crm_phonecall_wizard.xml', - 'crm_phonecall_view.xml', - 'crm_phonecall_menu.xml', - 'crm_opportunity_wizard.xml', - 'crm_opportunity_view.xml', - 'crm_opportunity_menu.xml', - 'crm_fund_view.xml', - 'crm_fund_menu.xml', - 'crm_claims_view.xml', - 'crm_claims_menu.xml', + 'crm_wizard.xml', + 'crm_view.xml', + 'crm_action_rule_view.xml', + 'crm_lead_wizard.xml', + 'crm_lead_view.xml', + 'crm_lead_menu.xml', + 'crm_meeting_wizard.xml', + 'crm_meeting_view.xml', + 'crm_meeting_menu.xml', + 'crm_phonecall_wizard.xml', + 'crm_phonecall_view.xml', + 'crm_phonecall_menu.xml', + 'crm_opportunity_wizard.xml', + 'crm_opportunity_view.xml', + 'crm_opportunity_menu.xml', + 'crm_fund_view.xml', + 'crm_fund_menu.xml', + 'crm_claims_view.xml', + 'crm_claims_menu.xml', 'crm_helpdesk_view.xml', - 'crm_helpdesk_menu.xml', - - 'security/crm_security.xml', - 'security/ir.model.access.csv', + 'crm_helpdesk_menu.xml', + + 'security/crm_security.xml', + 'security/ir.model.access.csv', 'report/crm_report_view.xml', 'report/crm_claim_report_view.xml', 'report/crm_lead_report_view.xml', 'report/crm_fundraising_report_view.xml', - 'report/crm_opportunity_report_view.xml' , + 'report/crm_opportunity_report_view.xml' , 'report/crm_phonecall_report_view.xml', - + 'report/crm_helpdesk_report_view.xml', + 'process/crm_configuration_process.xml', - + ], 'demo_xml': [ - 'crm_demo.xml', - 'crm_claims_demo.xml', - 'crm_fund_demo.xml', - 'crm_helpdesk_demo.xml', - 'crm_lead_demo.xml', - 'crm_meeting_demo.xml', - 'crm_opportunity_demo.xml', - 'crm_phonecall_demo.xml'], - 'installable': True, - 'active': False, - 'certificate': '0079056041421', + 'crm_demo.xml', + 'crm_claims_demo.xml', + 'crm_fund_demo.xml', + 'crm_helpdesk_demo.xml', + 'crm_lead_demo.xml', + 'crm_meeting_demo.xml', + 'crm_opportunity_demo.xml', + 'crm_phonecall_demo.xml'], + 'installable': True, + 'active': False, + 'certificate': '0079056041421', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/report/__init__.py b/addons/crm/report/__init__.py index c93c51dd742..7030c43cfe2 100644 --- a/addons/crm/report/__init__.py +++ b/addons/crm/report/__init__.py @@ -26,6 +26,7 @@ import crm_lead_report import crm_phonecall_report import crm_fundraising_report import crm_opportunity_report +import crm_helpdesk_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/report/crm_helpdesk_report.py b/addons/crm/report/crm_helpdesk_report.py new file mode 100644 index 00000000000..7a855378d19 --- /dev/null +++ b/addons/crm/report/crm_helpdesk_report.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from osv import fields,osv +import tools + +class crm_helpdesk_report(osv.osv): + _name = "crm.helpdesk.report" + _description = "Helpdesk report after Sales Services" + _auto = False + _inherit = "crm.case.report" + _columns = { + 'delay_close': fields.char('Delay to close', size=20, readonly=True), + 'partner_id': fields.many2one('res.partner', 'Partner' ,readonly=True), + 'company_id': fields.many2one('res.company','Company',readonly=True), + 'date_deadline': fields.date('Deadline'), + 'priority': fields.selection([('5','Lowest'),('4','Low'),('3','Normal'),('2','High'),('1','Highest')], 'Priority'), + } + + def init(self, cr): + tools.drop_view_if_exists(cr, 'crm_helpdesk_report') + cr.execute(""" + create or replace view crm_helpdesk_report as ( + select + min(c.id) as id, + to_char(c.create_date, 'YYYY') as name, + to_char(c.create_date, 'MM') as month, + c.state, + c.user_id, + c.section_id, + c.partner_id, + c.company_id, + c.priority, + c.date_deadline, + count(*) as nbr, + 0 as avg_answers, + 0.0 as perc_done, + 0.0 as perc_cancel, + to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close + from + crm_helpdesk c + group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.priority, c.partner_id,c.company_id,c.date_deadline + )""") +crm_helpdesk_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/report/crm_helpdesk_report_view.xml b/addons/crm/report/crm_helpdesk_report_view.xml new file mode 100644 index 00000000000..06a69333bd7 --- /dev/null +++ b/addons/crm/report/crm_helpdesk_report_view.xml @@ -0,0 +1,148 @@ + + + + + + + crm.helpdesk.report.tree + crm.helpdesk.report + tree + + + + + + + + + + + + + + + + + + crm.helpdesk.report.form + crm.helpdesk.report + + form + + + + + + + + + + + + crm.helpdesk.report.graph + crm.helpdesk.report + graph + + + + + + + + + + + crm.helpdesk.report.select + crm.helpdesk.report + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helpdesk + crm.helpdesk.report + form + tree,graph + + + + + + + tree + + + + + + + graph + + + + + + + + + diff --git a/addons/crm/report/crm_report_view.xml b/addons/crm/report/crm_report_view.xml index 7427fe64588..aa5eadde787 100644 --- a/addons/crm/report/crm_report_view.xml +++ b/addons/crm/report/crm_report_view.xml @@ -1,6 +1,6 @@ - + crm.case.report.tree @@ -56,11 +56,11 @@ - + - + - + + + @@ -87,12 +89,12 @@ - + - + @@ -112,7 +114,7 @@ - + @@ -162,6 +164,6 @@ [('state','=','open')] - + diff --git a/addons/crm/security/ir.model.access.csv b/addons/crm/security/ir.model.access.csv index c3888951d4c..b6c7b0e8735 100644 --- a/addons/crm/security/ir.model.access.csv +++ b/addons/crm/security/ir.model.access.csv @@ -32,4 +32,4 @@ "access_crm_phonecall_report_user","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_user",1,0,0,0 "access_crm_opportunity_report_user","crm.opportunity.report","model_crm_opportunity_report","crm.group_crm_user",1,0,0,0 "access_report_crm_case_service_dashboard","report.crm.case.service.dashboard","model_report_crm_case_service_dashboard","crm.group_crm_user",1,0,0,0 - +"access_report_crm_helpdesk","report.crm.helpdesk","model_crm_helpdesk_report","crm.group_crm_user",1,0,0,0 diff --git a/addons/document/__init__.py b/addons/document/__init__.py index 547205b1313..694989bdd79 100644 --- a/addons/document/__init__.py +++ b/addons/document/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -26,5 +26,6 @@ import document_directory import directory_content import directory_report import document +import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/__terp__.py b/addons/document/__terp__.py index a9d7026776b..2ffb708738c 100644 --- a/addons/document/__terp__.py +++ b/addons/document/__terp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -24,14 +24,14 @@ 'name': 'Integrated Document Management System', 'version': '1.99', 'category': 'Generic Modules/Others', - 'description': """This is a complete document management system: + 'description': """This is a complete document management system: * User Authentication * Document Indexation - ATTENTION: - - When you install this module in a running company that have already PDF files stored into the database, - you will lose them all. - - After installing this module PDF's are not longer stored into the database, + ATTENTION: + - When you install this module in a running company that have already PDF files stored into the database, + you will lose them all. + - After installing this module PDF's are not longer stored into the database, but in the servers rootpad like /server/bin/filestore. """, 'author': 'Tiny', @@ -42,7 +42,8 @@ 'document_view.xml', 'document_data.xml', 'security/document_security.xml', - 'security/ir.model.access.csv' + 'security/ir.model.access.csv', + 'report/document_report_view.xml' ], 'demo_xml': [ 'document_demo.xml',], 'installable': True, diff --git a/addons/report_mrp/__init__.py b/addons/document/report/__init__.py similarity index 89% rename from addons/report_mrp/__init__.py rename to addons/document/report/__init__.py index cac56f5f3bf..bfdeacdaae8 100644 --- a/addons/report_mrp/__init__.py +++ b/addons/document/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,11 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## - -import report_mrp - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +import document_report \ No newline at end of file diff --git a/addons/report_document/report_document.py b/addons/document/report/document_report.py similarity index 100% rename from addons/report_document/report_document.py rename to addons/document/report/document_report.py diff --git a/addons/report_document/report_document_view.xml b/addons/document/report/document_report_view.xml similarity index 100% rename from addons/report_document/report_document_view.xml rename to addons/document/report/document_report_view.xml diff --git a/addons/document/security/ir.model.access.csv b/addons/document/security/ir.model.access.csv index 4993ebc049e..245bcbffeab 100644 --- a/addons/document/security/ir.model.access.csv +++ b/addons/document/security/ir.model.access.csv @@ -11,3 +11,11 @@ "access_document_storage_group_system","document.storage group system","model_document_storage","base.group_user",1,0,0,0 "access_document_directory_dctx_group_document_manager","document.directory.dctx document manager","model_document_directory_dctx","group_document_manager",1,1,1,1 "access_document_directory_dctx_group_system","document.directory.dctx group system","model_document_directory_dctx","base.group_system",1,1,1,1 +"access_report_document_user_group_document_manager","report.document.user document manager","model_report_document_user","document.group_document_manager",1,0,0,0 +"access_report_document_user_group_system","report.document.user group system","model_report_document_user","base.group_system",1,0,0,0 +"access_report_files_partner_group_document_manager","report.files.partner document manager","model_report_files_partner","document.group_document_manager",1,0,0,0 +"access_report_files_partner_group_system","report.files.partner group system","model_report_files_partner","base.group_system",1,0,0,0 +"access_report_document_file_group_document_manager","report.document.file document manager","model_report_document_file","document.group_document_manager",1,0,0,0 +"access_report_document_file_group_system","report.document.file group system","model_report_document_file","base.group_system",1,0,0,0 +"access_report_document_wall_group_document_manager","report.document.wall document manager","model_report_document_wall","document.group_document_manager",1,0,0,0 +"access_report_document_wall_group_system","report.document.wall group system","model_report_document_wall","base.group_system",1,0,0,0 diff --git a/addons/hr_evaluation/__init__.py b/addons/hr_evaluation/__init__.py index 7fe03d1245a..e8abcb28e1d 100644 --- a/addons/hr_evaluation/__init__.py +++ b/addons/hr_evaluation/__init__.py @@ -1,6 +1,6 @@ # -*- encoding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,11 +15,12 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import hr_evaluation +import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_evaluation/__terp__.py b/addons/hr_evaluation/__terp__.py index 978018a5e90..26b71c795c8 100644 --- a/addons/hr_evaluation/__terp__.py +++ b/addons/hr_evaluation/__terp__.py @@ -31,7 +31,9 @@ "demo_xml" : ["hr_evaluation_demo.xml"], "update_xml" : [ "security/ir.model.access.csv", - "hr_evaluation_view.xml"], + "hr_evaluation_view.xml", + "hr_evaluation_data.xml", + "report/hr_evaluation_report_view.xml"], "active": False, "installable": True } diff --git a/addons/report_task/__init__.py b/addons/hr_evaluation/report/__init__.py similarity index 82% rename from addons/report_task/__init__.py rename to addons/hr_evaluation/report/__init__.py index 38945a471fe..193a389c85d 100644 --- a/addons/report_task/__init__.py +++ b/addons/hr_evaluation/report/__init__.py @@ -1,8 +1,8 @@ -# -*- coding: utf-8 -*- +# -*- encoding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). +# Copyright (C) 2004-2009 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -15,11 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## - -import report_task - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +import hr_evaluation_report \ No newline at end of file diff --git a/addons/hr_evaluation/report/hr_evaluation_report.py b/addons/hr_evaluation/report/hr_evaluation_report.py new file mode 100644 index 00000000000..5e27b568c4f --- /dev/null +++ b/addons/hr_evaluation/report/hr_evaluation_report.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import tools +from osv import fields,osv + + +class hr_evaluation_report(osv.osv): + _name = "hr.evaluation.report" + _description = "Evaluations Statistics" + _auto = False + _rec_name = 'date' + _columns = { + 'create_date': fields.datetime('Create Date', readonly=True), + 'deadline': fields.date("Deadline", readonly=True), + 'closed': fields.date("closed", readonly=True), + 'year': fields.char('Year', size=4, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), + ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), + 'employee_id': fields.many2one('hr.employee', "Employee", readonly=True), + 'nbr':fields.integer('# of Requests', readonly=True), + 'state': fields.selection([ + ('draft','Draft'), + ('wait','Plan In Progress'), + ('progress','Final Validation'), + ('done','Done'), + ('cancel','Cancelled'), + ], 'State',readonly=True), + } + _order = 'create_date desc' + def init(self, cr): + tools.drop_view_if_exists(cr, 'hr_evaluation_report') + cr.execute(""" + create or replace view hr_evaluation_report as ( + select + min(l.id) as id, + s.create_date as create_date, + s.employee_id, + s.date as deadline, + s.date_close as closed, + to_char(s.create_date, 'YYYY') as year, + to_char(s.create_date, 'MM') as month, + count(*) as nbr, + s.state + from + hr_evaluation_interview l + left join + hr_evaluation_evaluation s on (s.id=l.evaluation_id) + group by + s.create_date,s.state,s.employee_id, + s.date,s.date_close + ) + """) +hr_evaluation_report() + diff --git a/addons/hr_evaluation/report/hr_evaluation_report_view.xml b/addons/hr_evaluation/report/hr_evaluation_report_view.xml new file mode 100644 index 00000000000..fe24b7c373f --- /dev/null +++ b/addons/hr_evaluation/report/hr_evaluation_report_view.xml @@ -0,0 +1,70 @@ + + + + + hr.evaluation.report.tree + hr.evaluation.report + tree + + + + + + + + + + + + + + + + hr.evaluation.report.search + hr.evaluation.report + search + + + + + + + + + + + + + + + + + + + + + + + + Evaluations + hr.evaluation.report + form + tree + + + + + + + + diff --git a/addons/hr_evaluation/security/ir.model.access.csv b/addons/hr_evaluation/security/ir.model.access.csv index c9962231e6c..3f3948c00db 100644 --- a/addons/hr_evaluation/security/ir.model.access.csv +++ b/addons/hr_evaluation/security/ir.model.access.csv @@ -1,9 +1,10 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation",hr.group_hr_user,1,0,0,0 -"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation","model_hr_evaluation_evaluation",hr.group_hr_manager,1,1,1,1 -"access_hr_evaluation_plan","hr_evaluation.plan","model_hr_evaluation_evaluation",hr.group_hr_user,1,0,0,0 -"access_hr_evaluation_plan_manager","hr_evaluation.plan","model_hr_evaluation_plan",hr.group_hr_manager,1,1,1,1 -"access_hr_evaluation_plan_phase","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase",hr.group_hr_user,1,0,0,0 -"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase",hr.group_hr_manager,1,1,1,1 -"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview",hr.group_hr_user,1,0,0,0 -"access_hr_evaluation_interview_manager","hr.evaluation.interview","model_hr_evaluation_interview",hr.group_hr_manager,1,1,1,1 +"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_user",1,0,0,0 +"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_manager",1,1,1,1 +"access_hr_evaluation_plan","hr_evaluation.plan","model_hr_evaluation_evaluation","hr.group_hr_user",1,0,0,0 +"access_hr_evaluation_plan_manager","hr_evaluation.plan","model_hr_evaluation_plan","hr.group_hr_manager",1,1,1,1 +"access_hr_evaluation_plan_phase","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_user",1,0,0,0 +"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_manager",1,1,1,1 +"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_user",1,0,0,0 +"access_hr_evaluation_interview_manager","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_manager",1,1,1,1 +"access_hr_evaluation_report","hr.evaluation.report","model_hr_evaluation_report",,1,0,0,0 diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py index 6cdf8acdd3a..03fab346c77 100644 --- a/addons/hr_expense/__terp__.py +++ b/addons/hr_expense/__terp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -48,7 +48,8 @@ 'hr_expense_workflow.xml', 'hr_expense_view.xml', 'hr_expense_report.xml', - 'process/hr_expense_process.xml' + 'process/hr_expense_process.xml', + 'report/hr_expense_report_view.xml' ], 'demo_xml': ['hr.expense.expense.csv'], 'installable': True, diff --git a/addons/hr_expense/report/__init__.py b/addons/hr_expense/report/__init__.py index f55bc86bc12..4ddd1d33933 100644 --- a/addons/hr_expense/report/__init__.py +++ b/addons/hr_expense/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,10 +15,11 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import expense +import hr_expense_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py new file mode 100644 index 00000000000..81cb18dcc09 --- /dev/null +++ b/addons/hr_expense/report/hr_expense_report.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import tools +from osv import fields,osv + + +class hr_expense_report(osv.osv): + _name = "hr.expense.report" + _description = "Expenses Statistics" + _auto = False + _rec_name = 'date' + _columns = { + 'date': fields.date('Date', readonly=True), + 'year': fields.char('Year', size=4, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), + ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), + 'product_id':fields.many2one('product.product', 'Product', readonly=True), + 'product_qty':fields.float('Qty', readonly=True), + 'employee_id': fields.many2one('hr.employee', "Employee's Name", readonly=True), + 'invoice_id': fields.many2one('account.invoice', 'Invoice',readonly=True), + 'department_id':fields.many2one('hr.department','Department',readonly=True), + 'company_id':fields.many2one('res.company', 'Company', readonly=True), + 'user_id':fields.many2one('res.users', 'User', readonly=True), + 'price_total':fields.float('Total Price', readonly=True), + 'price_average':fields.float('Average Price', readonly=True), + 'nbr':fields.integer('# of Lines', readonly=True), + 'state': fields.selection([ + ('draft', 'Draft'), + ('confirm', 'Waiting confirmation'), + ('accepted', 'Accepted'), + ('invoiced', 'Invoiced'), + ('paid', 'Reimbursed'), + ('cancelled', 'Cancelled')], + 'State', readonly=True), + } + _order = 'date desc' + def init(self, cr): + tools.drop_view_if_exists(cr, 'hr_expense_report') + cr.execute(""" + create or replace view hr_expense_report as ( + select + min(l.id) as id, + s.date as date, + s.employee_id, + s.invoice_id, + s.department_id, + to_char(s.date, 'YYYY') as year, + to_char(s.date, 'MM') as month, + l.product_id as product_id, + sum(l.unit_quantity * u.factor) as product_qty, + s.user_id as user_id, + s.company_id as company_id, + sum(l.unit_quantity*l.unit_amount) as price_total, + (sum(l.unit_quantity*l.unit_amount)/sum(l.unit_quantity * u.factor))::decimal(16,2) as price_average, + count(*) as nbr, + s.state + 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) + group by + s.date, l.product_id,s.invoice_id, + s.department_id, + l.uom_id, s.user_id, s.state, + s.company_id,s.employee_id + ) + """) +hr_expense_report() + diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml new file mode 100644 index 00000000000..9e30e6688f2 --- /dev/null +++ b/addons/hr_expense/report/hr_expense_report_view.xml @@ -0,0 +1,100 @@ + + + + + hr.expense.report.tree + hr.expense.report + tree + + + + + + + + + + + + + + + + + + + + + + hr.expense.report.graph + hr.expense.report + graph + + + + + + + + + + hr.expense.report.search + hr.expense.report + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expenses + hr.expense.report + form + tree,graph + + + + + + + + diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py index f84a026748b..f44fe590015 100644 --- a/addons/hr_holidays/__terp__.py +++ b/addons/hr_holidays/__terp__.py @@ -55,6 +55,7 @@ 'hr_view.xml', 'hr_holidays_report.xml', 'hr_holidays_wizard.xml', + 'report/hr_holidays_report_view.xml', #'process/hr_holidays_process.xml' ], 'demo_xml': [], diff --git a/addons/hr_holidays/report/__init__.py b/addons/hr_holidays/report/__init__.py index 39882f6cd59..bb1f6229bc0 100644 --- a/addons/hr_holidays/report/__init__.py +++ b/addons/hr_holidays/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,10 +15,11 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import holidays_summary_report +import hr_holidays_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_holidays/report/hr_holidays_report.py b/addons/hr_holidays/report/hr_holidays_report.py new file mode 100644 index 00000000000..59a0a361eeb --- /dev/null +++ b/addons/hr_holidays/report/hr_holidays_report.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import tools +from osv import fields,osv + +class hr_holidays_report(osv.osv): + _name = "hr.holidays.report" + _description = "Leaves Statistics" + _auto = False + _rec_name = 'date' + _columns = { + 'date': fields.datetime('Date', readonly=True), + 'year': fields.char('Year', size=4, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), + ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), + 'date_from' : fields.datetime('Start Date', readonly=True), + 'date_to' : fields.datetime('End Date', readonly=True), + 'number_of_days_temp': fields.float('Number of Days', readonly=True), + 'employee_id' : fields.many2one('hr.employee', "Employee's Name",readonly=True), + 'user_id':fields.many2one('res.users', 'User', readonly=True), + 'state': fields.selection([('draft', 'Draft'), + ('confirm', 'Waiting Validation'), + ('refuse', 'Refused'), + ('validate', 'Validated'), + ('cancel', 'Cancelled')] + ,'State', readonly=True), + } + _order = 'date desc' + def init(self, cr): + tools.drop_view_if_exists(cr, 'hr_holidays_report') + cr.execute(""" + create or replace view hr_holidays_report as ( + select + min(s.id) as id, + date_trunc('seconds',s.create_date) as date, + date_trunc('day',s.date_from) as date_from, + date_trunc('day',s.date_to) as date_to, + s.number_of_days_temp, + s.employee_id, + s.user_id as user_id, + to_char(s.create_date, 'YYYY') as year, + to_char(s.create_date, 'MM') as month, + s.state + from + hr_holidays s + group by + s.create_date,s.state,s.date_from,s.date_to, + s.number_of_days_temp,s.employee_id,s.user_id + ) + """) +hr_holidays_report() + diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml new file mode 100644 index 00000000000..6a8d1461799 --- /dev/null +++ b/addons/hr_holidays/report/hr_holidays_report_view.xml @@ -0,0 +1,87 @@ + + + + + hr.holidays.report.tree + hr.holidays.report + tree + + + + + + + + + + + + + + + + hr.holidays.report.graph + hr.holidays.report + graph + + + + + + + + + + hr.holidays.report.search + hr.holidays.report + search + + + + + + + + + + + + + + + + + + + + + + + + + + + Leaves + hr.holidays.report + form + tree,graph + + + + + + + diff --git a/addons/hr_holidays/security/ir.model.access.csv b/addons/hr_holidays/security/ir.model.access.csv index a7fc3d153b5..236b6a8fb89 100644 --- a/addons/hr_holidays/security/ir.model.access.csv +++ b/addons/hr_holidays/security/ir.model.access.csv @@ -2,3 +2,4 @@ "access_hr_holydays_status_user","hr.holidays.status user","model_hr_holidays_status","hr.group_hr_user",1,1,1,1 "access_hr_holidays_user","hr holidays user","model_hr_holidays","hr.group_hr_user",1,1,1,1 "access_hr_holidays_per_user","hr.holidays.per.user","model_hr_holidays_per_user","hr.group_hr_user",1,1,1,1 +"access_hr_holidays_report","hr.holidays.report","model_hr_holidays_report","hr.group_hr_user",1,1,1,1 diff --git a/addons/hr_recruitment/__terp__.py b/addons/hr_recruitment/__terp__.py index e80b22bb9db..59f74ea4e69 100644 --- a/addons/hr_recruitment/__terp__.py +++ b/addons/hr_recruitment/__terp__.py @@ -42,10 +42,10 @@ system to store and search in your CV base. 'hr_hr_wizard.xml', 'hr_hr_view.xml', 'hr_hr_menu.xml', - 'report_hr_hr_view.xml', 'security/hr_hr_security.xml', 'security/ir.model.access.csv', 'board_hr_hr_statistical_view.xml', + 'report/hr_recruitment_report_view.xml' ], 'demo_xml': [ 'hr_hr_demo.xml' diff --git a/addons/hr_recruitment/report/__init__.py b/addons/hr_recruitment/report/__init__.py index 418da576c4e..86094f98916 100644 --- a/addons/hr_recruitment/report/__init__.py +++ b/addons/hr_recruitment/report/__init__.py @@ -20,6 +20,6 @@ # ############################################################################## -import report_hr_hr +import hr_recruitment_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py new file mode 100644 index 00000000000..2f48dabd7a9 --- /dev/null +++ b/addons/hr_recruitment/report/hr_recruitment_report.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import tools +from osv import fields,osv +from hr_recruitment import hr_hr + +class hr_recruitment_report(osv.osv): + _name = "hr.recruitment.report" + _description = "Recruitments Statistics" + _inherit = "crm.case.report" + _auto = False + _rec_name = 'date' + _columns = { + 'date': fields.datetime('Date', readonly=True), + 'job_id': fields.many2one('hr.job', 'Applied Job',readonly=True), + 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'hr.applicant')]",readonly=True), + 'type_id': fields.many2one('crm.case.resource.type', 'Degree', domain="[('section_id','=',section_id),('object_id.model', '=', 'hr.applicant')]"), + 'department_id':fields.many2one('hr.department','Department',readonly=True), + 'priority': fields.selection(hr_hr.AVAILABLE_PRIORITIES, 'Appreciation'), + + } + _order = 'date desc' + def init(self, cr): + tools.drop_view_if_exists(cr, 'hr_recruitment_report') + cr.execute(""" + create or replace view hr_recruitment_report as ( + select + min(s.id) as id, + s.date as date, + to_char(s.date, 'YYYY') as name, + to_char(s.date, 'MM') as month, + s.state, + s.company_id, + s.user_id, + s.job_id, + s.type_id, + s.department_id, + s.priority, + s.stage_id, + count(*) as nbr + from hr_applicant s + group by + s.date,s.state,s.company_id,s.user_id,s.stage_id,s.type_id,s.priority, + s.job_id,s.department_id + ) + """) +hr_recruitment_report() + diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml new file mode 100644 index 00000000000..30f1ec3d8ed --- /dev/null +++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml @@ -0,0 +1,110 @@ + + + + + hr.recruitment.report.tree + hr.recruitment.report + tree + + + + + + + + + + + + + + + + + + hr.recruitment.report.graph + hr.recruitment.report + graph + + + + + + + + + + hr.recruitment.report.search + hr.recruitment.report + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Recruitments + hr.recruitment.report + form + tree,graph + + + + + + + diff --git a/addons/hr_recruitment/report/report_hr_hr.py b/addons/hr_recruitment/report/report_hr_hr.py deleted file mode 100644 index b49de4f66d5..00000000000 --- a/addons/hr_recruitment/report/report_hr_hr.py +++ /dev/null @@ -1,3 +0,0 @@ -from osv import fields,osv -import tools - diff --git a/addons/hr_recruitment/report_hr_hr_view.xml b/addons/hr_recruitment/report_hr_hr_view.xml deleted file mode 100644 index 1fbce7663ea..00000000000 --- a/addons/hr_recruitment/report_hr_hr_view.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/addons/hr_timesheet_invoice/__terp__.py b/addons/hr_timesheet_invoice/__terp__.py index cbb2ace596a..f335c7dbd77 100644 --- a/addons/hr_timesheet_invoice/__terp__.py +++ b/addons/hr_timesheet_invoice/__terp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -36,7 +36,9 @@ reports, eso.""", 'security/ir.model.access.csv', 'hr_timesheet_invoice_view.xml', 'hr_timesheet_invoice_wizard.xml', - 'hr_timesheet_invoice_report.xml' + 'hr_timesheet_invoice_report.xml', + 'report/report_analytic_view.xml', + 'report/hr_timesheet_invoice_report_view.xml', ], 'demo_xml': ['hr_timesheet_invoice_demo.xml'], 'installable': True, diff --git a/addons/hr_timesheet_invoice/report/__init__.py b/addons/hr_timesheet_invoice/report/__init__.py index 9d87b1fdd1c..b351c097a12 100644 --- a/addons/hr_timesheet_invoice/report/__init__.py +++ b/addons/hr_timesheet_invoice/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,12 +15,14 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import cost_ledger import account_analytic_profit +import report_analytic +import hr_timesheet_invoice_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_timesheet/report_timesheet.py b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py similarity index 100% rename from addons/report_timesheet/report_timesheet.py rename to addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py diff --git a/addons/report_timesheet/report_timesheet_view.xml b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml similarity index 100% rename from addons/report_timesheet/report_timesheet_view.xml rename to addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml diff --git a/addons/report_analytic/report_analytic.py b/addons/hr_timesheet_invoice/report/report_analytic.py similarity index 100% rename from addons/report_analytic/report_analytic.py rename to addons/hr_timesheet_invoice/report/report_analytic.py diff --git a/addons/report_analytic/report_analytic_view.xml b/addons/hr_timesheet_invoice/report/report_analytic_view.xml similarity index 100% rename from addons/report_analytic/report_analytic_view.xml rename to addons/hr_timesheet_invoice/report/report_analytic_view.xml diff --git a/addons/hr_timesheet_invoice/security/ir.model.access.csv b/addons/hr_timesheet_invoice/security/ir.model.access.csv index 670f835a50d..6349b4f766c 100644 --- a/addons/hr_timesheet_invoice/security/ir.model.access.csv +++ b/addons/hr_timesheet_invoice/security/ir.model.access.csv @@ -1,3 +1,11 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_hr_timesheet_invoice_factor_hr_user","hr_timesheet_invoice.factor.hr.user","model_hr_timesheet_invoice_factor","hr.group_hr_user",1,0,0,0 "access_hr_timesheet_invoice_factor_acc_inv","hr_timesheet_invoice.factor.account.invoice","model_hr_timesheet_invoice_factor","account.group_account_invoice",1,1,1,1 +"access_report_analytic_account_close","report.analytic.account.close","model_report_analytic_account_close","account.group_account_manager",1,0,0,0 +"access_report_account_analytic_line_to_invoice","report.account.analytic.line.to.invoice","model_report_account_analytic_line_to_invoice","account.group_account_manager",1,0,0,0 +"access_report_timesheet_user","report_timesheet.user","model_report_timesheet_user","base.group_user",1,0,0,0 +"access_report_timesheet_account","report_timesheet.account","model_report_timesheet_account","base.group_user",1,0,0,0 +"access_report_timesheet_account_date","report_timesheet.account.date","model_report_timesheet_account_date","base.group_user",1,0,0,0 +"access_report_timesheet_invoice","report_timesheet.invoice","model_report_timesheet_invoice","base.group_user",1,0,0,0 +"access_report_random_timesheet","report_random_timesheet","model_report_random_timesheet","base.group_user",1,0,0,0 +"access_report_random_timesheet_lines","random_timesheet_lines","model_random_timesheet_lines","base.group_user",1,0,0,0 diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py index a147266ce1d..feabb8cc123 100644 --- a/addons/mrp/__terp__.py +++ b/addons/mrp/__terp__.py @@ -69,6 +69,8 @@ 'process/service_product_process.xml', 'process/procurement_process.xml', 'mrp_installer.xml', + 'report/mrp_report_view.xml', + 'report/mrp_production_order_view.xml', ], 'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml'], 'installable': True, diff --git a/addons/mrp/report/__init__.py b/addons/mrp/report/__init__.py index a053b3998b2..471e3440af3 100644 --- a/addons/mrp/report/__init__.py +++ b/addons/mrp/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -23,6 +23,8 @@ import price import workcenter_load import order import bom_structure +import mrp_report +import mrp_production_order # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py new file mode 100644 index 00000000000..d2299a19731 --- /dev/null +++ b/addons/mrp/report/mrp_production_order.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from osv import fields,osv +import tools + + +class mrp_production_order(osv.osv): + _name = "mrp.production.order" + _description = "Production Order Report" + _auto = False + _columns = { + 'name': fields.char('Year',size=64,required=False, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), + ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), + 'reference': fields.char('Reference', size=64, required=True), + 'origin': fields.char('Source Document', size=64), + 'nbr': fields.integer('# of Orders', readonly=True), + 'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type','<>','service')]), + 'state': fields.selection([('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'State', readonly=True), + 'scheduled_date':fields.date('Scheduled Date'), + 'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', required=True), + 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True), + + + } + def init(self, cr): + tools.drop_view_if_exists(cr, 'mrp_production_order') + cr.execute(""" + create or replace view mrp_production_order as ( + select + min(c.id) as id, + to_char(c.create_date, 'YYYY') as name, + to_char(c.create_date, 'MM') as month, + c.state, + c.product_id, + count(*) as nbr, + to_date(to_char(c.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY') as scheduled_date, + c.name as reference, + c.origin, + c.location_src_id, + c.location_dest_id + from + mrp_production c + group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state,c.product_id,to_date(to_char(c.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY'),c.name,c.location_src_id,c.location_dest_id,c.origin + )""") +mrp_production_order() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml new file mode 100644 index 00000000000..abb046bd685 --- /dev/null +++ b/addons/mrp/report/mrp_production_order_view.xml @@ -0,0 +1,115 @@ + + + + + + + mrp.production.order.tree + mrp.production.order + tree + + + + + + + + + + + + + + + + + mrp.production.order.form + mrp.production.order + form + +
+ + + + + + + + +
+ + + mrp.production.order.graph + mrp.production.order + graph + + + + + + + + + + mrp.production.order.select + mrp.production.order + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Production Order + mrp.production.order + form + tree,graph + + + + + + + tree + + + + + + + graph + + + + + + +
+
+ diff --git a/addons/report_mrp/report_mrp.py b/addons/mrp/report/mrp_report.py similarity index 100% rename from addons/report_mrp/report_mrp.py rename to addons/mrp/report/mrp_report.py diff --git a/addons/report_mrp/report_mrp_view.xml b/addons/mrp/report/mrp_report_view.xml similarity index 98% rename from addons/report_mrp/report_mrp_view.xml rename to addons/mrp/report/mrp_report_view.xml index c14688d9cbf..5de7c7be34b 100644 --- a/addons/report_mrp/report_mrp_view.xml +++ b/addons/mrp/report/mrp_report_view.xml @@ -98,7 +98,7 @@ form graph,tree - + diff --git a/addons/mrp/security/ir.model.access.csv b/addons/mrp/security/ir.model.access.csv index cdc658ff7c0..9913071038c 100644 --- a/addons/mrp/security/ir.model.access.csv +++ b/addons/mrp/security/ir.model.access.csv @@ -32,3 +32,6 @@ "access_mrp_production_stock_worker","mrp.production stock_worker","model_mrp_production","stock.group_stock_user",1,0,0,0 "access_mrp_installer","mrp.installer","model_mrp_installer","mrp.group_mrp_user",1,0,0,0 "access_mrp_product_produce","mrp.product.produce","model_mrp_product_produce","mrp.group_mrp_user",1,0,0,0 +"access_mrp_production_order","mrp.production.order","model_mrp_production_order","mrp.group_mrp_user",1,0,0,0 +"access_report_workcenter_load","report.workcenter.load","model_report_workcenter_load","mrp.group_mrp_manager",1,0,0,0 +"access_report_mrp_inout","report.mrp.inout","model_report_mrp_inout","mrp.group_mrp_manager",1,0,0,0 diff --git a/addons/point_of_sale/__terp__.py b/addons/point_of_sale/__terp__.py index 794793e3baa..e094d9dcb37 100644 --- a/addons/point_of_sale/__terp__.py +++ b/addons/point_of_sale/__terp__.py @@ -36,7 +36,7 @@ Main features : """, 'author': 'Tiny', - 'depends': ['sale', 'delivery','report_mrp'], + 'depends': ['sale', 'delivery'], # 'depends': ['sale', 'purchase', 'account', 'account_tax_include','board','mrp','board_manufacturing','delivery','profile_manufacturing','account','multi_company'], 'init_xml': [ 'security/point_of_sale_security.xml', diff --git a/addons/point_of_sale/statement_data.xml b/addons/point_of_sale/statement_data.xml index 641cb8e52cf..947348a990d 100644 --- a/addons/point_of_sale/statement_data.xml +++ b/addons/point_of_sale/statement_data.xml @@ -33,7 +33,7 @@ - + diff --git a/addons/project/__terp__.py b/addons/project/__terp__.py index cedeab01b4f..2af0ba122bf 100644 --- a/addons/project/__terp__.py +++ b/addons/project/__terp__.py @@ -40,6 +40,7 @@ works done on tasks, eso. It is able to render planning, order tasks, eso. "project_report.xml", "process/task_process.xml", "project_installer.xml", + "report/project_report_view.xml" ], 'demo_xml': [ 'project_demo.xml' diff --git a/addons/project/report/__init__.py b/addons/project/report/__init__.py index 2aefd8b3c11..3c104dc54ec 100644 --- a/addons/project/report/__init__.py +++ b/addons/project/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,9 +15,9 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## - +import project_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_project/report_project.py b/addons/project/report/project_report.py similarity index 54% rename from addons/report_project/report_project.py rename to addons/project/report/project_report.py index 183163813da..20d65aec356 100644 --- a/addons/report_project/report_project.py +++ b/addons/project/report/project_report.py @@ -29,14 +29,23 @@ class report_project_task_user(osv.osv): _columns = { 'name': fields.char('Year',size=64,required=False, readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), + 'date_start': fields.datetime('Starting Date'), + 'date_end': fields.datetime('Ending Date'), + 'date_deadline': fields.date('Deadline'), 'project_id':fields.many2one('project.project', 'Project', readonly=True), 'hours_planned': fields.float('Planned Hours', readonly=True), 'hours_effective': fields.float('Effective Hours', readonly=True), 'hours_delay': fields.float('Avg. Plan.-Eff.', readonly=True), 'closing_days': fields.char('Avg Closing Delay', size=64, readonly=True), - 'task_closed': fields.integer('Task Closed', readonly=True), + 'nbr': fields.integer('#Number of tasks', readonly=True), 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), + 'state': fields.selection([('draft', 'Draft'), + ('open', 'In Progress'), + ('pending', 'Pending'), + ('cancelled', 'Cancelled'), + ('done', 'Done')], + 'State', readonly=True), } _order = 'name desc, project_id' @@ -46,70 +55,30 @@ class report_project_task_user(osv.osv): create or replace view report_project_task_user as ( select min(t.id) as id, - to_char(date_end, 'YYYY') as name, - to_char(date_end, 'MM') as month, - count(distinct t.id) as task_closed, + to_char(date_start, 'YYYY') as name, + to_char(date_start, 'MM') as month, + count(distinct t.id) as nbr, + date_trunc('day',t.date_start) as date_start, + date_trunc('day',t.date_end) as date_end, + date_trunc('day',t.date_deadline) as date_deadline, t.user_id, t.project_id, + t.state, sum(planned_hours) as hours_planned, to_char(avg(date_end::abstime-t.create_date::timestamp), 'DD"d" HH24:MI:SS') as closing_days, sum(w.hours) as hours_effective, ((sum(planned_hours)-sum(w.hours))/count(distinct t.id))::decimal(16,2) as hours_delay from project_task t left join project_task_work w on (t.id=w.task_id) - where - t.state='done' group by - to_char(date_end, 'YYYY'),to_char(date_end, 'MM'),t.user_id,project_id + to_char(date_start, 'YYYY'), + to_char(date_start, 'MM'), + t.user_id,t.state,t.date_end, + t.date_deadline,t.date_start, + t.project_id ) """) report_project_task_user() - -class report_project_task(osv.osv): - _name = "report.project.task" - _description = "Tasks by project" - _auto = False - _columns = { - 'name': fields.char('Year',size=64,required=False, readonly=True), - 'project_id':fields.many2one('project.project', 'Project', readonly=True), - 'hours_planned': fields.float('Planned Hours', readonly=True), - 'hours_effective': fields.float('Effective Hours', readonly=True), - 'hours_delay': fields.float('Avg. Plan.-Eff.', readonly=True), - 'closing_days': fields.char('Avg Closing Delay', size=64, readonly=True), - 'task_closed': fields.integer('Task Closed', readonly=True), - 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), - ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), - - } - _order = 'name desc, project_id' - def init(self, cr): - tools.sql.drop_view_if_exists(cr, 'report_project_task') - cr.execute(""" - create or replace view report_project_task as ( - select - min(t.id) as id, - to_char(date_end, 'YYYY') as name, - to_char(date_end, 'MM') as month, - count(distinct t.id) as task_closed, - t.project_id, - sum(planned_hours) as hours_planned, - to_char(avg(date_end::abstime-t.create_date::timestamp), 'DD"d" HH12:MI:SS') as closing_days, - sum(w.hours) as hours_effective, - ((sum(planned_hours)-sum(w.hours))/count(distinct t.id))::decimal(16,2) as hours_delay - from project_task t - left join project_task_work w on (t.id=w.task_id) - where - t.state='done' - group by - to_char(date_end, 'YYYY'),to_char(date_end, 'MM'),project_id - ) - """) -report_project_task() - - - - - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml new file mode 100644 index 00000000000..948ed70ef80 --- /dev/null +++ b/addons/project/report/project_report_view.xml @@ -0,0 +1,73 @@ + + + + + + + report.project.task.user.tree + report.project.task.user + tree + + + + + + + + + + + + + + + + + + + + + report.project.task.user.search + report.project.task.user + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tasks + report.project.task.user + form + tree + + + + + + diff --git a/addons/project/security/ir.model.access.csv b/addons/project/security/ir.model.access.csv index b5877b688b7..abedc99cfd6 100644 --- a/addons/project/security/ir.model.access.csv +++ b/addons/project/security/ir.model.access.csv @@ -12,4 +12,5 @@ "access_config_compute_remaining","project.config.compute.remaining","model_config_compute_remaining","project.group_project_user",1,1,1,1 "access_config_compute_remaining_manager","project.config.compute.remaining.manager","model_config_compute_remaining","project.group_project_manager",1,1,1,1 "access_project_message","project.message","model_project_message","project.group_project_user",1,0,0,0 -"access_project_installer","project.installer","model_project_installer","project.group_project_user",1,0,0,0 \ No newline at end of file +"access_project_installer","project.installer","model_project_installer","project.group_project_user",1,0,0,0 +"access_report_project_task_user","report.project.task.user","model_report_project_task_user","project.group_project_manager",1,0,0,0 diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py index 2e3bf4b2d58..74444780b57 100644 --- a/addons/project_issue/report/project_issue_report.py +++ b/addons/project_issue/report/project_issue_report.py @@ -1,15 +1,21 @@ from osv import fields,osv import tools +from crm import crm class project_issue_report(osv.osv): - _name = "project.issue.report" + _name = "project.issue.report" _auto = False _inherit = "crm.case.report" _columns = { 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue.report')]"), - 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue.report')]"), + 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue.report')]"), 'nbr': fields.integer('# of Issues', reaadonly=True), 'delay_close': fields.char('Delay to close', size=20, readonly=True), + 'company_id' : fields.many2one('res.company', 'Company'), + 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), + 'project_id':fields.many2one('project.project', 'Project'), + 'type_id': fields.many2one('crm.case.resource.type', 'Bug Type', domain="[('object_id.model', '=', 'project.issue')]"), + 'date_closed': fields.datetime('Close Date', readonly=True), } def init(self, cr): tools.drop_view_if_exists(cr, 'project_issue_report') @@ -24,11 +30,19 @@ class project_issue_report(osv.osv): c.section_id, c.categ_id, c.stage_id, + to_char(c.date_closed, 'YYYY/mm/dd') as date_closed, + u.company_id as company_id, + c.priority as priority, + c.project_id as project_id, + c.type_id as type_id, count(*) as nbr, to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close from project_issue c + left join + res_users u on (c.id = u.id) group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id,c.stage_id + ,c.date_closed,u.company_id,c.priority,c.project_id,c.type_id )""") diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml index dd379c91fe0..72d665cdff0 100644 --- a/addons/project_issue/report/project_issue_report_view.xml +++ b/addons/project_issue/report/project_issue_report_view.xml @@ -1,9 +1,7 @@ - + project.issue.report.tree project.issue.report @@ -12,19 +10,22 @@ + + + + + - - - + - + project.issue.report.graph project.issue.report @@ -43,22 +44,64 @@ search - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Project Issue Report + Project Issue project.issue.report form graph,tree - - + + tree @@ -70,9 +113,9 @@ graph - + - + diff --git a/addons/project_timesheet/__init__.py b/addons/project_timesheet/__init__.py index 6c907cff3bf..9dd42114b9c 100644 --- a/addons/project_timesheet/__init__.py +++ b/addons/project_timesheet/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,9 +15,10 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import project_timesheet +import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_timesheet/__terp__.py b/addons/project_timesheet/__terp__.py index 8e4cbb898a7..f98a796a935 100644 --- a/addons/project_timesheet/__terp__.py +++ b/addons/project_timesheet/__terp__.py @@ -33,7 +33,7 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'project', 'hr_timesheet_sheet'], 'init_xml': [], - 'update_xml': ["process/project_timesheet_process.xml"], + 'update_xml': ["process/project_timesheet_process.xml", "report/task_report_view.xml"], 'demo_xml': [], 'installable': True, 'active': False, diff --git a/addons/report_analytic_line/__init__.py b/addons/project_timesheet/report/__init__.py similarity index 96% rename from addons/report_analytic_line/__init__.py rename to addons/project_timesheet/report/__init__.py index e68279cad8d..232b71a8975 100644 --- a/addons/report_analytic_line/__init__.py +++ b/addons/project_timesheet/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,10 +15,9 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## - - +import task_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_timesheet/report/task_report.py b/addons/project_timesheet/report/task_report.py new file mode 100644 index 00000000000..fb6331dda0b --- /dev/null +++ b/addons/project_timesheet/report/task_report.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields,osv +import mx.DateTime +import tools + +#class task_report(osv.osv): +# _name = "task.report" +# _description = "Project task report" +# _auto = False +# _columns = { +# 'name': fields.char('Task',size=64,required=False, readonly=True), +# 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), +# ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), +# 'user_id':fields.many2one('res.users', 'User', readonly=True), +# 'task_nbr': fields.float('Task Number', readonly=True), +# 'task_hrs': fields.float('Task Hours', readonly=True), +# 'task_progress': fields.float('Task Progress', readonly=True), +# 'company_id' : fields.many2one('res.company', 'Company'), +# 'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'Status', readonly=True), +# 'project_id':fields.many2one('project.project', 'Project'), +# 'year': fields.char('Year',size=64,required=False, readonly=True), +# 'date_start': fields.datetime('Starting Date',readonly=True), +# 'date_end': fields.datetime('Ending Date',readonly=True), +# 'date_deadline': fields.date('Deadline',readonly=True), +# 'type': fields.many2one('project.task.type', 'Stage'), +# 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'), +# 'assign_to': fields.many2one('res.users', 'Assigned to', readonly=True), +# 'remaining_hrs': fields.float('Remaining Hours', readonly=True), +# } +# +# def init(self, cr): +# tools.sql.drop_view_if_exists(cr, 'task_report') +# cr.execute(''' +# create or replace view task_report as ( +# select +# min(t.id) as id, +# to_char(t.create_date, 'YYYY') as year, +# to_char(t.create_date,'MM') as month, +# u.id as user_id, +# u.company_id as company_id, +# t.name as name, +# t.project_id as project_id, +# to_char(t.date_start,'YYYY/mm/dd') as date_start, +# to_char(t.date_end,'YYYY/mm/dd') as date_end, +# to_char(t.date_deadline,'YYYY/mm/dd') as date_deadline, +# t.type as type, +# t.priority as priority, +# t.user_id as assign_to, +# t.remaining_hours as remaining_hrs, +# count(t.*) as task_nbr, +# sum(t.planned_hours) as task_hrs, +# sum(t.planned_hours * (100 - t.progress) / 100) as task_progress, +# case when t.state is null then 'no' else t.state end as task_state +# from +# res_users u +# left join +# project_task t on (u.id = t.user_id) +# where +# u.active +# group by +# to_char(t.create_date, 'YYYY'),to_char(t.create_date,'MM'),u.id, u.company_id, t.state +# ,t.name,t.project_id,t.type,t.priority, +# t.user_id,t.remaining_hours,to_char(t.date_start,'YYYY/mm/dd'),to_char(t.date_end,'YYYY/mm/dd'),to_char(t.date_deadline,'YYYY/mm/dd') +# ) +# ''') +#task_report() + +class report_timesheet_task_user(osv.osv): + _name = "report.timesheet.task.user" + _auto = False + _order = "name" + + def _get_task_hours(self, cr, uid, ids, name,args,context): + result = {} + for record in self.browse(cr, uid, ids,context): + last_date = mx.DateTime.strptime(record.name, '%Y-%m-%d') + mx.DateTime.RelativeDateTime(months=1) - 1 + task_obj=self.pool.get('project.task.work') + task_ids = task_obj.search(cr,uid,[('user_id','=',record.user_id.id),('date','>=',record.name),('date','<=',last_date.strftime('%Y-%m-%d'))]) + tsk_hrs = task_obj.read(cr,uid,task_ids,['hours','date','user_id']) + total = 0.0 + for hrs in tsk_hrs: + total += hrs['hours'] + result[record.id] = total + return result + + def get_hrs_timesheet(self, cr, uid, ids, name,args,context): + result = {} + sum = 0.0 + for record in self.browse(cr, uid, ids, context): + last_date = mx.DateTime.strptime(record.name, '%Y-%m-%d') + mx.DateTime.RelativeDateTime(months=1) - 1 + obj=self.pool.get('hr_timesheet_sheet.sheet.day') + sheet_ids = obj.search(cr,uid,[('sheet_id.user_id','=',record.user_id.id),('name','>=',record.name),('name','<=',last_date.strftime('%Y-%m-%d'))]) + data_days = obj.read(cr,uid,sheet_ids,['name','sheet_id.user_id','total_attendance']) + total = 0.0 + for day_attendance in data_days: + total += day_attendance['total_attendance'] + result[record.id] = total + return result + + _columns = { + 'name': fields.char('Name',size=64), + 'year': fields.char('Year',size=64,required=False, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), + ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), + 'user_id': fields.many2one('res.users', 'User',readonly=True), + 'timesheet_hrs': fields.function(get_hrs_timesheet, method=True, string="Timesheet Hours"), + 'task_hrs': fields.function(_get_task_hours, method=True, string="Task Hours"), + + } + + + def init(self, cr): + cr.execute(""" create or replace view report_timesheet_task_user as ( + select + ((r.id*12)+to_number(months.m_id,'99'))::integer as id, + months.name as name, + r.id as user_id, + to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') as year, + to_char(to_date(months.name, 'YYYY/MM/DD'),'MM') as month + from res_users r, + (select to_char(p.date,'YYYY-MM-01') as name, + to_char(p.date,'MM') as m_id + from project_task_work p + + union + select to_char(h.name,'YYYY-MM-01') as name, + to_char(h.name,'MM') as m_id + from hr_timesheet_sheet_sheet_day h) as months + + group by + r.id,months.m_id,months.name, + to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') , + to_char(to_date(months.name, 'YYYY/MM/DD'),'MM') + ) """) + +report_timesheet_task_user() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/project_timesheet/report/task_report_view.xml b/addons/project_timesheet/report/task_report_view.xml new file mode 100644 index 00000000000..e44e399b292 --- /dev/null +++ b/addons/project_timesheet/report/task_report_view.xml @@ -0,0 +1,182 @@ + + + + + + + + + + report.timesheet.task.user.tree + report.timesheet.task.user + tree + + + + + + + + + + + + + report.timesheet.task.user.search + report.timesheet.task.user + search + + + + + + + + + + + + + + + + + + + + + Timesheet / Task Hours Per Month + report.timesheet.task.user + form + tree + + + + + + diff --git a/addons/project_timesheet/security/ir.model.access.csv b/addons/project_timesheet/security/ir.model.access.csv new file mode 100644 index 00000000000..42c3ea0d15c --- /dev/null +++ b/addons/project_timesheet/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_task_report","report.task.report","model_task_report","project.group_project_manager",1,0,0,0 +"access_report_timesheet_task_user","report.timesheet.task.user","model_report_timesheet_task_user","project.group_project_manager",1,0,0,0 diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py index 7c5aa05f640..ed338d3eaf7 100644 --- a/addons/purchase/__terp__.py +++ b/addons/purchase/__terp__.py @@ -41,7 +41,8 @@ 'purchase_wizard.xml', 'stock_view.xml', 'partner_view.xml', - 'process/purchase_process.xml' + 'process/purchase_process.xml', + 'report/purchase_report_view.xml', ], 'demo_xml': ['purchase_demo.xml'], 'installable': True, diff --git a/addons/purchase/report/__init__.py b/addons/purchase/report/__init__.py index c4cc8211bd9..65d4fb0bc65 100644 --- a/addons/purchase/report/__init__.py +++ b/addons/purchase/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,12 +15,13 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import order import request_quotation +import purchase_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_purchase/report_purchase.py b/addons/purchase/report/purchase_report.py similarity index 56% rename from addons/report_purchase/report_purchase.py rename to addons/purchase/report/purchase_report.py index caf482fe14e..ac9abaaf590 100644 --- a/addons/report_purchase/report_purchase.py +++ b/addons/purchase/report/purchase_report.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -26,11 +26,12 @@ from osv import fields,osv import tools -class report_purchase_order_product(osv.osv): - _name = "report.purchase.order.product" - _description = "Purchases Orders by Products" +class report_purchase_order(osv.osv): + _name = "report.purchase.order" + _description = "Purchases Orders" _auto = False _columns = { + 'date': fields.date('Date', readonly=True), 'name': fields.char('Year',size=64,required=False, readonly=True), 'state': fields.selection([ ('draft','Quotation'), @@ -43,6 +44,11 @@ class report_purchase_order_product(osv.osv): ('cancel','Cancel') ], 'Order State', readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), + 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', readonly=True), + 'category_id': fields.many2one('product.category', 'Categories', readonly=True), + 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True), + 'company_id':fields.many2one('res.company', 'Company', readonly=True), + 'user_id':fields.many2one('res.users', 'Responsible', readonly=True), 'quantity': fields.float('# of Products', readonly=True), 'price_total': fields.float('Total Price', readonly=True), 'price_average': fields.float('Average Price', readonly=True), @@ -53,62 +59,20 @@ class report_purchase_order_product(osv.osv): } _order = 'name desc,price_total desc' def init(self, cr): - tools.sql.drop_view_if_exists(cr, 'report_purchase_order_product') + tools.sql.drop_view_if_exists(cr, 'report_purchase_order') cr.execute(""" - create or replace view report_purchase_order_product as ( + create or replace view report_purchase_order as ( select min(l.id) as id, + s.date_order as date, to_char(s.date_order, 'YYYY') as name, to_char(s.date_order, 'MM') as month, s.state, + s.warehouse_id as warehouse_id, + s.partner_id as partner_id, + s.create_uid as user_id, + s.company_id as company_id, l.product_id, - sum(l.product_qty*u.factor) as quantity, - count(*), - sum(l.product_qty*l.price_unit) as price_total, - (sum(l.product_qty*l.price_unit)/sum(l.product_qty*u.factor))::decimal(16,2) as price_average - from purchase_order s - left join purchase_order_line l on (s.id=l.order_id) - left join product_uom u on (u.id=l.product_uom) - where l.product_id is not null - group by l.product_id, to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),s.state - ) - """) -report_purchase_order_product() - -class report_purchase_order_category(osv.osv): - _name = "report.purchase.order.category" - _description = "Purchases Orders by Categories" - _auto = False - _columns = { - 'name': fields.char('Year',size=64,required=False, readonly=True), - 'state': fields.selection([ - ('draft','Quotation'), - ('waiting_date','Waiting Schedule'), - ('manual','Manual in progress'), - ('progress','In progress'), - ('shipping_except','Shipping Exception'), - ('invoice_except','Invoice Exception'), - ('done','Done'), - ('cancel','Cancel') - ], 'Order State', readonly=True), - 'category_id': fields.many2one('product.category', 'Categories', readonly=True), - 'quantity': fields.float('# of Products', readonly=True), - 'price_total': fields.float('Total Price', readonly=True), - 'price_average': fields.float('Average Price', readonly=True), - 'count': fields.integer('# of Lines', readonly=True), - 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), - ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), - } - _order = 'name desc,price_total desc' - def init(self, cr): - tools.sql.drop_view_if_exists(cr, 'report_purchase_order_category') - cr.execute(""" - create or replace view report_purchase_order_category as ( - select - min(l.id) as id, - to_char(s.date_order, 'YYYY') as name, - to_char(s.date_order, 'MM') as month, - s.state, t.categ_id as category_id, sum(l.product_qty*u.factor) as quantity, count(*), @@ -120,10 +84,13 @@ class report_purchase_order_category(osv.osv): left join product_template t on (t.id=p.product_tmpl_id) left join product_uom u on (u.id=l.product_uom) where l.product_id is not null - group by t.categ_id, to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),s.state - ) + group by s.company_id,s.create_uid,s.partner_id, + t.categ_id,l.product_id,s.date_order, + to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),s.state, + s.warehouse_id + ) """) -report_purchase_order_category() +report_purchase_order() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml new file mode 100644 index 00000000000..0810b013b23 --- /dev/null +++ b/addons/purchase/report/purchase_report_view.xml @@ -0,0 +1,105 @@ + + + + + product.month.graph + report.purchase.order + graph + + + + + + + + + + + report.purchase.order.tree + report.purchase.order + tree + + + + + + + + + + + + + + + + + + + + + + report.purchase.order.search + report.purchase.order + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Purchase Orders + report.purchase.order + form + tree,graph + + + + + + + + diff --git a/addons/purchase/security/ir.model.access.csv b/addons/purchase/security/ir.model.access.csv index 5fb968e6ce1..e1eb2cdf199 100644 --- a/addons/purchase/security/ir.model.access.csv +++ b/addons/purchase/security/ir.model.access.csv @@ -7,4 +7,5 @@ "access_stock_move_purchase_user","stock.move purchase_user","stock.model_stock_move","purchase.group_purchase_user",1,1,1,1 "access_purchase_order_stock_worker","purchase.order stock_worker","model_purchase_order","stock.group_stock_user",1,0,0,0 "access_purchase_order_line_stock_worker","purchase.order.line stock_worker","model_purchase_order_line","stock.group_stock_user",1,0,0,0 -"access_account_tax_purchase_user","account.tax purchase_user","account.model_account_tax","purchase.group_purchase_user",1,0,0,0 \ No newline at end of file +"access_account_tax_purchase_user","account.tax purchase_user","account.model_account_tax","purchase.group_purchase_user",1,0,0,0 +"access_report_purchase_order","report.purchase.order","model_report_purchase_order","purchase.group_purchase_manager",1,0,0,0 diff --git a/addons/report_account/__init__.py b/addons/report_account/__init__.py deleted file mode 100644 index a32842f6570..00000000000 --- a/addons/report_account/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import report_receivable - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_account/__terp__.py b/addons/report_account/__terp__.py deleted file mode 100644 index 43f9ab946f8..00000000000 --- a/addons/report_account/__terp__.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Account Reporting - Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Accounting', - 'description': """A module that adds new reports based on the account module.""", - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['account'], - 'init_xml': [], - 'update_xml': ['security/ir.model.access.csv', 'report_receivable_view.xml'], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0061754222813', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_account/security/ir.model.access.csv b/addons/report_account/security/ir.model.access.csv deleted file mode 100644 index b37051847a4..00000000000 --- a/addons/report_account/security/ir.model.access.csv +++ /dev/null @@ -1,7 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,0,0,0 -"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0 -"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,0,0,0 -"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_account_manager",1,0,0,0 -"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,0,0,0 -"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,0,0,0 diff --git a/addons/report_analytic/__init__.py b/addons/report_analytic/__init__.py deleted file mode 100644 index ad14dd13f4e..00000000000 --- a/addons/report_analytic/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import report_analytic - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_analytic/__terp__.py b/addons/report_analytic/__terp__.py deleted file mode 100644 index c5ec3a0dd8f..00000000000 --- a/addons/report_analytic/__terp__.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Analytic Account Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Accounting', - 'description': """A module that adds new reports based on analytic accounts.""", - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['account', 'hr_timesheet_invoice'], - 'init_xml': [], - 'update_xml': ['security/ir.model.access.csv', 'report_analytic_view.xml'], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0059950675429', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic/security/ir.model.access.csv b/addons/report_analytic/security/ir.model.access.csv deleted file mode 100644 index 67807398c36..00000000000 --- a/addons/report_analytic/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_report_analytic_account_close,report.analytic.account.close,model_report_analytic_account_close,account.group_account_manager,1,0,0,0 -access_report_account_analytic_line_to_invoice,report.account.analytic.line.to.invoice,model_report_account_analytic_line_to_invoice,account.group_account_manager,1,0,0,0 \ No newline at end of file diff --git a/addons/report_analytic_line/__terp__.py b/addons/report_analytic_line/__terp__.py deleted file mode 100644 index 28519d4cbe3..00000000000 --- a/addons/report_analytic_line/__terp__.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Analytic lines - Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Accounting', - 'description': """A report on analytic lines, costs by products, months and accounts. - - - ATTENTION: - This Module is merged into report_analytic module. so It will be removed in future""", - - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['account', 'hr_timesheet_invoice'], - 'init_xml': [], - 'update_xml': [], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0075179053853', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic_line/security/ir.model.access.csv b/addons/report_analytic_line/security/ir.model.access.csv deleted file mode 100644 index 7390bda1e77..00000000000 --- a/addons/report_analytic_line/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_report_account_analytic_line_to_invoice,report.account.analytic.line.to.invoice,model_report_account_analytic_line_to_invoice,account.group_account_manager,1,0,0,0 diff --git a/addons/report_document/__init__.py b/addons/report_document/__init__.py deleted file mode 100644 index 589836526a1..00000000000 --- a/addons/report_document/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -import report_document -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_document/__terp__.py b/addons/report_document/__terp__.py deleted file mode 100644 index a75bccbcf05..00000000000 --- a/addons/report_document/__terp__.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Document Management - Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Document Management', - 'description': """ - Reporting for the Document Management module: - * My Files - * All users Files - """, - 'author': 'Tiny', - 'depends': ['document'], - 'init_xml': [], - 'update_xml': ['report_document_view.xml', 'security/ir.model.access.csv'], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0068012774557', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_document/security/ir.model.access.csv b/addons/report_document/security/ir.model.access.csv deleted file mode 100644 index b9a90b3a610..00000000000 --- a/addons/report_document/security/ir.model.access.csv +++ /dev/null @@ -1,9 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_report_document_user_group_document_manager","report.document.user document manager","model_report_document_user","document.group_document_manager",1,0,0,0 -"access_report_document_user_group_system","report.document.user group system","model_report_document_user","base.group_system",1,0,0,0 -"access_report_files_partner_group_document_manager","report.files.partner document manager","model_report_files_partner","document.group_document_manager",1,0,0,0 -"access_report_files_partner_group_system","report.files.partner group system","model_report_files_partner","base.group_system",1,0,0,0 -"access_report_document_file_group_document_manager","report.document.file document manager","model_report_document_file","document.group_document_manager",1,0,0,0 -"access_report_document_file_group_system","report.document.file group system","model_report_document_file","base.group_system",1,0,0,0 -"access_report_document_wall_group_document_manager","report.document.wall document manager","model_report_document_wall","document.group_document_manager",1,0,0,0 -"access_report_document_wall_group_system","report.document.wall group system","model_report_document_wall","base.group_system",1,0,0,0 diff --git a/addons/report_mrp/__terp__.py b/addons/report_mrp/__terp__.py deleted file mode 100644 index b58dbd5c601..00000000000 --- a/addons/report_mrp/__terp__.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'MRP Management - Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Production', - 'description': """A module that adds new reports based on MRP cases. - Work Center loads, Weekly Stock value variation""", - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['mrp'], - 'init_xml': [], - 'update_xml': ['security/ir.model.access.csv', 'report_mrp_view.xml'], - 'demo_xml': [], - 'installable': True, - 'certificate': '0071582896029', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_mrp/security/ir.model.access.csv b/addons/report_mrp/security/ir.model.access.csv deleted file mode 100644 index 57029b92b13..00000000000 --- a/addons/report_mrp/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_report_workcenter_load,report.workcenter.load,model_report_workcenter_load,mrp.group_mrp_manager,1,0,0,0 -access_report_mrp_inout,report.mrp.inout,model_report_mrp_inout,mrp.group_mrp_manager,1,0,0,0 diff --git a/addons/report_project/__init__.py b/addons/report_project/__init__.py deleted file mode 100644 index eced45af748..00000000000 --- a/addons/report_project/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import report_project - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_project/__terp__.py b/addons/report_project/__terp__.py deleted file mode 100644 index 0c55a666abf..00000000000 --- a/addons/report_project/__terp__.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Project Management - Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Sales & Purchases', - 'description': """A module that adds some reports on projects. - Closed Tasks (By User and By Project), Finished Task (By User and By Project)""", - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['project', 'report_task'], - 'init_xml': [], - 'update_xml': ['security/ir.model.access.csv', 'report_project_view.xml'], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0086804423149', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_project/report_project_view.xml b/addons/report_project/report_project_view.xml deleted file mode 100644 index 58338959f2c..00000000000 --- a/addons/report_project/report_project_view.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - report.project.task.user.form - report.project.task.user - form - -
- - - - - - - - - - - -
- - - - report.project.task.user.tree - report.project.task.user - tree - - - - - - - - - - - - - - - - - report.project.task.user.search - report.project.task.user - search - - - - - - - - - - - - - - - - - Tasks Closed by Project and User - report.project.task.user - form - tree - - - - - - - - report.project.task.form - report.project.task - form - -
- - - - - - - - - - -
- - report.project.task.tree - report.project.task - tree - - - - - - - - - - - - - - - - report.project.task.search - report.project.task - search - - - - - - - - - - - - - - - - - Tasks Closed by Project - report.project.task - form - tree - - - - -
-
diff --git a/addons/report_project/security/ir.model.access.csv b/addons/report_project/security/ir.model.access.csv deleted file mode 100644 index 8222c7cc0fe..00000000000 --- a/addons/report_project/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_report_project_task_user,report.project.task.user,model_report_project_task_user,project.group_project_manager,1,0,0,0 -access_report_project_task,report.project.task,model_report_project_task,project.group_project_manager,1,0,0,0 diff --git a/addons/report_purchase/__init__.py b/addons/report_purchase/__init__.py deleted file mode 100644 index 83e17dc65d0..00000000000 --- a/addons/report_purchase/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import report_purchase - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_purchase/__terp__.py b/addons/report_purchase/__terp__.py deleted file mode 100644 index 279ff24ca8e..00000000000 --- a/addons/report_purchase/__terp__.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Purchase Management - Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Sales & Purchases', - 'description': """Module to add views like - Purchase By Product, Purchase By Category of Product, All Months, Current Month.""", - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['purchase'], - 'init_xml': [], - 'update_xml': ['security/ir.model.access.csv', 'report_purchase_view.xml'], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0073370750365', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_purchase/report_purchase_view.xml b/addons/report_purchase/report_purchase_view.xml deleted file mode 100644 index e2559b2c539..00000000000 --- a/addons/report_purchase/report_purchase_view.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - report.purchase.order.product.form - report.purchase.order.product - form - -
- - - - - - - - - - -
- - - product.month.graph - report.purchase.order.product - graph - - - - - - - - - - - report.purchase.order.product.tree - report.purchase.order.product - tree - - - - - - - - - - - - - - - - report.purchase.order.product.search - report.purchase.order.product - search - - - - - - - - - - - - - - - - - Purchases by Products - report.purchase.order.product - form - tree,graph - - - - - - - - - - report.purchase.order.category.form - report.purchase.order.category - form - -
- - - - - - - - - - -
- - - product.category.graph - report.purchase.order.category - graph - - - - - - - - - - - report.purchase.order.category.tree - report.purchase.order.category - tree - - - - - - - - - - - - - - - - report.purchase.order.category.search - report.purchase.order.category - search - - - - - - - - - - - - - - - - - Purchases by Category of Products - report.purchase.order.category - form - tree,graph - - - - - - - - -
-
diff --git a/addons/report_purchase/security/ir.model.access.csv b/addons/report_purchase/security/ir.model.access.csv deleted file mode 100644 index ee05ec94cd5..00000000000 --- a/addons/report_purchase/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_report_purchase_order_product,report.purchase.order.product,model_report_purchase_order_product,purchase.group_purchase_manager,1,0,0,0 -access_report_purchase_order_category,report.purchase.order.category,model_report_purchase_order_category,purchase.group_purchase_manager,1,0,0,0 diff --git a/addons/report_task/__terp__.py b/addons/report_task/__terp__.py deleted file mode 100644 index 843bfa4c79e..00000000000 --- a/addons/report_task/__terp__.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Report on tasks by user for projects', - 'version': '1.0', - 'category': 'Generic Modules/Projects & Services', - 'description': """Gives statistics on tasks by user on projects to check the pipeline of users.""", - 'author': 'Tiny', - 'depends': ['base', 'project','hr_timesheet_sheet'], - 'init_xml': [], - 'update_xml': ['security/ir.model.access.csv', 'report_task_view.xml'], - 'installable': True, - 'active': False, - 'certificate': '0027671328157', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_task/report_task.py b/addons/report_task/report_task.py deleted file mode 100644 index 54792395053..00000000000 --- a/addons/report_task/report_task.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from osv import fields,osv -import mx.DateTime - -class report_task_user_pipeline_open (osv.osv): - _name = "report.task.user.pipeline.open" - _description = "Tasks by user and project" - _auto = False - _columns = { - 'name': fields.char('Year',size=64,required=False, readonly=True), - 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), - ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), - 'user_id':fields.many2one('res.users', 'User', readonly=True), - 'task_nbr': fields.float('Task Number', readonly=True), - 'task_hrs': fields.float('Task Hours', readonly=True), - 'task_progress': fields.float('Task Progress', readonly=True), - 'company_id' : fields.many2one('res.company', 'Company'), - 'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'Status', readonly=True), - } - - def init(self, cr): - cr.execute(''' - create or replace view report_task_user_pipeline_open as ( - select - min(t.id) as id, - to_char(t.create_date, 'YYYY') as name, - to_char(t.create_date,'MM') as month, - u.id as user_id, - u.company_id as company_id, - count(t.*) as task_nbr, - sum(t.planned_hours) as task_hrs, - sum(t.planned_hours * (100 - t.progress) / 100) as task_progress, - case when t.state is null then 'no' else t.state end as task_state - from - res_users u - left join - project_task t on (u.id = t.user_id) - where - u.active - group by - to_char(t.create_date, 'YYYY'),to_char(t.create_date,'MM'),u.id, u.company_id, t.state - ) - ''') -report_task_user_pipeline_open() - -class report_closed_task(osv.osv): - _name = "report.closed.task" - _description = "Closed Task Report" - _auto = False - _columns = { - 'sequence': fields.integer('Sequence', readonly=True, help="Gives the sequence order when displaying a list of closed task reports."), - 'name': fields.char('Task summary', size=128, readonly=True), - 'project_id': fields.many2one('project.project', 'Project', readonly=True), - 'user_id': fields.many2one('res.users', 'Assigned to', readonly=True), - 'date_deadline': fields.datetime('Deadline', readonly=True), - 'planned_hours': fields.float('Planned Hours', readonly=True), - 'delay_hours': fields.float('Delay Hours', readonly=True), - 'progress': fields.float('Progress (%)', readonly=True), - 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance', readonly=True), - 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', readonly=True), - 'remaining_hours': fields.float('Remaining Hours', readonly=True), - 'date_end' : fields.datetime('Date Closed', readonly=True) - } - - def init(self, cr): - cr.execute(''' - create or replace view report_closed_task as ( - select - tsk.id as id, tsk.sequence as sequence, tsk.name as name, - tsk.project_id as project_id, tsk.user_id as user_id, - tsk.date_deadline as date_deadline, tsk.planned_hours as planned_hours, - tsk.delay_hours as delay_hours, tsk.progress as progress, - tsk.priority as priority, tsk.state as state, - tsk.remaining_hours as remaining_hours, tsk.date_end as date_end - from - project_task tsk - where - (tsk.date_end <= CURRENT_DATE AND tsk.date_end > (CURRENT_DATE-15)) - ) - ''') -report_closed_task() - -class report_timesheet_task_user(osv.osv): - _name = "report.timesheet.task.user" - _auto = False - _order = "name" - - def _get_task_hours(self, cr, uid, ids, name,args,context): - result = {} - for record in self.browse(cr, uid, ids,context): - last_date = mx.DateTime.strptime(record.name, '%Y-%m-%d') + mx.DateTime.RelativeDateTime(months=1) - 1 - task_obj=self.pool.get('project.task.work') - task_ids = task_obj.search(cr,uid,[('user_id','=',record.user_id.id),('date','>=',record.name),('date','<=',last_date.strftime('%Y-%m-%d'))]) - tsk_hrs = task_obj.read(cr,uid,task_ids,['hours','date','user_id']) - total = 0.0 - for hrs in tsk_hrs: - total += hrs['hours'] - result[record.id] = total - return result - - def get_hrs_timesheet(self, cr, uid, ids, name,args,context): - result = {} - sum = 0.0 - for record in self.browse(cr, uid, ids, context): - last_date = mx.DateTime.strptime(record.name, '%Y-%m-%d') + mx.DateTime.RelativeDateTime(months=1) - 1 - obj=self.pool.get('hr_timesheet_sheet.sheet.day') - sheet_ids = obj.search(cr,uid,[('sheet_id.user_id','=',record.user_id.id),('name','>=',record.name),('name','<=',last_date.strftime('%Y-%m-%d'))]) - data_days = obj.read(cr,uid,sheet_ids,['name','sheet_id.user_id','total_attendance']) - total = 0.0 - for day_attendance in data_days: - total += day_attendance['total_attendance'] - result[record.id] = total - return result - - _columns = { - 'name': fields.date('Month',readonly=True), - 'user_id': fields.many2one('res.users', 'User',readonly=True), - 'timesheet_hrs': fields.function(get_hrs_timesheet, method=True, string="Timesheet Hours"), - 'task_hrs': fields.function(_get_task_hours, method=True, string="Task Hours"), - } - - - def init(self, cr): - cr.execute(""" create or replace view report_timesheet_task_user as ( - select - ((r.id*12)+to_number(months.m_id,'99'))::integer as id, - months.name as name, - r.id as user_id - from res_users r, - (select to_char(p.date,'YYYY-MM-01') as name, - to_char(p.date,'MM') as m_id - from project_task_work p - - union - select to_char(h.name,'YYYY-MM-01') as name, - to_char(h.name,'MM') as m_id - from hr_timesheet_sheet_sheet_day h) as months) """) - -report_timesheet_task_user() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_task/report_task_view.xml b/addons/report_task/report_task_view.xml deleted file mode 100644 index 77ea6e1aa5c..00000000000 --- a/addons/report_task/report_task_view.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - report.project.task.form - report.task.user.pipeline.open - form - -
- - - - - - - - -
- - - report.project.task.graph - report.task.user.pipeline.open - graph - - - - - - - - - - report.project.task.tree - report.task.user.pipeline.open - tree - - - - - - - - - - - - - - - - report.task.user.pipeline.open.search - report.task.user.pipeline.open - search - - - - - - - - - - - - - - - - Tasks by User - report.task.user.pipeline.open - form - tree,graph - [] - - - - - - - - - report.closed.task.tree - report.closed.task - tree - - - - - - - - - - - - - - - - - - - - Task Closed Within Past 15 Days - report.closed.task - form - tree,form - - - - - - - report.timesheet.task.user.tree - report.timesheet.task.user - tree - - - - - - - - - - - - Timesheet / Task Hours Per Month - report.timesheet.task.user - form - tree - - - -
-
diff --git a/addons/report_task/security/ir.model.access.csv b/addons/report_task/security/ir.model.access.csv deleted file mode 100644 index 68361fbd928..00000000000 --- a/addons/report_task/security/ir.model.access.csv +++ /dev/null @@ -1,4 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_report_task_user_pipeline_open","report.task.user.pipeline.open","model_report_task_user_pipeline_open","project.group_project_manager",1,0,0,0 -"access_report_timesheet_task_user","report.timesheet.task.user","model_report_timesheet_task_user","project.group_project_manager",1,0,0,0 -"access_report_closed_task","report.closed.task","model_report_closed_task","project.group_project_manager",1,0,0,0 diff --git a/addons/report_timesheet/__init__.py b/addons/report_timesheet/__init__.py deleted file mode 100644 index 4b57906849c..00000000000 --- a/addons/report_timesheet/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import report_timesheet - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py deleted file mode 100644 index 8fcf827af68..00000000000 --- a/addons/report_timesheet/__terp__.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Timesheet - Reporting', - 'version': '1.0', - 'category': 'Generic Modules/Human Resources', - 'description': """Module to add timesheet views like - All Month, Timesheet By User, Timesheet Of Month, Timesheet By Account""", - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['hr_timesheet', 'hr_timesheet_invoice'], - 'init_xml': [], - 'update_xml': ['security/ir.model.access.csv', 'report_timesheet_view.xml'], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0078701510301', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_timesheet/security/ir.model.access.csv b/addons/report_timesheet/security/ir.model.access.csv deleted file mode 100644 index 84001f23c56..00000000000 --- a/addons/report_timesheet/security/ir.model.access.csv +++ /dev/null @@ -1,7 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_report_timesheet_user","report_timesheet.user","model_report_timesheet_user","base.group_user",1,0,0,0 -"access_report_timesheet_account","report_timesheet.account","model_report_timesheet_account","base.group_user",1,0,0,0 -"access_report_timesheet_account_date","report_timesheet.account.date","model_report_timesheet_account_date","base.group_user",1,0,0,0 -"access_report_timesheet_invoice","report_timesheet.invoice","model_report_timesheet_invoice","base.group_user",1,0,0,0 -"access_report_random_timesheet","report_random_timesheet","model_report_random_timesheet","base.group_user",1,0,0,0 -"access_report_random_timesheet_lines","random_timesheet_lines","model_random_timesheet_lines","base.group_user",1,0,0,0 diff --git a/addons/sale/__init__.py b/addons/sale/__init__.py index 8e1da80d257..ebc12a1089e 100644 --- a/addons/sale/__init__.py +++ b/addons/sale/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -27,8 +27,6 @@ import sale import stock import product import mrp -import sale_report - import wizard import report diff --git a/addons/sale/__terp__.py b/addons/sale/__terp__.py index 70d9f084afb..51ddf03fe55 100644 --- a/addons/sale/__terp__.py +++ b/addons/sale/__terp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -52,11 +52,10 @@ 'sale_data.xml', 'sale_wizard.xml', 'sale_view.xml', - 'sale_report_view.xml', + 'report/sale_report_view.xml', 'sale_report.xml', 'sale_wizard.xml', 'stock_view.xml', - 'report_sale_view.xml', 'process/sale_process.xml', ], 'demo_xml': ['sale_demo.xml'], diff --git a/addons/sale/report/__init__.py b/addons/sale/report/__init__.py index 60b6a2999fc..fb04b328a57 100644 --- a/addons/sale/report/__init__.py +++ b/addons/sale/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,10 +15,11 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import sale_prepare_allot import order +import sale_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/sale_report.py b/addons/sale/report/sale_report.py similarity index 97% rename from addons/sale/sale_report.py rename to addons/sale/report/sale_report.py index 2f387ee3883..3ba814b438f 100644 --- a/addons/sale/sale_report.py +++ b/addons/sale/report/sale_report.py @@ -32,7 +32,7 @@ class sale_report(osv.osv): 'date': fields.date('Date', readonly=True), 'year': fields.char('Year', size=4, readonly=True), 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), - ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), 'product_qty':fields.float('Qty', readonly=True), @@ -57,7 +57,7 @@ class sale_report(osv.osv): } _order = 'date desc' def init(self, cr): - tools.drop_view_if_exists(cr, 'report_sale_order_product') + tools.drop_view_if_exists(cr, 'sale_report') cr.execute(""" create or replace view sale_report as ( select diff --git a/addons/sale/sale_report_view.xml b/addons/sale/report/sale_report_view.xml similarity index 100% rename from addons/sale/sale_report_view.xml rename to addons/sale/report/sale_report_view.xml diff --git a/addons/sale/report_sale_view.xml b/addons/sale/report_sale_view.xml deleted file mode 100644 index 30816750035..00000000000 --- a/addons/sale/report_sale_view.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/addons/stock/__init__.py b/addons/stock/__init__.py index d728efbf2fe..a2df9bdd809 100644 --- a/addons/stock/__init__.py +++ b/addons/stock/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,18 +15,15 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## from stock import * import partner import product - import report import wizard -import report_stock - import stock_wizard diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index 8081c4b6738..7a03b225dc2 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -45,14 +45,15 @@ Thanks to the double entry management, the inventory controlling is powerful and "stock_data.xml", "stock_incoterms.xml", "stock_wizard.xml", - "stock_wizard_view.xml", + "stock_wizard_view.xml", "stock_view.xml", "stock_report.xml", "stock_sequence.xml", "product_data.xml", "product_view.xml", "partner_view.xml", - "report_stock_view.xml", + "report/report_stock_view.xml", + "report/report_stock_picking_view.xml", "security/stock_security.xml", "security/ir.model.access.csv", ], diff --git a/addons/stock/report/__init__.py b/addons/stock/report/__init__.py index 5bad46baa07..6e0bc044d3e 100644 --- a/addons/stock/report/__init__.py +++ b/addons/stock/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -26,6 +26,8 @@ import ups import picking import lot_overview import lot_overview_all +import report_stock +import report_stock_picking # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/report_stock.py b/addons/stock/report/report_stock.py similarity index 100% rename from addons/stock/report_stock.py rename to addons/stock/report/report_stock.py diff --git a/addons/stock/report/report_stock_picking.py b/addons/stock/report/report_stock_picking.py new file mode 100644 index 00000000000..2fe450d60de --- /dev/null +++ b/addons/stock/report/report_stock_picking.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from osv import fields,osv +import tools + +class report_stock_picking(osv.osv): + _name = "report.stock.picking" + _description = "Stock Picking Report" + _auto = False + _columns = { + 'name': fields.char('Year',size=64,required=False, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), + ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True), + 'reference': fields.char('Reference', size=64, select=True), + 'nbr': fields.integer('# of Orders', readonly=True), + 'origin': fields.char('Origin', size=64), + 'order_date':fields.date('Order Date'), + 'state': fields.selection([('draft', 'Draft'),('auto', 'Waiting'),('confirmed', 'Confirmed'),('assigned', 'Available'),('done', 'Done'),('cancel', 'Cancelled')], 'State'), + 'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True), + 'address_id': fields.many2one('res.partner.address', 'Partner'), + 'expected_date': fields.date('Expected Date'), + + } + def init(self, cr): + tools.drop_view_if_exists(cr, 'report_stock_picking') + cr.execute(""" + create or replace view report_stock_picking as ( + select + min(c.id) as id, + to_char(c.create_date, 'YYYY') as name, + to_char(c.create_date, 'MM') as month, + c.name as reference, + c.origin, + c.state, + c.type, + c.address_id, + to_date(to_char(c.date, 'MM-dd-YYYY'),'MM-dd-YYYY') as order_date, + to_date(to_char(c.min_date, 'MM-dd-YYYY'),'MM-dd-YYYY') as expected_date, + count(*) as nbr + from + stock_picking c + group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.name,c.origin,c.date,c.state,c.type,c.address_id,c.min_date + )""") +report_stock_picking() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml new file mode 100644 index 00000000000..f2d4bfe4507 --- /dev/null +++ b/addons/stock/report/report_stock_picking_view.xml @@ -0,0 +1,123 @@ + + + + + + + report.stock.picking.tree + report.stock.picking + tree + + + + + + + + + + + + + + + + + + report.stock.picking.form + report.stock.picking + form + +
+ + + + + +
+ + + report.stock.picking.graph + report.stock.picking + graph + + + + + + + + + + report.stock.picking.select + report.stock.picking + search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Picking + report.stock.picking + form + tree,graph + + + + + + + tree + + + + + + + graph + + + + + + +
+
+ diff --git a/addons/stock/report_stock_view.xml b/addons/stock/report/report_stock_view.xml similarity index 100% rename from addons/stock/report_stock_view.xml rename to addons/stock/report/report_stock_view.xml diff --git a/addons/stock/security/ir.model.access.csv b/addons/stock/security/ir.model.access.csv index eea058ebde1..d00a55b0b9f 100644 --- a/addons/stock/security/ir.model.access.csv +++ b/addons/stock/security/ir.model.access.csv @@ -22,4 +22,5 @@ "access_stock_move_consume","stock.move.consume","model_stock_move_consume","stock.group_stock_user",1,0,0,0 "access_stock_move_scrap","stock.move.scrap","model_stock_move_scrap","stock.group_stock_user",1,0,0,0 "access_stock_move_split","stock.move.split","model_stock_move_split","stock.group_stock_user",1,0,0,0 -"access_stock_move_split_lines","stock.move.split.lines","model_stock_move_split_lines","stock.group_stock_user",1,0,0,0 \ No newline at end of file +"access_stock_move_split_lines","stock.move.split.lines","model_stock_move_split_lines","stock.group_stock_user",1,0,0,0 +"access_report_stock_picking","report.stock.picking","model_report_stock_picking","stock.group_stock_user",1,0,0,0