Yogesh(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/training_subscription_wizard_imp_ysa into 
lp:~openobject-training/openobject-addons/training.

Requested reviews:
  Bhumika (OpenERP) (sbh-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/training_subscription_wizard_imp_ysa/+merge/63675

[IMP] training:- if mass subscription wizard open from menu then return tree 
view of training.subscription object.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/training_subscription_wizard_imp_ysa/+merge/63675
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/training_subscription_wizard_imp_ysa.
=== modified file 'training/training.py'
--- training/training.py	2011-05-10 08:33:45 +0000
+++ training/training.py	2011-06-07 10:22:28 +0000
@@ -1994,8 +1994,17 @@
                 subscription_line_proxy._create_from_wizard(cr, uid, this, subscription_id, job, subscription_mass_line, context=context)
 
             subscription_ids.append(subscription_id)
-
-        return {'type' : 'ir.actions.act_window_close'}
+        if context.get('menu',False):
+            return {
+                'domain' : "[('id', 'in', [%s])]" % ','.join(map(str,subscription_ids)),
+                'name' : 'Subscriptions',
+                'view_type' : 'form',
+                'view_mode' : 'tree,form',
+                'res_model' : 'training.subscription',
+                'type' : 'ir.actions.act_window',
+            }
+        else:
+            return  {'type' : 'ir.actions.act_window_close'}
 
     _columns = {
         'partner_id' : fields.many2one('res.partner', 'Partner'),

=== modified file 'training/training_view.xml'
--- training/training_view.xml	2011-05-11 08:33:36 +0000
+++ training/training_view.xml	2011-06-07 10:22:28 +0000
@@ -2411,7 +2411,7 @@
             <field name="view_mode">form</field>
             <field name="view_id" ref="training_subscription_mass_wizard" />
             <field name="target">new</field>
-            <field name="context">{'record_id' : False}</field>
+            <field name="context">{'record_id' : False, 'menu':True}</field>
         </record>
 
         <menuitem id="training_subscription_mass_mi"

_______________________________________________
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