From 151ceb0dd28e2c7674599cd03628e22f31033e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 23 Jul 2008 16:09:57 +0200 Subject: [PATCH] Improve remove/unlink on one2many to use list of ids --- tryton/gui/window/view_form/model/field.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py index 7ca1b8dc9b..1adb332024 100644 --- a/tryton/gui/window/view_form/model/field.py +++ b/tryton/gui/window/view_form/model/field.py @@ -335,10 +335,8 @@ class O2MField(CharField): else: result.append(('create', model2.get(check_load=check_load, get_readonly=readonly))) - for rm_id in model.value[self.name].model_removed: - result.append(('remove', rm_id)) - for rm_id in model.value[self.name].model_unlinked: - result.append(('unlink', rm_id)) + result.append(('remove', model.value[self.name].model_removed)) + result.append(('unlink', model.value[self.name].model_unlinked)) return result def set(self, model, value, test_state=False, modified=False):