changeset 4ac40db3d36d in modules/attendance:default
details:
https://hg.tryton.org/modules/attendance?cmd=changeset&node=4ac40db3d36d
description:
Exclude active record from type search
issue11729
review435911044
diffstat:
attendance.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r e2aa7e244d47 -r 4ac40db3d36d attendance.py
--- a/attendance.py Sun Oct 16 14:14:10 2022 +0200
+++ b/attendance.py Thu Oct 20 09:44:24 2022 +0200
@@ -137,11 +137,12 @@
attendance=record.rec_name,
period=period_date))
- @fields.depends('employee', 'at')
+ @fields.depends('employee', 'at', 'id')
def on_change_with_type(self):
records = self.search([
('employee', '=', self.employee),
('at', '<', self.at),
+ ('id', '!=', self.id),
],
order=[('at', 'desc')],
limit=1)