Naresh(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-client/trunk-bug-901601-nch into 
lp:openobject-client.

Requested reviews:
  Aline (OpenERP) (apr-tinyerp)
  Antony Lesuisse (OpenERP) (al-openerp)
  OpenERP R&D Team (openerp-dev)
Related bugs:
  Bug #901601 in OpenERP GTK Client: "Kanban/Gantt view should be ignored and 
should have icon same as list view in GTK"
  https://bugs.launchpad.net/openobject-client/+bug/901601

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client/trunk-bug-901601-nch/+merge/85111

Please see for server 
changes::https://code.launchpad.net/~openerp-dev/openobject-server/trunk-bug-901601-nch
-- 
https://code.launchpad.net/~openerp-dev/openobject-client/trunk-bug-901601-nch/+merge/85111
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-client/trunk-bug-901601-nch into 
lp:openobject-client.
=== modified file 'bin/modules/action/main.py'
--- bin/modules/action/main.py	2011-11-15 14:38:45 +0000
+++ bin/modules/action/main.py	2011-12-09 11:30:00 +0000
@@ -105,33 +105,32 @@
             if datas['limit'] is None or datas['limit'] == 0:
                 datas['limit'] = 100
 
-            view_ids=False
-            if action.get('views', []):
-                if isinstance(action['views'],list):
-                    view_ids=[x[0] for x in action['views']]
-                    datas['view_mode']=",".join([x[1] for x in action['views']])
+            view_ids = False
+            if action.get('views'):
+                if isinstance(action['views'], list):
+                    view_ids = [x[0] for x in action['views'] if x[1] not in ('kanban','gantt')]
+                    datas['view_mode'] =",".join([x[1] for x in action['views'] if x[1] not in ('kanban','gantt')] )
                 else:
-                    if action.get('view_id', False):
-                        view_ids=[action['view_id'][0]]
-            elif action.get('view_id', False):
-                view_ids=[action['view_id'][0]]
-
-            if not action.get('domain', False):
-                action['domain']='[]'
+                    if action.get('view_id'):
+                        view_ids = [action['view_id'][0]]
+            elif action.get('view_id'):
+                view_ids = [ action['view_id'][0] ]
+            if not action.get('domain'):
+                action['domain'] = '[]'
             domain_ctx = context.copy()
             domain_ctx['time'] = time
             domain_ctx['datetime'] = datetime
             domain = tools.expr_eval(action['domain'], domain_ctx)
             help = {}
-            if action.get('display_menu_tip', False):
+            if action.get('display_menu_tip'):
                 msg = action.get('help', False)
                 title = action.get('name', False)
                 if msg and len(msg):
                     help['msg'] =  msg
                     help['title'] = title or ''
-            if datas.get('domain', False):
+            if datas.get('domain'):
                 domain.append(datas['domain'])
-            if action.get('target', False)=='new':
+            if action.get('target') == 'new':
                 dia = dialog(datas['res_model'], id=datas.get('res_id',None),
                              window=datas.get('window',None), domain=domain,
                              context=context, view_ids=view_ids,target=True,

=== modified file 'bin/modules/gui/main.py'
--- bin/modules/gui/main.py	2011-12-08 07:06:03 +0000
+++ bin/modules/gui/main.py	2011-12-09 11:30:00 +0000
@@ -765,7 +765,7 @@
 
         self.buttons = {}
         for button in ('but_new', 'but_save', 'but_remove', 'but_search', 'but_previous', 'but_next', 'but_action', 'but_open', 'but_print', 'but_close', 'but_reload', 'but_switch','but_attach',
-                       'radio_tree','radio_form','radio_graph','radio_calendar','radio_diagram', 'radio_gantt','radio_kanban'):
+                       'radio_tree','radio_form','radio_graph','radio_calendar','radio_diagram'):
             callbacks_dict['on_'+button+'_clicked'] = gtk_signal_decorator(self._sig_child_call, button)
             self.buttons[button] = self.ui.get_object(button)
 

=== modified file 'bin/openerp.ui'
--- bin/openerp.ui	2011-12-08 07:06:03 +0000
+++ bin/openerp.ui	2011-12-09 11:30:00 +0000
@@ -1238,32 +1238,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkRadioToolButton" id="radio_gantt">
-                <property name="label" translatable="yes">Gantt</property>
-                <property name="use_underline">True</property>
-                <property name="stock_id">gtk-justify-right</property>
-                <property name="group">radio_tree</property>
-                <signal name="clicked" handler="on_radio_gantt_clicked"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-             <child>
-              <object class="GtkRadioToolButton" id="radio_kanban">
-                <property name="label" translatable="yes">Kanban</property>
-                <property name="use_underline">True</property>
-                <property name="stock_id">gtk-justify-right</property>
-                <property name="group">radio_tree</property>
-                <signal name="clicked" handler="on_radio_kanban_clicked"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkSeparatorToolItem" id="separatortoolitem9">
                 <property name="visible">True</property>
               </object>

=== removed file 'bin/widget/view/gantt.py'
--- bin/widget/view/gantt.py	2010-12-03 11:55:42 +0000
+++ bin/widget/view/gantt.py	1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 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 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 <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-from interface import parser_view
-
-class ViewGantt(parser_view):
-
-    def __init__(self, window, screen, widget, children=None, buttons=None,
-            toolbar=None, submenu=None, help={}):
-        super(ViewGantt, self).__init__(window, screen, widget, children, buttons, toolbar, submenu)
-        self.view_type = 'gantt'
-        self.view = widget
-        self.model_add_new = False
-        self.widget = widget.widget
-        self.view.screen = screen
-
-    def cancel(self):
-        pass
-
-    def __str__(self):
-        return 'ViewGantt (%s)' % self.screen.resource
-
-    def __getitem__(self, name):
-        return None
-
-    
-    def set_value(self):
-        pass
-
-    def reset(self):
-        pass
-
-    def reset(self):
-        pass
-
-    def display(self):
-        self.view.display(self.screen.models)
-        return None
-
-    def signal_record_changed(self, *args):
-        pass
-
-    def sel_ids_get(self):
-        return []
-
-    def on_change(self, callback):
-        pass
-
-    def unset_editable(self):
-        pass
-
-    def set_cursor(self, new=False):
-        pass
-    
-    def destroy(self):
-        self.widget.destroy()
-        del self.screen
-        del self.widget
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-

=== removed directory 'bin/widget/view/gantt_gtk'
=== removed file 'bin/widget/view/gantt_gtk/__init__.py'
--- bin/widget/view/gantt_gtk/__init__.py	2010-01-12 09:24:17 +0000
+++ bin/widget/view/gantt_gtk/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#    
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 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 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 <http://www.gnu.org/licenses/>.     
-#
-##############################################################################
-
-from parser_dummy import *
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-

=== removed file 'bin/widget/view/gantt_gtk/parser_dummy.py'
--- bin/widget/view/gantt_gtk/parser_dummy.py	2010-01-12 09:24:17 +0000
+++ bin/widget/view/gantt_gtk/parser_dummy.py	1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#    
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 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 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 <http://www.gnu.org/licenses/>.     
-#
-##############################################################################
-
-from widget.view import interface
-import tools
-import gtk
-
-
-class EmptyGantt(object):
-    def __init__(self, model):
-        self.widget = gtk.Label(
-            _('Gantt view not yet implemented !')+'\n\n'+
-            _('The gantt view is not available in this GTK Client, you should use the web interface or switch to the calendar view.'))
-
-    def display(self, models):
-        pass
-
-
-class parser_gantt(interface.parser_interface):
-    def parse(self, model, root_node, fields):
-        attrs = tools.node_attributes(root_node)
-        self.title = attrs.get('string', 'Unknown')
-
-        on_write = ''
-
-        view = EmptyGantt(model)
-
-        return view, {}, [], on_write
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-

=== removed file 'bin/widget/view/kanban.py'
--- bin/widget/view/kanban.py	2011-12-08 07:06:03 +0000
+++ bin/widget/view/kanban.py	1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 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 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 <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-from interface import parser_view
-
-class Viewkanban(parser_view):
-
-    def __init__(self, window, screen, widget, children=None, buttons=None,
-            toolbar=None, submenu=None, help={}):
-        super(Viewkanban, self).__init__(window, screen, widget, children, buttons, toolbar, submenu)
-        self.view_type = 'kanban'
-        self.view = widget
-        self.model_add_new = False
-        self.widget = widget.widget
-        self.view.screen = screen
-
-    def cancel(self):
-        pass
-
-    def __str__(self):
-        return 'Viewkanban (%s)' % self.screen.resource
-
-    def __getitem__(self, name):
-        return None
-
-    
-    def set_value(self):
-        pass
-
-    def reset(self):
-        pass
-
-    def reset(self):
-        pass
-
-    def display(self):
-        self.view.display(self.screen.models)
-        return None
-
-    def signal_record_changed(self, *args):
-        pass
-
-    def sel_ids_get(self):
-        return []
-
-    def on_change(self, callback):
-        pass
-
-    def unset_editable(self):
-        pass
-
-    def set_cursor(self, new=False):
-        pass
-    
-    def destroy(self):
-        self.widget.destroy()
-        del self.screen
-        del self.widget
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-

=== removed directory 'bin/widget/view/kanban_gtk'
=== removed file 'bin/widget/view/kanban_gtk/__init__.py'
--- bin/widget/view/kanban_gtk/__init__.py	2011-12-08 07:06:03 +0000
+++ bin/widget/view/kanban_gtk/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#    
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 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 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 <http://www.gnu.org/licenses/>.     
-#
-##############################################################################
-
-from parser_dummy import *
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-

=== removed file 'bin/widget/view/kanban_gtk/parser_dummy.py'
--- bin/widget/view/kanban_gtk/parser_dummy.py	2011-12-08 07:06:03 +0000
+++ bin/widget/view/kanban_gtk/parser_dummy.py	1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#    
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 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 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 <http://www.gnu.org/licenses/>.     
-#
-##############################################################################
-
-from widget.view import interface
-import tools
-import gtk
-
-
-class EmptyKanban(object):
-    def __init__(self, model):
-        self.widget = gtk.Label(
-            _('Kanban view not yet implemented !')+'\n\n'+
-            _('The Kanban view is not available in this GTK Client, you should use the web interface.'))
-
-    def display(self, models):
-        pass
-
-
-class parser_kanban(interface.parser_interface):
-    def parse(self, model, root_node, fields):
-        attrs = tools.node_attributes(root_node)
-        self.title = attrs.get('string', 'Unknown')
-
-        on_write = ''
-
-        view = EmptyKanban(model)
-
-        return view, {}, [], on_write
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-

=== modified file 'bin/widget/view/widget_parse.py'
--- bin/widget/view/widget_parse.py	2011-12-08 07:06:03 +0000
+++ bin/widget/view/widget_parse.py	2011-12-09 11:30:00 +0000
@@ -26,27 +26,20 @@
 import tree_gtk
 import graph_gtk
 import calendar_gtk
-import gantt_gtk
 import diagram_gtk
-import kanban_gtk
 
 from form import ViewForm
 from list import ViewList
 from graph import ViewGraph
 from calendar import ViewCalendar
 from diagram import ViewDiagram
-from gantt import ViewGantt
-from kanban import Viewkanban
-
 
 parsers = {
     'form' : (form_gtk.parser_form, ViewForm),
     'tree' : (tree_gtk.parser_tree, ViewList),
     'graph': (graph_gtk.parser_graph, ViewGraph),
     'calendar' : (calendar_gtk.parser_calendar, ViewCalendar),
-    'gantt' : (gantt_gtk.parser_gantt, ViewGantt),
     'diagram' : (diagram_gtk.parser_diagram, ViewDiagram),
-    'kanban' : (kanban_gtk.parser_kanban, Viewkanban),
 }
 
 class widget_parse(interface.parser_interface):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to