web
web copied to clipboard
[16.0][IMP] web_timeline: implementing readonly_field attribute: a boolean field to mark the event as not editable
Marks events as non editable following a field in the model
Hi @tarteo, some modules you are maintaining are being modified, check this out!
@carlos-lopez-tecnativa and this one too, thanks in advance
You are right i see the same, open a blank form, looking into this RN, the use you propose of the new attribute is perfectly valid, and that is the intended use case be able to put readonly bars in the timeline, i will see if can solve, at least not present a blank form, can you think of a way to show a readonly view of the form? if not the only solution now is to not show the popup
Btw nice use of the timeline... i will add it to my rather long todo list
@IJOL I believe these changes are covered in this PR. You can add edit="0", or expand it to support expressions if needed.
https://github.com/OCA/web/pull/2791
The issue is that you can control only group change ( lane change ) without forbid editing, i need to control group but not the data itself, and thats is because i use synthetic non relational groups in my use case where is appropiate to edit the event linked but not to change the group, makes only the group readonly essentially
And my use case is related to listing rentals where the group is the name of the product, you can change the dates but not the product in the line, and for those use cases I need too the readonly_field attribute, because i need lines in confirmed sale orders to be readonly..
The blank form is correct, is an add operation, that can be controlled with the create attribute, so my change is not the culprit is simply working correctly :)
Shouldn't that be done with a special attribute like in kanban for not allowing drag and drop between groups? And for the form part, define a special form view to view used when opening the record, with the readonly fields you need. On one2many widget, that can be done passing through context tree_view_ref or form_view_ref.
Shouldn't that be done with a special attribute like in kanban for not allowing drag and drop between groups? And for
this is exactly what i'm proposing a new attribute "edit_group" to control exactly this, i'm open to any name change that fits better
this last comment was wrong, the pr where i propose the edit_group is another, sorry bout that
Check how it's called in kanban, and you can use the same for homogeneity.
We are talking here of https://github.com/OCA/web/pull/2980, I had selected the opposite naming :100: for me, i will change it to fit, good catch..