Atul Patel(OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-hr-monthlyreport-issue-fix-shp into 
lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-hr-monthlyreport-issue-fix-shp/+merge/129357

Hello,

Get default context value for one2many view.

Thanks

-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-hr-monthlyreport-issue-fix-shp/+merge/129357
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-hr-monthlyreport-issue-fix-shp.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2012-10-11 20:03:46 +0000
+++ addons/web/static/src/js/view_form.js	2012-10-12 07:03:30 +0000
@@ -3604,7 +3604,12 @@
     get_context: function() {
         this.context = this.o2m.build_context([this.o2m.name]);
         return this.context;
-    }
+    },
+    default_get: function(fields, options) {
+        options = options || {};
+        _.extend(options, {'context':this.get_context()});
+        return this._super(fields, options).then(this.on_default_get);
+    },
 });
 
 instance.web.form.One2ManyListView = instance.web.ListView.extend({

_______________________________________________
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