Thibault Delavallée (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-fix-mail-mail-rules-tde 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-fix-mail-mail-rules-tde/+merge/125133

OpenChatter "Rule Yur Daddy" Branch

Fixes some of access rights issues. This addons branch features :
- FieldMany2One: render_value: fixed a call to name_get of foreign model. It is 
now a read on the many2one field, giving back the name_get, using access rights 
of the base model, not the foreign model. The context used is the one of the 
relational field, to have keys like show_address.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-fix-mail-mail-rules-tde/+merge/125133
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-fix-mail-mail-rules-tde.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2012-09-18 14:59:25 +0000
+++ addons/web/static/src/js/view_form.js	2012-09-19 08:50:34 +0000
@@ -2964,9 +2964,8 @@
             return;
         }
         if (! no_recurse) {
-            var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context());
-            dataset.name_get([self.get("value")], function(data) {
-                self.display_value["" + self.get("value")] = data[0][1];
+            this.view.dataset.call('read', [this.view.datarecord.id, ['partner_id'], this.build_context()], function(data) {
+                self.display_value["" + self.get("value")] = data['partner_id'][1];
                 self.render_value(true);
             });
         }

_______________________________________________
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