From 810c7e66620b0bfbb9acd97d63af41a0e3728b8c Mon Sep 17 00:00:00 2001 From: Sebastien LANGE Date: Tue, 8 Mar 2016 11:45:10 +0100 Subject: [PATCH] [IMP] To avoid conflicts, we check that widgets phone and fax do not exist before using --- base_phone/static/src/js/phone_widget.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/base_phone/static/src/js/phone_widget.js b/base_phone/static/src/js/phone_widget.js index 0e9a9d2..7202135 100644 --- a/base_phone/static/src/js/phone_widget.js +++ b/base_phone/static/src/js/phone_widget.js @@ -123,9 +123,14 @@ var FieldFax = formwidgets.FieldChar.extend({ } }); -core.form_widget_registry - .add('phone', FieldPhone) - .add('fax', FieldFax); +// To avoid conflicts, we check that widgets do not exist before using +if(!core.form_widget_registry.get('fax')){ + core.form_widget_registry.add('fax', FieldFax); +} + +if(!core.form_widget_registry.get('phone')){ + core.form_widget_registry.add('phone', FieldPhone); +} /* var Column = require('web.list_view.js');