Return False when scanning code fails instead of using an invalid empty list

Closes #14923
(grafted from c825df1c785d0cfa15be7c1748716f8dd1a6149d)

--HG--
branch : 8.0
This commit is contained in:
Sergi Almacellas Abellana
2026-07-03 15:31:25 +02:00
parent aeac50c908
commit f0f33749ee
@@ -747,7 +747,7 @@ class Record:
'model', self.model_name, 'on_scan_code', values, code,
context=self.get_context(), process_exception=False)
except RPCException:
changes = []
return False
self.set_on_change(changes)
self.set_modified()
return bool(changes)