[IMP] *: remove legacy rpc

This commit removes the files ajax.js and rpc.js then adapts all the
places where their exports were used. For most of the changes, it's a
replace of `this._rpc({...})` by a new `useService("rpc|orm")` like
pattern in the widgets.

closes odoo/odoo#136271

Task: 3439226
Related: odoo/enterprise#47775
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Michael (mcm)
2023-09-27 11:33:01 +00:00
parent 6ff40c0f9f
commit 7422eb643c
136 changed files with 1366 additions and 2384 deletions
@@ -138,14 +138,11 @@ paymentForm.include({
}
// Initiate the payment
this._rpc({
route: '/payment/authorize/payment',
params: {
'reference': processingValues.reference,
'partner_id': processingValues.partner_id,
'opaque_data': response.opaqueData,
'access_token': processingValues.access_token,
}
this.rpc('/payment/authorize/payment', {
'reference': processingValues.reference,
'partner_id': processingValues.partner_id,
'opaque_data': response.opaqueData,
'access_token': processingValues.access_token,
}).then(() => {
window.location = '/payment/status';
}).guardedCatch((error) => {