ooor 1.6.5 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +0,0 @@
1
- # OOOR: Open Object On Rails
2
- # Copyright (C) 2009-2011 Akretion LTDA (<http://www.akretion.com>).
3
- # Author: Raphaël Valyi
4
- #
5
- # This program is free software: you can redistribute it and/or modify
6
- # it under the terms of the GNU Affero General Public License as
7
- # published by the Free Software Foundation, either version 3 of the
8
- # License, or (at your option) any later version.
9
- #
10
- # This program is distributed in the hope that it will be useful,
11
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- # GNU Affero General Public License for more details.
14
- #
15
- # You should have received a copy of the GNU Affero General Public License
16
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
-
18
- require 'app/ui/action_window'
19
- module Ooor
20
- module MenuModule
21
-
22
- attr_accessor :menu_action
23
-
24
- def menu_action
25
- #TODO put in cache eventually:
26
- action_values = self.class.ooor.const_get('ir.values').rpc_execute('get', 'action', 'tree_but_open', [['ir.ui.menu', id]], false, self.class.ooor.global_context)[0][2]#get already exists
27
- @menu_action = self.class.ooor.const_get('ir.actions.act_window').new(action_values, []) #TODO deal with action reference instead
28
- end
29
-
30
- def open(mode='tree', ids=nil)
31
- menu_action.open(mode, ids)
32
- end
33
- end
34
- end