-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Save button in ListView.buttons edit mode doesn't save records when pressing on span or icon #2558
Comments
This is something expected, as there are mandatory fields that are not filled. Closing as no bug, but expected behavior. |
Sorry I may didn't express myself correctly, please let me correct myself in english and spanish so I can express better for you: [ENG]Excuse me Pedro, I may not express my issue clearly enough, I know that the error is mandatory and it must appear, it was an example that is should've been thrown, but it doesn't happen because when you click on the text or the icon it skips all adittions to list.
The issue is not the error message, when I try this with forms with no required fields, it also doesn't save and skips unless you click outside the mentioned areas, Notice that if you add fields manually, writing or selecting something, it saves, but not because the save button is working, on this kind of forms, view format, once you write or select a field, you can click wherever outside the buttons and it saves anyway. I tried to add o_list_button_save inside the button's Span and Icon and it worked all along, here you can see an example on video. This happen once you install the web_responsive module [ESP]Disculpa Pedro, quizá no expresé correctamente mi problema, sé que el mensaje de advertencia es mandatorio y debe ser así. Era un ejemplo de que debería saltar el error, sin embargo no ocurre porque al clicar en el texto, ignora toda adición a la lista. El problema que describo es que el comportamiento del botón difiere según si clicas en el "Span" o icono, o si clicas detrás,
En casos en los que no haya campos obligatorios, simplemente ocurre que si clicas sobre las áreas, tu registro no se añade, y si clicas fuera, sí se añade. Probé a añadir o_list_button_save en el "Span" y el icono y el botón funcionó homogéneamente, adjunto video demostrativo |
OK, thanks for the extra explanations. Please do a PR proposing the patch. |
Changes are not applying when clicking on icon or span inside the save button once you install web_responsive module
Module
web_responsive
Describe the bug
'button' tag has class="o_list_button_save" so when you click on it, it calls the create method from the module. but 'i' and 'span' doesn't have it, I tried to add o_list_button_save to them manually on f12 view, and once added it, i got successfuly redirected to create method so it seems to fix it, for example:
This should throw a warn saying you must fill the required field when pressing on Save button,
The problem is that if you click on the span or the icon inside the button, nothing happen at all it just erases the record and exit the edit mode, but if you click behind, on the button itself:
It does throw the warn
I noticed it doesnt make it to create method because once I had a compilation error while making some test on a custom module, and it only throwed an error when I clicked outside the text too.
This behavior happens in every editable list view, not only in my custom module, i tried in different projects.
To Reproduce
Affected versions: I only tried on Odoo v15
Steps to reproduce the behavior:
Expected behavior
If you click ON the text/icon, it wont save, but if you click OUTISDE, it will.
Sorry for my bad english, I hope you can understand it correctly;
Thank you!
The text was updated successfully, but these errors were encountered: