From aed296b14708184170aab81a6c42d88a60f933e6 Mon Sep 17 00:00:00 2001 From: ysa <> Date: Sun, 15 Mar 2009 14:52:53 +0530 Subject: [PATCH 01/22] Security rules are added bzr revid: vir@tinyerp.com-20090315092253-ht8rr1xs8yk2kra8 --- addons/report_account/security/ir.model.access.csv | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/report_account/security/ir.model.access.csv b/addons/report_account/security/ir.model.access.csv index 8f1a6f5536a..b37051847a4 100644 --- a/addons/report_account/security/ir.model.access.csv +++ b/addons/report_account/security/ir.model.access.csv @@ -1,2 +1,7 @@ -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 +"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 From ee1c25790765b245fb62a3bb33f74568eec2a4da Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Sun, 15 Mar 2009 15:18:36 +0530 Subject: [PATCH 02/22] [IMP] Month field added in view for report "account cost and revenue by journal" bzr revid: vir@tinyerp.com-20090315094836-81a8tdq67hj5hbmh --- addons/account/project/project_view.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 472eec0f23c..afabde4bbc2 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -17,7 +17,7 @@ - + account.analytic.account.search account.analytic.account @@ -31,11 +31,11 @@ - + - + account.analytic.account.tree @@ -346,6 +346,7 @@ + @@ -369,7 +370,7 @@ - + report.hr.timesheet.invoice.journal.search report.hr.timesheet.invoice.journal From 78c1d48949325735da7f54e4c7dcec390b52e561 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 15 Dec 2009 15:36:19 +0530 Subject: [PATCH 03/22] [IMP] Search view added for the report_analytic_line module bzr revid: vir@tinyerp.com-20091215100619-2i10u03yt3geymzk --- .../report_analytic_line_view.xml | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/addons/report_analytic_line/report_analytic_line_view.xml b/addons/report_analytic_line/report_analytic_line_view.xml index 545021bccd4..64fa7c1bc7b 100644 --- a/addons/report_analytic_line/report_analytic_line_view.xml +++ b/addons/report_analytic_line/report_analytic_line_view.xml @@ -1,7 +1,7 @@ - + report.account.analytic.line.to.invoice report.account.analytic.line.to.invoice @@ -20,7 +20,7 @@ - + report.account.analytic.line.to.invoice report.account.analytic.line.to.invoice @@ -28,6 +28,7 @@ + @@ -37,7 +38,7 @@ - + report.account.analytic.line.to.invoice.graph report.account.analytic.line.to.invoice @@ -49,17 +50,36 @@ - - + + + report.account.analytic.line.to.invoice.select + report.account.analytic.line.to.invoice + search + + + + + + + + + + + + + + + Analytic Lines to Invoice report.account.analytic.line.to.invoice form tree,graph + - + From e5972c83cdf1292b2ff5127f8b2e68546df6fda8 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 15 Dec 2009 15:40:03 +0530 Subject: [PATCH 04/22] [MOD] Changes in search view for report_document module bzr revid: vir@tinyerp.com-20091215101003-4z3b20zd92o62v30 --- addons/report_document/report_document.py | 43 ++++++++-------- .../report_document/report_document_view.xml | 50 +++++++++---------- 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/addons/report_document/report_document.py b/addons/report_document/report_document.py index 911dc3a6ace..27df808adf4 100644 --- a/addons/report_document/report_document.py +++ b/addons/report_document/report_document.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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 . # ############################################################################## @@ -39,8 +39,9 @@ class report_document_user(osv.osv): _description = "Files details by Users" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), - 'month': fields.char('Month', size=24,readonly=True), + 'name': fields.char('Year', size=64,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.integer('Owner', readonly=True), 'user':fields.char('User',size=64,readonly=True), 'file_title': fields.char('File Name',size=64,readonly=True), @@ -57,21 +58,21 @@ class report_document_user(osv.osv): create or replace view report_document_user as ( select min(f.id) as id, + to_char(f.create_date, 'YYYY') as name, + to_char(f.create_date, 'MM') as month, f.user_id as user_id, u.name as user, count(*) as nbr, - to_char(f.create_date,'YYYY-MM')||'-'||'01' as name, d.name as directory, f.create_date as create_date, f.file_size as file_size, min(f.title) as file_title, min(d.type) as type, - min(EXTRACT(MONTH FROM f.create_date)||'-'||to_char(f.create_date,'Month')) as month, f.write_date as change_date from ir_attachment f left join document_directory d on (f.parent_id=d.id and d.name<>'') inner join res_users u on (f.user_id=u.id) - group by d.name,f.parent_id,d.type,f.create_date,f.user_id,f.file_size,u.name,d.type,f.write_date + group by to_char(f.create_date, 'YYYY'), to_char(f.create_date, 'MM'),d.name,f.parent_id,d.type,f.create_date,f.user_id,f.file_size,u.name,d.type,f.write_date ) """) report_document_user() @@ -101,9 +102,9 @@ class report_files_partner(osv.osv): to_char(f.create_date,'YYYY') as name, min(to_char(f.create_date,'MM')) as month, min(f.title) as file_title, - p.name as partner - from ir_attachment f - inner join res_partner p + p.name as partner + from ir_attachment f + inner join res_partner p on (f.partner_id=p.id) where f.datas_fname is not null group by p.name, to_char(f.create_date,'YYYY') @@ -127,12 +128,12 @@ class report_document_file(osv.osv): select min(f.id) as id, count(*) as nbr, min(EXTRACT(MONTH FROM f.create_date)||'-'||to_char(f.create_date,'Month')) as month, - sum(f.file_size) as file_size - from ir_attachment f - group by EXTRACT(MONTH FROM f.create_date) + sum(f.file_size) as file_size + from ir_attachment f + group by EXTRACT(MONTH FROM f.create_date) ) """) - + report_document_file() class report_document_wall(osv.osv): @@ -147,7 +148,7 @@ class report_document_wall(osv.osv): 'file_name':fields.char('Last Posted File Name',size=64,readonly=True), 'last':fields.datetime('Last Posted Time', readonly=True), } - + def init(self, cr): cr.execute(""" create or replace view report_document_wall as ( @@ -155,13 +156,13 @@ class report_document_wall(osv.osv): min(title) as file_name, to_char(min(f.create_date),'YYYY-MM-DD HH24:MI:SS') as last, f.user_id as user_id, f.user_id as user, - to_char(f.create_date,'Month') as month - from ir_attachment f + to_char(f.create_date,'Month') as month + from ir_attachment f where f.create_date in ( - select max(i.create_date) - from ir_attachment i - inner join res_users u on (i.user_id=u.id) - group by i.user_id) group by f.user_id,f.create_date + select max(i.create_date) + from ir_attachment i + inner join res_users u on (i.user_id=u.id) + group by i.user_id) group by f.user_id,f.create_date having (CURRENT_DATE - to_date(to_char(f.create_date,'YYYY-MM-DD'),'YYYY-MM-DD')) > 30 ) """) diff --git a/addons/report_document/report_document_view.xml b/addons/report_document/report_document_view.xml index ce01fb3e7fc..1de045c012f 100644 --- a/addons/report_document/report_document_view.xml +++ b/addons/report_document/report_document_view.xml @@ -25,6 +25,7 @@ + @@ -41,12 +42,11 @@ - - - - + + + @@ -65,9 +65,9 @@ tree - + - + report.document.wall.form @@ -97,14 +97,14 @@ - + Wall of Shame report.document.wall form tree,form - + @@ -121,7 +121,7 @@ - + @@ -141,7 +141,7 @@ form tree - + @@ -155,7 +155,7 @@ - + report.document.user.tree report.document.file @@ -173,11 +173,11 @@ form tree - - + + - + report.file.month.graph report.document.user @@ -188,11 +188,11 @@ - + - + report.file.month.tree report.document.user @@ -205,7 +205,7 @@ - + Files by Month report.document.user @@ -213,8 +213,8 @@ form tree - - + + @@ -228,7 +228,7 @@ - + Files By Users report.document.user @@ -236,8 +236,8 @@ form tree - - + + @@ -252,7 +252,7 @@ - + view.files.partner.tree report.files.partner @@ -266,7 +266,7 @@ - + view.files.partner.form report.files.partner @@ -280,7 +280,7 @@ - + Files Per Partner report.files.partner From a6a2df0a92bf5a25757e11b84cf610ae48e5697b Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 15 Dec 2009 16:18:32 +0530 Subject: [PATCH 05/22] [IMP,MOD] adding year and month for search view bzr revid: vir@tinyerp.com-20091215104832-szlf05amh6vsoamg --- addons/report_intrastat/report_intrastat.py | 14 ++++---- .../report_intrastat_view.xml | 32 ++++++++++--------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/addons/report_intrastat/report_intrastat.py b/addons/report_intrastat/report_intrastat.py index 61c1e0058f6..5da69c1e579 100644 --- a/addons/report_intrastat/report_intrastat.py +++ b/addons/report_intrastat/report_intrastat.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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 . # ############################################################################## @@ -61,7 +61,9 @@ class report_intrastat(osv.osv): _description = "Intrastat report" _auto = False _columns = { - 'name': fields.many2one('account.period', 'Period', readonly=True, select=True), + '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), 'supply_units':fields.float('Supply Units', readonly=True), 'ref':fields.char('Origin',size=64, readonly=True), 'code': fields.char('Country code', size="2", readonly=True), @@ -76,7 +78,8 @@ class report_intrastat(osv.osv): cr.execute(""" create or replace view report_intrastat as ( select - inv.period_id as name, + to_char(inv.create_date, 'YYYY') as name, + to_char(inv.create_date, 'MM') as month, min(inv_line.id) as id, intrastat.id as intrastat_id, upper(inv_country.code) as code, @@ -130,8 +133,7 @@ class report_intrastat(osv.osv): inv.state in ('open','paid') and inv_line.product_id is not null and inv_country.intrastat=true - group by inv.period_id,intrastat.id,inv.type,pt.intrastat_id, inv_country.code,inv.number, inv.currency_id + group by to_char(inv.create_date, 'YYYY'), to_char(inv.create_date, 'MM'),intrastat.id,inv.type,pt.intrastat_id, inv_country.code,inv.number, inv.currency_id )""") report_intrastat() - diff --git a/addons/report_intrastat/report_intrastat_view.xml b/addons/report_intrastat/report_intrastat_view.xml index baeb7f53af0..2242d37545b 100644 --- a/addons/report_intrastat/report_intrastat_view.xml +++ b/addons/report_intrastat/report_intrastat_view.xml @@ -12,7 +12,7 @@ - + res.country.form res.country @@ -23,7 +23,7 @@ - + product.normal.form @@ -35,7 +35,7 @@ - + report.intrastat.code.tree @@ -66,18 +66,19 @@ form tree,form - + - - + + report.intrastat.view report.intrastat tree - - + + + @@ -88,26 +89,27 @@ - + report.intrastat.search report.intrastat search - - - + + + - + + - + Intrastat ir.actions.act_window @@ -116,7 +118,7 @@ tree - + From ea61de81e8b8175b80301902cdd9086d5bb019f3 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 15 Dec 2009 16:43:59 +0530 Subject: [PATCH 06/22] [IMP] Month field added on view for report_purchase bzr revid: vir@tinyerp.com-20091215111359-6z8xmo7vvo19p6i2 --- addons/report_purchase/report_purchase_view.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/report_purchase/report_purchase_view.xml b/addons/report_purchase/report_purchase_view.xml index ff940fab14c..9fd52a77a91 100644 --- a/addons/report_purchase/report_purchase_view.xml +++ b/addons/report_purchase/report_purchase_view.xml @@ -41,6 +41,7 @@ + @@ -50,7 +51,7 @@ - + report.purchase.order.product.search report.purchase.order.product @@ -69,7 +70,7 @@ - + Purchases by Products report.purchase.order.product @@ -121,6 +122,7 @@ + From 2dec4bb9e48a852a28902574bed949af99efaddc Mon Sep 17 00:00:00 2001 From: apa <> Date: Tue, 15 Dec 2009 17:15:11 +0530 Subject: [PATCH 07/22] Set colors in stock_view file bzr revid: vir@tinyerp.com-20091215114511-3qi8m61k5gruf0f1 --- addons/stock/stock_view.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 26c6f6a9b1b..9312cdb7bba 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1060,7 +1060,7 @@ - + stock.picking.internal.search stock.picking search @@ -1205,22 +1205,22 @@ - ==================================== + ==================================== Reception Picking (By Stock Move) ==================================== - + stock.move.tree2 stock.move tree - - + + - - - + + + @@ -1233,7 +1233,7 @@ - + stock.move.form2 stock.move form @@ -1251,7 +1251,7 @@ - + stock.move.search2 stock.move search @@ -1271,7 +1271,7 @@ - + Reception Picking Stock Moves stock.move ir.actions.act_window From e6cc3d5184545ec512a9fbda39e099feb76e45a8 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 15 Dec 2009 17:21:07 +0530 Subject: [PATCH 08/22] [IMP] Added month in view for report_sale module bzr revid: vir@tinyerp.com-20091215115107-4giev0uh198ias4i --- addons/report_sale/report_sale_view.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/report_sale/report_sale_view.xml b/addons/report_sale/report_sale_view.xml index 6526bcbece0..c20153f0d10 100644 --- a/addons/report_sale/report_sale_view.xml +++ b/addons/report_sale/report_sale_view.xml @@ -27,6 +27,7 @@ + @@ -48,7 +49,7 @@ - + report.sale.order.product.search report.sale.order.product @@ -66,8 +67,8 @@ - - + + Sale Orders by Product report.sale.order.product @@ -106,6 +107,7 @@ + @@ -145,7 +147,7 @@ - + Sale Orders by Category of Products From 140758133abd55d4df6f7f877d1f216cf3e326f0 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 15 Dec 2009 18:20:45 +0530 Subject: [PATCH 09/22] [IMP,MOD] Modification for adding year and month for Tasks by user report bzr revid: vir@tinyerp.com-20091215125045-tk09aesice2v0wun --- addons/report_task/report_task.py | 33 ++++++++++--------- addons/report_task/report_task_view.xml | 42 +++++++++++++------------ 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/addons/report_task/report_task.py b/addons/report_task/report_task.py index aa39769e61f..e4870cdab61 100644 --- a/addons/report_task/report_task.py +++ b/addons/report_task/report_task.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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,6 +27,9 @@ class report_task_user_pipeline_open (osv.osv): _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), @@ -40,6 +43,8 @@ class report_task_user_pipeline_open (osv.osv): 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, @@ -48,12 +53,12 @@ class report_task_user_pipeline_open (osv.osv): case when t.state is null then 'no' else t.state end as task_state from res_users u - left join + left join project_task t on (u.id = t.user_id) where u.active group by - u.id, u.company_id, t.state + to_char(t.create_date, 'YYYY'),to_char(t.create_date,'MM'),u.id, u.company_id, t.state ) ''') report_task_user_pipeline_open() @@ -99,7 +104,7 @@ 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): @@ -112,7 +117,7 @@ class report_timesheet_task_user(osv.osv): total += hrs['hours'] result[record.id] = total return result - + def get_hrs_timesheet(self, cr, uid, ids, name,args,context): result = {} sum = 0.0 @@ -126,7 +131,7 @@ class report_timesheet_task_user(osv.osv): total += day_attendance['total_attendance'] result[record.id] = total return result - + _columns = { 'name': fields.char('Year',size=64,required=False, readonly=True), 'user_id': fields.many2one('res.users', 'User',readonly=True), @@ -135,20 +140,20 @@ class report_timesheet_task_user(osv.osv): '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), } - - - def init(self, cr): + + + def init(self, cr): cr.execute(""" create or replace view report_timesheet_task_user as ( - select + 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 + 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) """) diff --git a/addons/report_task/report_task_view.xml b/addons/report_task/report_task_view.xml index c0704b031c8..2b5c56bee8a 100644 --- a/addons/report_task/report_task_view.xml +++ b/addons/report_task/report_task_view.xml @@ -1,9 +1,9 @@ - + - + report.project.task.form report.task.user.pipeline.open @@ -19,7 +19,7 @@ - + report.project.task.graph report.task.user.pipeline.open @@ -31,13 +31,15 @@ - + report.project.task.tree report.task.user.pipeline.open tree + + @@ -47,38 +49,38 @@ - - - report.project.task.search - report.project.task + + + 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 @@ -100,7 +102,7 @@ - + Task Closed Within Past 15 Days report.closed.task @@ -108,9 +110,9 @@ tree,form - + - + report.timesheet.task.user.tree report.timesheet.task.user @@ -124,14 +126,14 @@ - + Timesheet / Task Hours Per Month report.timesheet.task.user form tree - - + + From 8555965aa16b3c0297df14adbe7565458dbcfc48 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 15 Dec 2009 19:01:31 +0530 Subject: [PATCH 10/22] [IMP] adding month field for report views bzr revid: vir@tinyerp.com-20091215133131-dmqnq7z3tinl1dp1 --- .../report_timesheet_view.xml | 75 ++++++++++--------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/addons/report_timesheet/report_timesheet_view.xml b/addons/report_timesheet/report_timesheet_view.xml index 3bbb24baf24..65a9ba23370 100644 --- a/addons/report_timesheet/report_timesheet_view.xml +++ b/addons/report_timesheet/report_timesheet_view.xml @@ -1,9 +1,9 @@ - + - + report_timesheet.user.graph report_timesheet.user @@ -16,7 +16,7 @@ - + report_timesheet.timesheet.user.form report_timesheet.user @@ -29,7 +29,7 @@ - + report_timesheet.timesheet.user.tree report_timesheet.user @@ -37,13 +37,14 @@ + - + report_timesheet.account.date.graph report_timesheet.account.date @@ -56,7 +57,7 @@ - + report_timesheet.timesheet.user.search report_timesheet.user @@ -76,7 +77,7 @@ - + Timesheet by User report_timesheet.user @@ -85,9 +86,9 @@ - + - + report_timesheet.invoice.graph report_timesheet.invoice @@ -99,7 +100,7 @@ - + report_timesheet.timesheet.invoice.form report_timesheet.invoice @@ -112,7 +113,7 @@ - + report_timesheet.timesheet.invoice.search report_timesheet.invoice @@ -127,7 +128,7 @@ - + report_timesheet.timesheet.invoice.tree report_timesheet.invoice @@ -142,7 +143,7 @@ - + Timesheet by Invoice report_timesheet.invoice @@ -151,9 +152,9 @@ - + - + report_timesheet.account.date.tree report_timesheet.account.date @@ -161,6 +162,7 @@ + @@ -179,7 +181,7 @@ - + report_timesheet.timesheet.account.date.form report_timesheet.account.date @@ -194,7 +196,7 @@ - + report_timesheet.timesheet.account.date.search report_timesheet.account.date @@ -215,7 +217,7 @@ - + Daily Timesheet by Account report_timesheet.account.date @@ -224,9 +226,9 @@ - + - + report_timesheet.account.tree report_timesheet.account @@ -234,6 +236,7 @@ + @@ -252,7 +255,7 @@ - + report_timesheet.timesheet.account.form report_timesheet.account @@ -267,7 +270,7 @@ - + report_timesheet.timesheet.account.search report_timesheet.account @@ -288,8 +291,8 @@ - - + + Timesheet by Account report_timesheet.account @@ -298,18 +301,18 @@ - + - + - + - + - - + + - + report.random.timesheet.tree report.random.timesheet @@ -323,7 +326,7 @@ - + Random Timesheet report.random.timesheet @@ -331,9 +334,9 @@ tree,form - + - + random.timesheet.lines.tree random.timesheet.lines @@ -353,7 +356,7 @@ - + ir.actions.act_window Random Timesheet Lines @@ -362,6 +365,6 @@ tree,form - + From 0a3ca44da702c23cc8b7de429d1056aa2fe202b4 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Wed, 16 Dec 2009 12:37:46 +0530 Subject: [PATCH 11/22] [ADD]: Added 'My' button in report_document view. bzr revid: uco@tinyerp.co.in-20091216070746-gah6ho3s19xjd6pd --- addons/report_document/report_document_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/report_document/report_document_view.xml b/addons/report_document/report_document_view.xml index 1de045c012f..423e02395d5 100644 --- a/addons/report_document/report_document_view.xml +++ b/addons/report_document/report_document_view.xml @@ -41,7 +41,9 @@ search - + + + From fcc54f0ab6e4e2ab7f682c27115d82b146290f8b Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Wed, 16 Dec 2009 16:21:13 +0530 Subject: [PATCH 12/22] [MOD] Removed duplicate entry for menu item bzr revid: vir@tinyerp.com-20091216105113-fnmv3tarvkxxn1tx --- addons/sale_journal/sale_journal_view.xml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml index 5fe8e511870..9dda44983ef 100644 --- a/addons/sale_journal/sale_journal_view.xml +++ b/addons/sale_journal/sale_journal_view.xml @@ -91,7 +91,7 @@ - + sale_journal.sale.journal.search sale_journal.sale.journal @@ -110,7 +110,7 @@ - + sale_journal.sale.journal form @@ -120,16 +120,6 @@ - - sale_journal.sale.journal - form - tree,form - [] - - - - - sale.order.journal.view.form form @@ -303,7 +293,7 @@ - + sale_journal.sale.stats.search sale_journal.sale.stats @@ -330,8 +320,8 @@ tree,form - - + + Date: Wed, 16 Dec 2009 16:54:10 +0530 Subject: [PATCH 13/22] [MOD] Changed name of search button bzr revid: vir@tinyerp.com-20091216112410-gslauwdjnqbt22kg --- addons/sale_journal/sale_journal_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml index 9dda44983ef..86212fc6591 100644 --- a/addons/sale_journal/sale_journal_view.xml +++ b/addons/sale_journal/sale_journal_view.xml @@ -99,7 +99,7 @@ - + From 578f16aff89b58d1cde5c314c5a868fd6bef8976 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Wed, 16 Dec 2009 16:55:23 +0530 Subject: [PATCH 14/22] [MOD] Removed duplicate menu entry bzr revid: vir@tinyerp.com-20091216112523-of8modjpgcrrdus4 --- addons/sale_journal/picking_journal_view.xml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/addons/sale_journal/picking_journal_view.xml b/addons/sale_journal/picking_journal_view.xml index 486447a785a..ac6160d9c3d 100644 --- a/addons/sale_journal/picking_journal_view.xml +++ b/addons/sale_journal/picking_journal_view.xml @@ -49,7 +49,7 @@ - + sale_journal.picking.journal.search sale_journal.picking.journal @@ -73,21 +73,10 @@ sale_journal.picking.journal form tree,form - - - - - - Picking by journal - sale_journal.picking.journal - form - tree,form - [] - - + Picking by invoice_method From 9031697aeef57711b6b217bcccb4a504d89b4540 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Wed, 16 Dec 2009 16:56:48 +0530 Subject: [PATCH 15/22] [FIX]: Small Fix in search view button of stock bzr revid: uco@tinyerp.co.in-20091216112648-s8i065d98c0t3fak --- addons/stock/stock_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 9312cdb7bba..1f78d3dffeb 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1261,7 +1261,7 @@ - + From 4808ae62c0b1430fe5a75888f42508a21fbda87a Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Wed, 16 Dec 2009 18:38:04 +0530 Subject: [PATCH 16/22] [MOD] Small changes bzr revid: vir@tinyerp.com-20091216130804-s8ytv19228uz28ul --- addons/report_task/report_task.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/report_task/report_task.py b/addons/report_task/report_task.py index e4870cdab61..110226f627e 100644 --- a/addons/report_task/report_task.py +++ b/addons/report_task/report_task.py @@ -137,8 +137,6 @@ class report_timesheet_task_user(osv.osv): '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"), - '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), } @@ -156,7 +154,7 @@ class report_timesheet_task_user(osv.osv): 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) """) + from hr_timesheet_sheet_sheet_day h) as month) """) report_timesheet_task_user() From 6a3696a3b45105f8532c7df41848a3ede4c157fc Mon Sep 17 00:00:00 2001 From: "nch@tinyerp.com" <> Date: Thu, 17 Dec 2009 11:47:00 +0530 Subject: [PATCH 17/22] [FIX]:Wizard not found ! in caldev. bzr revid: nch@tinyerp.com-20091217061700-hw0gy61bk1mi7b93 --- addons/crm/crm_calendar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/crm/crm_calendar.py b/addons/crm/crm_calendar.py index 1254c04bd56..d4f853a1a6a 100644 --- a/addons/crm/crm_calendar.py +++ b/addons/crm/crm_calendar.py @@ -387,6 +387,8 @@ virtual_report_spool() class virtual_wizard(web_services.wizard): def exp_execute(self, db, uid, wiz_id, datas, action='init', context=None): + if wiz_id not in self.wiz_uid: + super(virtual_wizard,self).exp_create(db, uid, 'module.upgrade', datas) new_ids = [] if 'id' in datas: datas['id'] = caldevIDs2readIDs(datas['id']) From 0f5c880307b44a7533bd674ded8c7ed7ccf8c3e4 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 17 Dec 2009 16:22:37 +0530 Subject: [PATCH 18/22] [IMP]: Caldav: Implemented separate functions to export data for attendee and alarm bzr revid: rpa@tinyerp.com-20091217105237-wscguztkii7f4b2z --- addons/caldav/calendar.py | 79 ++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index ce9246a6509..ddf59efe34f 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -96,41 +96,12 @@ class CalDAV(object): map_field = self.ical_get(field, 'field') map_type = self.ical_get(field, 'type') if map_field in data.keys(): - if field == 'attendee': - attendee_object = self.pool.get('crm.caldav.attendee') - for attendee in attendee_object.read(cr, uid, data[map_field], []): - attendee_add = vevent.add('attendee') - for a_key, a_val in attendee_object.__attribute__.items(): - if attendee[a_val['field']]: - if a_val['type'] == 'text': - attendee_add.params[a_key] = [str(attendee[a_val['field']])] - elif a_val['type'] == 'boolean': - attendee_add.params[a_key] = [str(attendee[a_val['field']])] - elif field == 'valarm': - alarm = vevent.add('valarm') - alarm_object = self.pool.get('crm.caldav.alarm') - alarm_data = alarm_object.read(cr, uid, data[map_field][0], []) - - # Compute trigger data - interval = alarm_data['trigger_interval'] - occurs = alarm_data['trigger_occurs'] - duration = (occurs == 'AFTER' and alarm_data['trigger_duration']) \ - or -(alarm_data['trigger_duration']) - related = alarm_data['trigger_related'] - trigger = alarm.add('TRIGGER') - trigger.params['RELATED'] = [related.upper()] - if interval == 'DAYS': - delta = timedelta(days=duration) - if interval == 'HOURS': - delta = timedelta(hours=duration) - if interval == 'MINUTES': - delta = timedelta(minutes=duration) - trigger.value = delta - - # Compute other details - alarm.add('DESCRIPTION').value = alarm_data['name'] - alarm.add('ACTION').value = alarm_data['action'] - + if field == 'attendee' and data[map_field]: + attendee_obj = self.pool.get('caldav.attendee') + vevent = attendee_obj.export_ical(cr, uid, data[map_field], vevent) + elif field == 'valarm' and data[map_field]: + alarm_obj = self.pool.get('caldav.alarm') + vevent = alarm_obj.export_ical(cr, uid, data[map_field][0], vevent) elif data[map_field]: if map_type == "text": vevent.add(field).value = str(data[map_field]) @@ -290,6 +261,32 @@ class Alarm(CalDAV, osv.osv_memory): 'x-prop': None, } + def export_ical(self, cr, uid, alarm_id, vevent): + valarm = vevent.add('valarm') + alarm_object = self.pool.get('crm.caldav.alarm') + alarm_data = alarm_object.read(cr, uid, alarm_id, []) + + # Compute trigger data + interval = alarm_data['trigger_interval'] + occurs = alarm_data['trigger_occurs'] + duration = (occurs == 'AFTER' and alarm_data['trigger_duration']) \ + or -(alarm_data['trigger_duration']) + related = alarm_data['trigger_related'] + trigger = valarm.add('TRIGGER') + trigger.params['RELATED'] = [related.upper()] + if interval == 'DAYS': + delta = timedelta(days=duration) + if interval == 'HOURS': + delta = timedelta(hours=duration) + if interval == 'MINUTES': + delta = timedelta(minutes=duration) + trigger.value = delta + + # Compute other details + valarm.add('DESCRIPTION').value = alarm_data['name'] + valarm.add('ACTION').value = alarm_data['action'] + return vevent + def import_ical(self, cr, uid, ical_data): for child in ical_data.getChildren(): if child.name.lower() == 'trigger': @@ -347,4 +344,16 @@ class Attendee(CalDAV, osv.osv_memory): vals = map_data(cr, uid, self) return vals + def export_ical(self, cr, uid, attendee_id, vevent): + attendee_object = self.pool.get('crm.caldav.attendee') + for attendee in attendee_object.read(cr, uid, attendee_id, []): + attendee_add = vevent.add('attendee') + for a_key, a_val in attendee_object.__attribute__.items(): + if attendee[a_val['field']]: + if a_val['type'] == 'text': + attendee_add.params[a_key] = [str(attendee[a_val['field']])] + elif a_val['type'] == 'boolean': + attendee_add.params[a_key] = [str(attendee[a_val['field']])] + return vevent + Attendee() From 7c1e89f851a8e6c8580786fdccfef296bbb0b96a Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 17 Dec 2009 19:05:28 +0100 Subject: [PATCH 19/22] multiple inheritancies bzr revid: fp@tinyerp.com-20091217180528-w1l9pfnw131js22a --- bin/osv/osv.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/bin/osv/osv.py b/bin/osv/osv.py index 7d85ae363a9..3847caea5b2 100644 --- a/bin/osv/osv.py +++ b/bin/osv/osv.py @@ -192,20 +192,21 @@ class osv_memory(orm.orm_memory): # def createInstance(cls, pool, module, cr): name = hasattr(cls, '_name') and cls._name or cls._inherit - parent_name = hasattr(cls, '_inherit') and cls._inherit - if parent_name: - parent_class = pool.get(parent_name).__class__ - assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (parent_name, module) - nattr = {} - for s in ('_columns', '_defaults'): - new = copy.copy(getattr(pool.get(parent_name), s)) - if hasattr(new, 'update'): - new.update(cls.__dict__.get(s, {})) - else: - new.extend(cls.__dict__.get(s, [])) - nattr[s] = new - name = hasattr(cls, '_name') and cls._name or cls._inherit - cls = type(name, (cls, parent_class), nattr) + parent_names = hasattr(cls, '_inherit') and cls._inherit + if parent_names: + for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]): + parent_class = pool.get(parent_name).__class__ + assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (parent_name, module) + nattr = {} + for s in ('_columns', '_defaults'): + new = copy.copy(getattr(pool.get(parent_name), s)) + if hasattr(new, 'update'): + new.update(cls.__dict__.get(s, {})) + else: + new.extend(cls.__dict__.get(s, [])) + nattr[s] = new + name = hasattr(cls, '_name') and cls._name or cls._inherit + cls = type(name, (cls, parent_class), nattr) obj = object.__new__(cls) obj.__init__(pool, cr) From 1320ab51224c0e58a167f5c3c58c19ae4aa9da37 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 17 Dec 2009 19:07:56 +0100 Subject: [PATCH 20/22] [imp] multiple inheritancies bzr revid: fp@tinyerp.com-20091217180756-rub0yjz05va8ryh7 --- bin/osv/osv.py | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/bin/osv/osv.py b/bin/osv/osv.py index 3847caea5b2..6f795fe3ee9 100644 --- a/bin/osv/osv.py +++ b/bin/osv/osv.py @@ -239,31 +239,32 @@ class osv(orm.orm): # put objects in the pool var # def createInstance(cls, pool, module, cr): - parent_name = hasattr(cls, '_inherit') and cls._inherit - if parent_name: - parent_class = pool.get(parent_name).__class__ - assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (parent_name, module) - nattr = {} - for s in ('_columns', '_defaults', '_inherits', '_constraints', '_sql_constraints'): - new = copy.copy(getattr(pool.get(parent_name), s)) - if hasattr(new, 'update'): - new.update(cls.__dict__.get(s, {})) - else: - if s=='_constraints': - for c in cls.__dict__.get(s, []): - exist = False - for c2 in range(len(new)): - if new[c2][2]==c[2]: - new[c2] = c - exist = True - break - if not exist: - new.append(c) + parent_names = hasattr(cls, '_inherit') and cls._inherit + if parent_names: + for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]): + parent_class = pool.get(parent_name).__class__ + assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (parent_name, module) + nattr = {} + for s in ('_columns', '_defaults', '_inherits', '_constraints', '_sql_constraints'): + new = copy.copy(getattr(pool.get(parent_name), s)) + if hasattr(new, 'update'): + new.update(cls.__dict__.get(s, {})) else: - new.extend(cls.__dict__.get(s, [])) - nattr[s] = new - name = hasattr(cls, '_name') and cls._name or cls._inherit - cls = type(name, (cls, parent_class), nattr) + if s=='_constraints': + for c in cls.__dict__.get(s, []): + exist = False + for c2 in range(len(new)): + if new[c2][2]==c[2]: + new[c2] = c + exist = True + break + if not exist: + new.append(c) + else: + new.extend(cls.__dict__.get(s, [])) + nattr[s] = new + name = hasattr(cls, '_name') and cls._name or cls._inherit + cls = type(name, (cls, parent_class), nattr) obj = object.__new__(cls) obj.__init__(pool, cr) return obj From 91370e8668d654a77412d0e1172955997e0fe529 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 17 Dec 2009 19:36:13 +0100 Subject: [PATCH 21/22] [FIX] osv_memory inherit osv bzr revid: fp@tinyerp.com-20091217183613-m8l9fvlbi5u77mvx --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index a326b6b23e3..0d8e36031f7 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1531,7 +1531,7 @@ class orm_memory(orm_template): _check_time = 20 def __init__(self, cr): - super(orm_memory, self).__init__(cr) + orm_template.__init__(self, cr) self.datas = {} self.next_id = 0 self.check_id = 0 From 5d15a496b1daf1312526b8b0a7d3cc4eb14f465c Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 17 Dec 2009 20:21:39 +0100 Subject: [PATCH 22/22] [fix] mixed inheritance between osv and osv_memory, add direct osv_base holding redundancies between osv and osv_memory and forcing resolution of its __init__ before going higher the class tree bzr revid: xmo@tinyerp.com-20091217192139-z9pnlw7d0438u89q --- bin/osv/orm.py | 2 +- bin/osv/osv.py | 35 +++++++---------------------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 0d8e36031f7..a326b6b23e3 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1531,7 +1531,7 @@ class orm_memory(orm_template): _check_time = 20 def __init__(self, cr): - orm_template.__init__(self, cr) + super(orm_memory, self).__init__(cr) self.datas = {} self.next_id = 0 self.check_id = 0 diff --git a/bin/osv/osv.py b/bin/osv/osv.py index 6f795fe3ee9..5b2e4ee8da8 100644 --- a/bin/osv/osv.py +++ b/bin/osv/osv.py @@ -171,9 +171,12 @@ class osv_pool(netsvc.Service): res.append(klass.createInstance(self, module, cr)) return res +class osv_base(object): + def __init__(self, pool, cr): + pool.add(self._name, self) + self.pool = pool + super(osv_base, self).__init__(cr) -class osv_memory(orm.orm_memory): - #__metaclass__ = inheritor def __new__(cls): module = str(cls)[6:] module = module[:len(module)-1] @@ -186,6 +189,7 @@ class osv_memory(orm.orm_memory): module_list.append(cls._module) return None +class osv_memory(osv_base, orm.orm_memory): # # Goal: try to apply inheritancy at the instanciation level and # put objects in the pool var @@ -213,27 +217,7 @@ class osv_memory(orm.orm_memory): return obj createInstance = classmethod(createInstance) - def __init__(self, pool, cr): - pool.add(self._name, self) - self.pool = pool - orm.orm_memory.__init__(self, cr) - - - -class osv(orm.orm): - #__metaclass__ = inheritor - def __new__(cls): - module = str(cls)[6:] - module = module[:len(module)-1] - module = module.split('.')[0][2:] - if not hasattr(cls, '_module'): - cls._module = module - module_class_list.setdefault(cls._module, []).append(cls) - class_pool[cls._name] = cls - if module not in module_list: - module_list.append(cls._module) - return None - +class osv(osv_base, orm.orm): # # Goal: try to apply inheritancy at the instanciation level and # put objects in the pool var @@ -270,10 +254,5 @@ class osv(orm.orm): return obj createInstance = classmethod(createInstance) - def __init__(self, pool, cr): - pool.add(self._name, self) - self.pool = pool - orm.orm.__init__(self, cr) - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: