diff --git a/sao/src/model.js b/sao/src/model.js index 778324b22d..b7ddec30b1 100644 --- a/sao/src/model.js +++ b/sao/src/model.js @@ -2512,11 +2512,6 @@ } return result; }, - get_removed_ids: function(record) { - return record._values[this.name].record_removed.map(function(r) { - return r.id; - }); - }, get_domain: function(record) { var domains = this.get_domains(record); var attr_domain = domains[1]; diff --git a/sao/src/view/form.js b/sao/src/view/form.js index b4392cd741..9abb552f8f 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -3313,8 +3313,6 @@ function eval_pyson(value){ var context = this.field.get_search_context(this.record); domain = [domain, this.record.expr_eval(this.attributes.add_remove)]; - var removed_ids = this.field.get_removed_ids(this.record); - domain = ['OR', domain, ['id', 'in', removed_ids]]; var text = this.wid_text.val(); var sequence = this._sequence(); @@ -3567,8 +3565,6 @@ function eval_pyson(value){ var domain = this.field.get_domain(this.record); domain = [domain, this.record.expr_eval(this.attributes.add_remove)]; - var removed_ids = this.field.get_removed_ids(this.record); - domain = ['OR', domain, ['id', 'in', removed_ids]]; return Sao.common.update_completion( this.wid_text, this.record, this.field, model, domain); }, diff --git a/tryton/tryton/gui/window/view_form/model/field.py b/tryton/tryton/gui/window/view_form/model/field.py index 5e31e1031c..5d9af10416 100644 --- a/tryton/tryton/gui/window/view_form/model/field.py +++ b/tryton/tryton/gui/window/view_form/model/field.py @@ -862,9 +862,6 @@ class O2MField(Field): self._set_default_value(record) super(O2MField, self).state_set(record, states=states) - def get_removed_ids(self, record): - return [x.id for x in record.value[self.name].record_removed] - def domain_get(self, record): screen_domain, attr_domain = self.domains_get(record) # Forget screen_domain because it only means at least one record diff --git a/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py index 2d73c61785..06a3629814 100644 --- a/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -459,8 +459,6 @@ class One2Many(Widget): domain = self.field.domain_get(self.record) context = self.field.get_search_context(self.record) domain = [domain, self.record.expr_eval(self.attrs.get('add_remove'))] - removed_ids = self.field.get_removed_ids(self.record) - domain = ['OR', domain, ('id', 'in', removed_ids)] text = self.wid_text.get_text() self.focus_out = False @@ -561,8 +559,6 @@ class One2Many(Widget): model = self.attrs['relation'] domain = self.field.domain_get(self.record) domain = [domain, self.record.expr_eval(self.attrs.get('add_remove'))] - removed_ids = self.field.get_removed_ids(self.record) - domain = ['OR', domain, ('id', 'in', removed_ids)] update_completion(self.wid_text, self.record, self.field, model, domain=domain)