changeset c35ce5915761 in modules/attendance:6.0
details:
https://hg.tryton.org/modules/attendance?cmd=changeset&node=c35ce5915761
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 dc0d0b6a041f -r c35ce5915761 attendance.py
--- a/attendance.py Sat Oct 02 00:30:16 2021 +0200
+++ b/attendance.py Thu Oct 20 09:44:24 2022 +0200
@@ -140,11 +140,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)