From dbb2642f4495e85a71e8fa61a4de368f00d6e541 Mon Sep 17 00:00:00 2001 From: Rohan Patel Date: Tue, 1 Mar 2016 18:36:29 +0530 Subject: [PATCH] [REM] board: Remove the board.create model It is no longer used in master. --- addons/board/__openerp__.py | 1 - addons/board/board.py | 78 ------------------- addons/board/board_mydashboard_view.xml | 2 +- addons/board/board_view.xml | 35 --------- .../google_spreadsheet_view.xml | 2 +- 5 files changed, 2 insertions(+), 116 deletions(-) delete mode 100644 addons/board/board_view.xml diff --git a/addons/board/__openerp__.py b/addons/board/__openerp__.py index cb29e11e937..8325b9dbe98 100644 --- a/addons/board/__openerp__.py +++ b/addons/board/__openerp__.py @@ -15,7 +15,6 @@ Allows users to create custom dashboard. 'depends': ['base', 'web'], 'data': [ 'security/ir.model.access.csv', - 'board_view.xml', 'board_mydashboard_view.xml', 'views/board.xml', ], diff --git a/addons/board/board.py b/addons/board/board.py index b484e7546ad..b8ee525d675 100644 --- a/addons/board/board.py +++ b/addons/board/board.py @@ -77,81 +77,3 @@ class board_board(osv.osv): archnode = etree.fromstring(encode(arch)) return etree.tostring(remove_unauthorized_children(archnode), pretty_print=True) - - -class board_create(osv.osv_memory): - - def board_create(self, cr, uid, ids, context=None): - assert len(ids) == 1 - this = self.browse(cr, uid, ids[0], context=context) - - view_arch = dedent(""" -
- - - - -
- """.strip() % (this.name,)) - - view_id = self.pool.get('ir.ui.view').create(cr, uid, { - 'name': this.name, - 'model': 'board.board', - 'priority': 16, - 'type': 'form', - 'arch': view_arch, - }, context=context) - - action_id = self.pool.get('ir.actions.act_window').create(cr, uid, { - 'name': this.name, - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'board.board', - 'usage': 'menu', - 'view_id': view_id, - 'help': dedent('''
-

- This dashboard is empty. -

- To add the 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. -

-
- ''') - }, context=context) - - menu_id = self.pool.get('ir.ui.menu').create(cr, SUPERUSER_ID, { - 'name': this.name, - 'parent_id': this.menu_parent_id.id, - 'action': 'ir.actions.act_window,%s' % (action_id,) - }, context=context) - - self.pool.get('board.board')._clear_list_cache() - - return { - 'type': 'ir.actions.client', - 'tag': 'reload', - 'params': { - 'menu_id': menu_id - }, - } - - def _default_menu_parent_id(self, cr, uid, context=None): - _, menu_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'menu_reporting_dashboard') - return menu_id - - _name = "board.create" - _description = "Board Creation" - - _columns = { - 'name': fields.char('Board Name', required=True), - 'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True), - } - - _defaults = { - 'menu_parent_id': _default_menu_parent_id, - } diff --git a/addons/board/board_mydashboard_view.xml b/addons/board/board_mydashboard_view.xml index e5da7e169e9..687e845c864 100644 --- a/addons/board/board_mydashboard_view.xml +++ b/addons/board/board_mydashboard_view.xml @@ -42,7 +42,7 @@ diff --git a/addons/board/board_view.xml b/addons/board/board_view.xml deleted file mode 100644 index 684515d2e96..00000000000 --- a/addons/board/board_view.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - board.create.form - board.create - -
- - - - -
-
-
-
-
- - - Create Board - board.create - form - form - - new - - - -
-
diff --git a/addons/google_spreadsheet/google_spreadsheet_view.xml b/addons/google_spreadsheet/google_spreadsheet_view.xml index 60284478c5e..081941a3639 100644 --- a/addons/google_spreadsheet/google_spreadsheet_view.xml +++ b/addons/google_spreadsheet/google_spreadsheet_view.xml @@ -60,6 +60,6 @@ - + \ No newline at end of file