Skip to content
Snippets Groups Projects
Commit d1475648 authored by Maruan Aguerdouh (magm)'s avatar Maruan Aguerdouh (magm)
Browse files

[FIX] account: no traceback thrown in older browsers when formatting


Trying to access quotations using an older version of a browser, that
doesn't support `structuredClone` like i.e Safari <15.3 will throw a
traceback that will block the regular usage of the app.

We can use an older alternative to handle the deep cloning, with this
approach tho, we will lose the support of Dates, RegExps, Maps, Sets,
Blobs, FileLists, ImageDatas, sparse Arrays, Typed Arrays.

opw-3386434

closes odoo/odoo#127287

Signed-off-by: default avatarSamuel Degueldre (sad) <sad@odoo.com>
parent 0d841933
No related branches found
No related tags found
No related merge requests found
......@@ -143,7 +143,7 @@ export class TaxTotalsComponent extends Component {
}
formatData(props) {
let totals = structuredClone(props.value);
let totals = JSON.parse(JSON.stringify(props.value));
const currencyFmtOpts = { currencyId: props.record.data.currency_id && props.record.data.currency_id[0] };
let amount_untaxed = totals.amount_untaxed;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment