From 61dd90ab325c58dc312bd660d21617e86ba90fbd Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sun, 5 Aug 2012 09:20:27 +0200 Subject: [PATCH] [IMP] removed unused object: board.line bzr revid: fp@openerp.com-20120805072027-o6a398q8y416w82b --- addons/board/board.py | 72 ++--------------------- addons/board/board_mydashboard_view.xml | 6 +- addons/board/board_view.xml | 35 ++++------- addons/board/security/ir.model.access.csv | 2 - addons/board/wizard/board_menu_create.py | 18 ++++-- 5 files changed, 31 insertions(+), 102 deletions(-) diff --git a/addons/board/board.py b/addons/board/board.py index 6c28aa33c40..985bc3cd09a 100644 --- a/addons/board/board.py +++ b/addons/board/board.py @@ -38,51 +38,15 @@ class board_board(osv.osv): @param ids: List of Board's IDs @return: arch of xml view. """ - board = self.pool.get('board.board').browse(cr, uid, ids, context=context) - left = [] - right = [] - #start Loop - for line in board.line_ids: - linestr = ' -
+ - - %s - - - %s - + + -
""" % ('\n'.join(left), '\n'.join(right)) - + """ return arch - def write(self, cr, uid, ids, vals, context=None): - - """ - Writes values in one or several fields. - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of Board's IDs - @param vals: dictionary with values to update. - dictionary must be with the form: {‘name_of_the_field’: value, ...}. - @return: True - """ - result = super(board_board, self).write(cr, uid, ids, vals, context=context) - - board = self.pool.get('board.board').browse(cr, uid, ids[0], context=context) - view = self.create_view(cr, uid, ids[0], context=context) - id = board.view_id.id - cr.execute("update ir_ui_view set arch=%s where id=%s", (view, id)) - return result - def create(self, cr, user, vals, context=None): """ create new record. @@ -106,7 +70,6 @@ class board_board(osv.osv): }) super(board_board, self).write(cr, user, [id], {'view_id': view_id}, context) - return id def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None,\ @@ -131,7 +94,6 @@ class board_board(osv.osv): res['toolbar'] = {'print': [], 'action': [], 'relate': []} return res - def _arch_preprocessing(self, cr, user, arch, context=None): from lxml import etree def remove_unauthorized_children(node): @@ -150,13 +112,9 @@ class board_board(osv.osv): archnode = etree.fromstring(encode(arch)) return etree.tostring(remove_unauthorized_children(archnode),pretty_print=True) - - - _columns = { 'name': fields.char('Dashboard', size=64, required=True), 'view_id': fields.many2one('ir.ui.view', 'Board View'), - 'line_ids': fields.one2many('board.board.line', 'board_id', 'Action Views') } # the following lines added to let the button on dashboard work. @@ -164,26 +122,4 @@ class board_board(osv.osv): 'name':lambda *args: 'Dashboard' } -class board_line(osv.osv): - """ - Board Line - """ - _name = 'board.board.line' - _description = "Board Line" - _order = 'position,sequence' - _columns = { - 'name': fields.char('Title', size=64, required=True), - 'sequence': fields.integer('Sequence', help="Gives the sequence order\ - when displaying a list of board lines.", select=True), - 'height': fields.integer('Height'), - 'width': fields.integer('Width'), - 'board_id': fields.many2one('board.board', 'Dashboard', required=True, ondelete='cascade'), - 'action_id': fields.many2one('ir.actions.act_window', 'Action', required=True), - 'position': fields.selection([('left','Left'), - ('right','Right')], 'Position', required=True, select=True) - } - _defaults = { - 'position': lambda *args: 'left' - } - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board/board_mydashboard_view.xml b/addons/board/board_mydashboard_view.xml index f70d61c7a57..9d7e27d57d8 100644 --- a/addons/board/board_mydashboard_view.xml +++ b/addons/board/board_mydashboard_view.xml @@ -29,9 +29,9 @@

Your personal dashboard is empty.

- To insert any report into this dashboard, click 'Add to - Dashboard' in the extended search options of any list - or graph. + To add your first report into this dashboard, go to any + menu, switch to list or graph view, and click 'Add to + Dashboard' in the extended search options.

You can filter and group data before inserting into the dashboard using the search options. diff --git a/addons/board/board_view.xml b/addons/board/board_view.xml index bf8da9d0b5a..4a72b2f714a 100644 --- a/addons/board/board_view.xml +++ b/addons/board/board_view.xml @@ -9,7 +9,6 @@ - @@ -33,28 +32,16 @@ form -

- - - -