[FIX] tabbing out of an m2o which opens some sort of weird dialog thing while in an editable o2m

The tab blurs the current fields, focuses the next one, then the
dialog thing opens and steals the focus from the *next* field (not the
one which created it), which thus triggers *blur* ultimately blurring
(and saving) the row being edited.

Add a trigger call in some random place which seems to make things not
fail.

bzr revid: xmo@openerp.com-20121102141348-5au6sarq0mw2ct67
This commit is contained in:
Xavier Morel 2012-11-02 15:13:48 +01:00
parent 956bfd007d
commit 72a447bd95
3 changed files with 6 additions and 1 deletions

View File

@ -2569,6 +2569,7 @@
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) {
color: transparent;
text-shadow: none;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) * {
visibility: hidden;

View File

@ -2039,6 +2039,7 @@ $sheet-padding: 16px
*
visibility: hidden
color: transparent
text-shadow: none
.oe_m2o_drop_down_button
top: 5px
.oe_m2o_cm_button

View File

@ -2955,7 +2955,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
self.uned_def = $.Deferred();
var ed_delay = 200;
var ed_duration = 15000;
var anyoneLoosesFocus = function() {
var anyoneLoosesFocus = function (e) {
var used = false;
if (self.floating) {
if (self.last_search.length > 0) {
@ -2979,7 +2979,10 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
self.ed_def = $.Deferred();
self.ed_def.then(function() {
self.show_error_displayer();
ignore_blur = false;
self.trigger('focused');
});
ignore_blur = true;
setTimeout(function() {
self.ed_def.resolve();
self.uned_def.reject();