Files
odoo_source/addons/base_automation
Ivan Yelizariev 77911affbe [FIX] base_automation: fix rpc error handling
RPC call may fail because of error in `base.automation` handler. In this case
the response contains attribute `exception_class=base_automation` to handle
error via custom dialog `BaseAutomationErrorDialog`, which provides extra
buttons (disable/edit Automated Action).

1.

`BaseAutomationErrorDialog` was incorrectly inherited from ErrorDialog, which
cannot extract traceback from `data.debug` value of jsonrpc. Fix it by replacing
it RPCErrorDialog.

RPCErrorDialog: https://github.com/odoo/odoo/blob/a75fcbe03f31fd10a74e609672b64dad165e68d7/addons/web/static/src/core/errors/error_dialogs.js#L62-L70

2.

Button `Edit Action` didn't work, because it tries the same rpc call before
navigating to the action. For example, it would repeat rpc call to create a
record, which doesn't work because of broken automated action.

It happens because form changes are saved automatically since Odoo v15.

Fix it by adding `target: "new"`.

opw-2845893

closes odoo/odoo#106134

X-original-commit: f54eef302323f1f6406e9b2ac8e02cec5b627fac
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-11-21 11:50:23 +01:00
..
…
2022-09-20 13:48:49 +02:00