From 95d8ab142a295b239ad2ecf067691edcbb2bf4f9 Mon Sep 17 00:00:00 2001 From: "Levi Siuzdak (sile)" Date: Wed, 13 Nov 2024 19:07:03 +0000 Subject: [PATCH] [FIX] base: prevent iOS Safari schema parsing issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Versions -------- - 16.0+ Steps ----- For 17.0+: 1. Create a Sale Order for a new contact without phone number; 2. disable online signature; 3. add a deliverable product to the SO; 4. hit "Send by Email"; 5. open the sent mail (e.g. via Mailhog); 6. copy the payment link; 7. open in Safari on iOS; 8. pay the sales order. Issue ----- > TypeError: Attempted to assign to readonly property. > extractFilteredSchemaValuesFromMicroData@https... > extractSchemaValuesFromSchemaOrg@https... > global code@https... Cause ----- `extractFilteredSchemaValuesFromMicroData` is a function internal to iOS Safari. It is bugged in that it tries to reassign a `const` in some scenarios where no elements with `itemprop="telephone"` attributes are found. Solution -------- If the contact doesn't have a mobile or phone number, add an empty `div` with `itemprop="telephone"`. opw-4072838 closes odoo/odoo#187380 X-original-commit: f2406e2df47a92a9f552de66b27a5652d4631ab1 Signed-off-by: Rémy Voet (ryv) Signed-off-by: Levi Siuzdak --- odoo/addons/base/views/ir_qweb_widget_templates.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odoo/addons/base/views/ir_qweb_widget_templates.xml b/odoo/addons/base/views/ir_qweb_widget_templates.xml index cd00bb7664885..64d166fae9797 100644 --- a/odoo/addons/base/views/ir_qweb_widget_templates.xml +++ b/odoo/addons/base/views/ir_qweb_widget_templates.xml @@ -42,6 +42,8 @@
+ +