Merge lp:~openerp-commiter/openobject-client/many2many_dbl_click_open_new_tab-5.0 into lp:openobject-client/5.0

Proposed by Nicolas DS
Status: Rejected
Rejected by: Naresh(OpenERP)
Proposed branch: lp:~openerp-commiter/openobject-client/many2many_dbl_click_open_new_tab-5.0
Merge into: lp:openobject-client/5.0
Diff against target: 33 lines (+9/-1)
1 file modified
bin/widget/view/form_gtk/many2many.py (+9/-1)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-client/many2many_dbl_click_open_new_tab-5.0
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Disapprove
Review via email: mp+19972@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Nicolas DS (zyphos) wrote :

Double click on a many2many widget open a new tab with the clicked resource in a form. Like Web client does.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Nicolas DS,

Thank you for your Input.

I had reviewed and made a bit modification like instead of opening in a new tab allow the user to open a specific record (with a dialog as like as the one2many field) for modification.

and has been merge in trunk client with revision info as 1172 <email address hidden>

Thanks

review: Approve
Revision history for this message
Nicolas DS (zyphos) wrote :

Hi,

I was hesitating of opening it in new window, but the tab pros is that you have a tree view too.

So in your merge I see that you set the domain, but it is not needed if you open it in new window, because only one record (resource) is shown.

Another thing,
the merge proposal for the "trunk" version is here:
https://code.launchpad.net/~openerp-commiter/openobject-client/many2many_dbl_click_open_new_tab-trunk/+merge/19971

this is the merge proposal for the stable 5.0 version. Could you review merge in 5.0 too ?

thank you for the merge.

Regards,
Nicolas DS

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Nicolas DS ,

Ok I have changed the domain instead of Ids the domain should be from the default domain passed either from xml or .py.

and regarding stable merge we cannot merge this right now in stable branch as this is new improvement and will be included in the next stable version.

Thanks,

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hi,
It will be include in next release for stable version. We included it in Trunk verison.

thanks

review: Disapprove

Unmerged revisions

1049. By Nicolas DS

[FIX] Many2many widget action open a new tab with the selected resource like Web Client does

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/widget/view/form_gtk/many2many.py'
--- bin/widget/view/form_gtk/many2many.py 2009-07-23 11:37:09 +0000
+++ bin/widget/view/form_gtk/many2many.py 2010-02-23 14:13:15 +0000
@@ -34,6 +34,7 @@
34import interface34import interface
3535
36import rpc36import rpc
37import service
3738
38from modules.gui.window.win_search import win_search39from modules.gui.window.win_search import win_search
3940
@@ -73,7 +74,8 @@
73 scroll.set_shadow_type(gtk.SHADOW_NONE)74 scroll.set_shadow_type(gtk.SHADOW_NONE)
7475
75 self.screen = Screen(attrs['relation'], view_type=['tree'],76 self.screen = Screen(attrs['relation'], view_type=['tree'],
76 views_preload=attrs.get('views', {}))77 views_preload=attrs.get('views', {}),
78 row_activate=self.row_activate)
77 scroll.add_with_viewport(self.screen.widget)79 scroll.add_with_viewport(self.screen.widget)
78 self.widget.pack_start(scroll, expand=True, fill=True)80 self.widget.pack_start(scroll, expand=True, fill=True)
7981
@@ -162,6 +164,12 @@
162 def set_value(self, model, model_field):164 def set_value(self, model, model_field):
163 model_field.set_client(model, [x.id for x in self.screen.models.models])165 model_field.set_client(model, [x.id for x in self.screen.models.models])
164166
167 def row_activate(self, screen):
168 """ Open new tab with the resource in it """
169 gui_window = service.LocalService('gui.window')
170 domain = [('id','in', screen.ids_get())]
171 gui_window.create(None, screen.name, screen.id_get(), domain, u'form',
172 screen.window, screen.context, u'form,tree')
165173
166# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:174# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
167175