You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get Odoo Client Error when deleting a worksheet #32
Get Odoo Client Error when deleting a sheet.
Details of the error are as follows:
UncaughtPromiseError > TypeError
Uncaught Promise > env.askConfirmation is not a function
thanks for your extra explanation. Bug reproduced on runboat.
For the next time, please provide log error in debug mode. The text is more explicite :
TypeError: env.askConfirmation is not a function
action@http://URL/web/assets/debug/spreadsheet.o_spreadsheet.js:5998:30 (/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js:5993)
activateMenu@http://URL/web/assets/debug/spreadsheet.o_spreadsheet.js:4276:39 (/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js:4271)
onClickMenu@http://URL/web/assets/debug/spreadsheet.o_spreadsheet.js:4356:26 (/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js:4351)
slot1/hdlr5<@http://URL/web/assets/debug/web.assets_common.js line 21935 > Function:50:27 (/web/static/lib/owl/owl.js:5532)
mainEventHandler@http://URL/web/assets/debug/web.assets_common.js:22222:25 (/web/static/lib/owl/owl.js:5819)
listener@http://URL/web/assets/debug/web.assets_common.js:16760:20 (/web/static/lib/owl/owl.js:357)
investigation :
the o-spreadsheet lib call a function askConfirmation that is not available in Odoo Community Edition. (but call 3 times)
/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js: env.askConfirmation(_lt("We found data next to your selection. Since this data was not selected, it will not be sorted. Do you want to extend your selection?"), () => {
/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js: action: (env) => env.askConfirmation(_lt("Are you sure you want to delete this sheet ?"), () => {
/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js: env.askConfirmation(AddMergeInteractiveContent.MergeIsDestructive, () => {
I guess that the function is define somewhere in Odoo EE.
Solution:
Redevelop the function in the OCA module. Could you make a PR ?
Will do ASAP. I didn't like the fact the input box was still editable even with an alert-only message, so made some further amendments so it can display only text and make the dialog multi-purpose. Not done a lot with OWL yet so still learning, but liking it!
Activity
legalsylvain commentedon May 31, 2024
Hi @chrisandrewmann.
http://oca-spreadsheet-16-0-6bf589a8c659.runboat.odoo-community.org
sorry I can't reproduce the bug on runboat. could you be more precise ? Thanks !
chrisandrewmann commentedon May 31, 2024
Hi @legalsylvain sorry if not clear, see the attached GIF.
Steps are:
legalsylvain commentedon May 31, 2024
Hi @chrisandrewmann.
thanks for your extra explanation. Bug reproduced on runboat.
For the next time, please provide log error in debug mode. The text is more explicite :
investigation :
o-spreadsheetlib call a functionaskConfirmationthat is not available in Odoo Community Edition. (but call 3 times)I guess that the function is define somewhere in Odoo EE.
Solution:
Redevelop the function in the OCA module. Could you make a PR ?
CC : @etobella
chrisandrewmann commentedon May 31, 2024
@legalsylvain and @etobella
I have a working mockup but not time to do a PR yet.
Modified the spreadsheet_renderer.esm.js with following changes:
etobella commentedon May 31, 2024
It seems ok. Can you create a PR?
chrisandrewmann commentedon May 31, 2024
Will do ASAP. I didn't like the fact the input box was still editable even with an alert-only message, so made some further amendments so it can display only text and make the dialog multi-purpose. Not done a lot with OWL yet so still learning, but liking it!
etobella commentedon May 31, 2024
OWL and JS is weird at the begining, but at the end, you will enjoy it
[-]Get Odoo Client Error when deleting a sheet[/-][+]Get Odoo Client Error when deleting a worksheet[/+]chrisandrewmann commentedon May 31, 2024
PR done @etobella
#33
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
Squashed 'spreadsheet/' changes from 4bc4ed6118..25b3cc1064
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
Squashed 'spreadsheet/' changes from 8f41efd9f..58e289f66
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet
[FIX] spreadsheet_oca: Error when deleting a worksheet