Skip to content

Commit 97ce14b

Browse files
authored
Fix referenceresults widget view mode (senaite#2128)
1 parent 430a247 commit 97ce14b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bika/lims/browser/widgets/referenceresultswidget.py

+6
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ def ReferenceResults(self, field, allow_edit=False):
272272
# Call listing hooks
273273
table.update()
274274
table.before_render()
275+
276+
if allow_edit is False:
277+
# This is a hack to notify read-only mode to the view
278+
table.allow_edit = allow_edit
279+
return table.contents_table_view()
280+
275281
return table.ajax_contents_table()
276282

277283

0 commit comments

Comments
 (0)