From 17aae06ec97529f7f8710c3ffaf9e8285cd58e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 6 Mar 2013 17:39:17 +0100 Subject: [PATCH] Remove unused context on {Record,Group}.delete --- tryton/gui/window/view_form/model/group.py | 4 ++-- tryton/gui/window/view_form/model/record.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/view_form/model/group.py b/tryton/gui/window/view_form/model/group.py index f1a91b46ca..145e9f94b1 100644 --- a/tryton/gui/window/view_form/model/group.py +++ b/tryton/gui/window/view_form/model/group.py @@ -170,8 +170,8 @@ class Group(SignalEvent, list): self.delete(self.record_deleted) return saved - def delete(self, records, context=None): - return Record.delete(records, context=context) + def delete(self, records): + return Record.delete(records) @property def root_group(self): diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index f8ea4000ec..816494abb3 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -299,7 +299,7 @@ class Record(SignalEvent): return self.id @staticmethod - def delete(records, context=None): + def delete(records): if not records: return record = records[0] @@ -308,7 +308,6 @@ class Record(SignalEvent): assert all(r.group.root_group == root_group for r in records) records = [r for r in records if r.id >= 0] ctx = {} - ctx.update(context or {}) ctx['_timestamp'] = {} for rec in records: ctx['_timestamp'].update(rec.get_timestamp())