Exclude active record from type search

issue11729
review435911044
(grafted from 4ac40db3d36dac93d46e807c4430d7b0aa1f5fd2)

--HG--
branch : 6.0
This commit is contained in:
Adrià Tarroja Caubet committed 2022-10-20 09:44:24 +02:00
1 parent 219aaee124
commit 8623885c35
1 file changed
+2 -1
+2 -1
View File
@@ -140,11 +140,12 @@ class Line(ModelSQL, ModelView):
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)