-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][IMP] web_timeline: implementing readonly_field attribute: a boolean field to mark the event as not editable #2981
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @tarteo, |
@carlos-lopez-tecnativa and this one too, thanks in advance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I fully understand the intended use case. Could you provide an example?
I tested it, but I'm not certain it's working as expected. I added readonly_field="active" to ir.cron and refreshed the view. However, when I double-click on a record, an empty popup opens without loading the record’s information.
Would it be better to use edit="0" or edit="expression" instead of adding a new option? What do you think? Otherwise, please add the new option to the README.
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 |
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 |
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 #2980, I had selected the opposite naming 💯 for me, i will change it to fit, good catch.. |
…d to mark the event as not editable in vis-timeline
e589df7
to
92803f4
Compare
Marks events as non editable following a field in the model