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
remove boolean widget on signature binary field #72276
Conversation
Before this commit: when writing something in signture field in stock.picking and enable signature field in listview throws traceback. After this commit: when signature field is set and enabling it in list view will not throw traceback, traceback was generated because boolean field was applied on Image field, to fix it simply remove boolean widget on signature field. task-2570929
I would rather completely remove it from the view or fix the boolean widget for this case. It's a bit useless to have the size of the image in the list view |
@msh-odoo @amoyaux Hello, I was checking it and I don't think having size of the image for a column "Signed" is great |
@mcm-odoo Yep seems a good solution |
@amoyaux yes, the widget should be likely fixed by using a special validation check instead of the constructor. You can see the comments in my issue.
That's pretty much how we fixed it in for our client. I kinda agree that the Boolean widget should only work with booleans... but in reality odoo used to have the boolean as True for non false values. So undefined/false/null would be False while anything else would be considered True. It obviously work for any readonly field and can be used for any field. That's why it worked with the binary field in the past as an empty datas would return null/false while a saved data would return a size which is not false. But to make it clear, we needed it in the view as a boolean so removing the widget is worthless. is_signed is fine while in my opinion it will require more computation for a boolean field... Seems a bit overkill when the widget can be more flexible. |
@msh-odoo You can do a PR for master, I will merge this one like that. It's not otimal but it will avoid the traceback and the diff is safe for a stable. |
robodoo r+ |
signaature field was used in listview and it was displaying size of the signature file, it has been done in commit: 4bdbb9b but as discussed on PR: odoo#72276 we added is_signed computed boolean field to display it like boolean as boolean widget is supported only on boolean type field. task-2580117
signaature field was used in listview and it was displaying size of the signature file, it has been done in commit: 4bdbb9b but as discussed on PR: #72276 we added is_signed computed boolean field to display it like boolean as boolean widget is supported only on boolean type field. task-2580117 closes #72592 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
PURPOSE
When writing something in signture field in stock.picking and enable signature field in listview throws traceback.
SPEC
Remove boolean widget on signature field.
TASK 2570929
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr