Merge lp:~openerp-dev/openerp-web/6.1-opw-581137-acl into lp:openerp-web/6.1

Proposed by Anaël Closson (openerp)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/6.1-opw-581137-acl
Merge into: lp:openerp-web/6.1
Diff against target: 28 lines (+2/-2)
1 file modified
addons/web/static/src/js/view_form.js (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/6.1-opw-581137-acl
Reviewer Review Type Date Requested Status
Xavier (Open ERP) (community) Needs Fixing
Review via email: mp+146602@code.launchpad.net

Description of the change

This bug only affects IE 8

Steps to reproduce :

* Create a new a sale order
* Click on the customer m2o box to open the popup menu

On IE 8 : an exception is raised

On other browsers : the popup menu is opened

That's the same behavior for all m2o boxes.

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Since it is not returned, then $.when().then() call is useless here: it creates an immediately resolved (valueless) deferred and instantly calls the provided callback.

review: Needs Fixing

Unmerged revisions

2501. By Anaël Closson (openerp)

[FIX] remove exception in IE8 due to async_when/event

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_form.js'
2--- addons/web/static/src/js/view_form.js 2012-12-04 11:02:12 +0000
3+++ addons/web/static/src/js/view_form.js 2013-02-05 10:24:21 +0000
4@@ -357,6 +357,7 @@
5 do_onchange: function(widget, processed) {
6 var self = this;
7 return this.on_change_mutex.exec(function() {
8+
9 try {
10 var response = {}, can_process_onchange = $.Deferred();
11 processed = processed || [];
12@@ -1469,7 +1470,6 @@
13 return this.get_value();
14 },
15 update_dom: function(show_invalid) {
16- console.log('update_dom: show_invalid', show_invalid);
17 this._super.apply(this, arguments);
18 if (this.field.translate) {
19 this.$element.find('.oe_field_translate').toggle(!!this.view.datarecord.id);
20@@ -2117,7 +2117,7 @@
21 return true;
22 }, menuStyle: {width: "200px"}
23 });
24- $.async_when().then(function() {self.$menu_btn.trigger(e);});
25+ $.when().then(function() {self.$menu_btn.trigger(e);});
26 });
27 });
28 this.$menu_btn.bind({