From f87849b8a8a871e5cc3c506836b0b895f20ebc70 Mon Sep 17 00:00:00 2001 From: pinky <> Date: Fri, 15 Dec 2006 07:15:10 +0000 Subject: [PATCH] Dashboard for project users and managers Statistics and planning module on analytic account Statistics on timesheets bzr revid: pinky-aba8a5cb10e2b551eaed0931d3508999004f7e0f --- addons/board/__init__.py | 29 +++ addons/board/__terp__.py | 11 ++ addons/board/board.py | 72 ++++++++ addons/board/board_view.xml | 40 ++++ addons/board_project/__init__.py | 28 +++ addons/board_project/__terp__.py | 11 ++ .../board_project_manager_view.xml | 127 +++++++++++++ addons/board_project/board_project_view.xml | 127 +++++++++++++ addons/board_sale/__terp__.py | 6 +- addons/board_sale/board_sale_view.xml | 7 +- addons/report_analytic_line/__init__.py | 1 + addons/report_analytic_line/__terp__.py | 4 +- .../report_analytic_planning.py | 173 ++++++++++++++++++ .../report_analytic_planning_view.xml | 153 ++++++++++++++++ addons/report_timesheet/report_timesheet.py | 30 ++- .../report_timesheet_view.xml | 4 +- 16 files changed, 813 insertions(+), 10 deletions(-) create mode 100644 addons/board/__init__.py create mode 100644 addons/board/__terp__.py create mode 100644 addons/board/board.py create mode 100644 addons/board/board_view.xml create mode 100644 addons/board_project/__init__.py create mode 100644 addons/board_project/__terp__.py create mode 100644 addons/board_project/board_project_manager_view.xml create mode 100644 addons/board_project/board_project_view.xml create mode 100644 addons/report_analytic_line/report_analytic_planning.py create mode 100644 addons/report_analytic_line/report_analytic_planning_view.xml diff --git a/addons/board/__init__.py b/addons/board/__init__.py new file mode 100644 index 00000000000..ec2e9105012 --- /dev/null +++ b/addons/board/__init__.py @@ -0,0 +1,29 @@ +############################################################################## +# +# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved. +# Fabien Pinckaers +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import board diff --git a/addons/board/__terp__.py b/addons/board/__terp__.py new file mode 100644 index 00000000000..527fc338e26 --- /dev/null +++ b/addons/board/__terp__.py @@ -0,0 +1,11 @@ +{ + "name":"Dashboard main module", + "version":"1.0", + "author":"Tiny", + "category":"Board", + "depends":["base"], + "demo_xml":[], + "update_xml":["board_view.xml"], + "active":False, + "installable":True, +} diff --git a/addons/board/board.py b/addons/board/board.py new file mode 100644 index 00000000000..038b5f3e05c --- /dev/null +++ b/addons/board/board.py @@ -0,0 +1,72 @@ +############################################################################## +# +# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. +# Fabien Pinckaers +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import time +from osv import fields,osv + +class board(osv.osv): + _name = 'board.board' + def create(self, cr, user, vals, context={}): + return False + def copy(self, cr, uid, id, default=None, context={}): + return False + _columns = { + 'name': fields.char('Board', size=64), + } +board() + + +class board_note_type(osv.osv): + _name = 'board.note.type' + _columns = { + 'name': fields.char('Note Type', size=64, required=True), + } +board_note_type() + +def _type_get(self, cr, uid, context={}): + obj = self.pool.get('board.note.type') + ids = obj.search(cr, uid, []) + res = obj.read(cr, uid, ids, ['name'], context) + res = [(r['name'], r['name']) for r in res] + return res + +class board_note(osv.osv): + _name = 'board.note' + _columns = { + 'name': fields.char('Subject', size=128, required=True), + 'note': fields.text('Note'), + 'user_id': fields.many2one('res.users', 'Author', size=64), + 'date': fields.date('Date', size=64, required=True), + 'type': fields.char('Note type', size=64), + 'type': fields.selection(_type_get, 'Note type', size=64), + } + _defaults = { + 'user_id': lambda object,cr,uid,context: uid, + 'date': lambda object,cr,uid,context: time.strftime('%Y-%m-%d'), + } +board_note() diff --git a/addons/board/board_view.xml b/addons/board/board_view.xml new file mode 100644 index 00000000000..6afad57ceca --- /dev/null +++ b/addons/board/board_view.xml @@ -0,0 +1,40 @@ + + + + + board.note.tree + board.note + tree + + + + + + + + board.note.form + board.note + form + +
+ + + + + + + +
+ + Publish a note + board.note + form + form,tree + + +
+
diff --git a/addons/board_project/__init__.py b/addons/board_project/__init__.py new file mode 100644 index 00000000000..60d9e61f8bf --- /dev/null +++ b/addons/board_project/__init__.py @@ -0,0 +1,28 @@ +############################################################################## +# +# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved. +# Fabien Pinckaers +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + diff --git a/addons/board_project/__terp__.py b/addons/board_project/__terp__.py new file mode 100644 index 00000000000..7b8394138bc --- /dev/null +++ b/addons/board_project/__terp__.py @@ -0,0 +1,11 @@ +{ + "name":"Board for project users", + "version":"1.0", + "author":"Tiny", + "category":"Board", + "depends":["project","report_timesheet","board"], + "demo_xml":[], + "update_xml":["board_project_view.xml"], + "active":False, + "installable":True, +} diff --git a/addons/board_project/board_project_manager_view.xml b/addons/board_project/board_project_manager_view.xml new file mode 100644 index 00000000000..ba34b0d9961 --- /dev/null +++ b/addons/board_project/board_project_manager_view.xml @@ -0,0 +1,127 @@ + + + + + + Project managers + + + + project.task.tree + project.task + tree + + + + + + + + + + + + + + My open tasks + project.task + form + tree,graph + [('user_id','=',uid),('state','=','open')] + + + + My task's deadlines + project.task + form + tree,graph + [('user_id','=',uid),('state','=','open'),('date_deadline','<>',False)] + + + + + Public notes + board.note + form + tree + [('type','=','Project')] + + + + board.project.form + board.board + form + +
+ + + + + + + + + + + + + + + +