changeset a376e33dba85 in modules/attendance:6.4
details:
https://hg.tryton.org/modules/attendance?cmd=changeset&node=a376e33dba85
description:
Exclude active record from type search
issue11729
review435911044
(grafted from 4ac40db3d36dac93d46e807c4430d7b0aa1f5fd2)
diffstat:
attendance.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 4c2b851f444b -r a376e33dba85 attendance.py
--- a/attendance.py Mon May 02 16:59:03 2022 +0200
+++ b/attendance.py Thu Oct 20 09:44:24 2022 +0200
@@ -141,11 +141,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)