changeset 71357bb1f812 in modules/attendance:6.2
details: 
https://hg.tryton.org/modules/attendance?cmd=changeset&node=71357bb1f812
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 43bc508cfd0d -r 71357bb1f812 attendance.py
--- a/attendance.py     Mon Nov 01 17:09:59 2021 +0100
+++ 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)

Reply via email to