From abfc535a1f7742c2ff65d976a8933ee01f4b4832 Mon Sep 17 00:00:00 2001 From: "Louis Wicket (wil)" Date: Thu, 6 Oct 2022 09:15:07 +0000 Subject: [PATCH] [IMP] mail: add error message for field patch with fieldType MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes odoo/odoo#102363 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/model/model_core.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/mail/static/src/model/model_core.js b/addons/mail/static/src/model/model_core.js index 1d731cb17c3..d7de47fcbd7 100644 --- a/addons/mail/static/src/model/model_core.js +++ b/addons/mail/static/src/model/model_core.js @@ -297,6 +297,8 @@ function patchFields(patch) { originalFieldDefinition.sort = attributeData; } break; + case 'fieldType': + throw new Error(`Cannot patch field ${patch.name}/${fieldName}: patches do not need field type (attr, one, many).`); default: throw new Error(`Cannot patch field ${patch.name}/${fieldName}: unsupported field attribute "${attributeName}".`); }