Ravi Gohil (OpenERP) has proposed merging
lp:~openerp-dev/openobject-client/6.1-opw-578157-rgo into
lp:openobject-client/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client/6.1-opw-578157-rgo/+merge/122828
Hello,
When `view_id` not specified for `ir.actions.act_window`, the view with the
lowest sequence number is shown for the respective model whereas the view
should be taken from the `view_ids` specified in action of the first type
specified in `view_mode`.
To reproduce the issue(For Purchase Dashboard),
1) From menu `Setting/Customization/Actions/Windows Action`, search for
`Monthly Purchase by Category` and remove the View Ref`(view_id),
2) go to `Setting/Customization/User Interface/Views` and search for graph
views for object `purchase.report` and set the sequence to `15` of view named
`product.month.graph`,
3) Open Purchase Dashboard,
You will have `product.month.graph` view for `Monthly Purchase by Category`
action instead of `purchase.order.monthly.categ.graph`(which is in `view_ids`
of action).
This fix fixes this issue, kindly review the fix.
Note: Currently, web loads first view from `view_ids` irrespective of
`view_mode`.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client/6.1-opw-578157-rgo/+merge/122828
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client/6.1-opw-578157-rgo.
=== modified file 'bin/widget/view/form_gtk/action.py'
--- bin/widget/view/form_gtk/action.py 2011-10-11 06:15:57 +0000
+++ bin/widget/view/form_gtk/action.py 2012-09-05 09:49:20 +0000
@@ -64,6 +64,8 @@
self.action_view_ids = map(lambda y:y[0], filter(lambda x:x[1] == 'tree',self.action['views']))
if self.action['view_type']=='form':
mode = (self.action['view_mode'] or 'form,tree').split(',')
+ if not view_id:
+ view_id = map(lambda y:y[0], filter(lambda x:x[1] == mode[0],self.action['views']))
self.screen = Screen(self.action['res_model'], view_type=mode, context=self.context, view_ids = view_id, domain=self.domain)
self.ui = openerp_gtk_builder('openerp.ui', ['widget_paned'])
self.ui.connect_signals({
_______________________________________________
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