From 83dab2d0dcab28607b82550190ea295bd31c167e Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Mon, 27 Mar 2017 11:23:17 +0200 Subject: [REM] web: remove id widget The original reason why this widget was created is because sometimes, the id is a virtual one, represented by string in the webclient. As such, the integer widget could not render it properly since it could not parse the integer from the string. This led to the following bug, which in turn led to the creation of the id widget: https://bugs.launchpad.net/openerp-web/+bug/919184 Now, virtual ids are not handled within the record data itself anymore, making it a non-issue to render the id field in the webclient since it is not given a value until a proper id is created. The virtual id management is completely out of the view scope now, rendering this widget useless. --- addons/web/static/src/js/fields/field_utils.js | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'addons/web/static/src/js/fields/field_utils.js') diff --git a/addons/web/static/src/js/fields/field_utils.js b/addons/web/static/src/js/fields/field_utils.js index 9c5afb71dd9..cc9580c4baf 100644 --- a/addons/web/static/src/js/fields/field_utils.js +++ b/addons/web/static/src/js/fields/field_utils.js @@ -142,17 +142,6 @@ function formatFloatTime(value) { return _.str.sprintf(pattern, hour, min); } -/** - * Returns a string representing an ID. If the value is false, then we - * return an empty string. - * - * @param {integer|false} value - * @returns {string} - */ -function formatID(value) { - return value ? value.toString() : ''; -} - /** * Returns a string representing an integer. If the value is false, then we * return an empty string. @@ -390,7 +379,6 @@ return { float: formatFloat, float_time: formatFloatTime, html: _.identity, // todo - id: formatID, integer: formatInteger, many2many: formatMany2Many, many2one: formatMany2one, @@ -409,7 +397,6 @@ return { float: parseFloat, float_time: parseFloatTime, html: _.identity, // todo - id: _.identity, integer: parseInteger, many2many: _.identity, // todo many2one: parseMany2one, -- cgit v1.2.3