details: https://code.tryton.org/tryton/commit/c68fa5b91d63
branch: default
user: Cédric Krier <[email protected]>
date: Wed Sep 30 09:37:51 2026 +0200
description:
Do not set note nor notification as readonly if id is 0
Closes #15130
diffstat:
trytond/trytond/ir/note.py | 2 +-
trytond/trytond/res/notification.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r fac6ce2927da -r c68fa5b91d63 trytond/trytond/ir/note.py
--- a/trytond/trytond/ir/note.py Wed Sep 30 09:35:55 2026 +0200
+++ b/trytond/trytond/ir/note.py Wed Sep 30 09:37:51 2026 +0200
@@ -20,7 +20,7 @@
class Note(ResourceMixin, ModelSQL, ModelView):
__name__ = 'ir.note'
message = fields.Text('Message', states={
- 'readonly': Eval('id', 0) > 0,
+ 'readonly': Eval('id', -1) >= 0,
})
message_wrapped = fields.Function(fields.Text('Message'),
'on_change_with_message_wrapped')
diff -r fac6ce2927da -r c68fa5b91d63 trytond/trytond/res/notification.py
--- a/trytond/trytond/res/notification.py Wed Sep 30 09:35:55 2026 +0200
+++ b/trytond/trytond/res/notification.py Wed Sep 30 09:37:51 2026 +0200
@@ -26,7 +26,7 @@
__name__ = 'res.notification'
_states = {
- 'readonly': Eval('id', 0) >= 0,
+ 'readonly': Eval('id', -1) >= 0,
}
user = fields.Many2One(