From 1b8c9aed9f516df1c7a51db41e083df2e36b4bf5 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 26 Nov 2015 13:53:55 +0100 Subject: [FIX] models: custom fields seen as base fields This was possible to create custom fields `x_*` but seen as base fields. For instance, - Go to Settings > Technical > Database Structure > Fields - Select a field (any) - Click on the model link, to be redirected to the model form - Edit & add a custom field from there. - Save - Notice that the field you just added is saved as a base field. We solve this issue by assuming that all created fields and models are customs, except the ones created by the ORM, by the database initialization, the fields coming from the modules in python. We therefore remove the mechanism on which a field was set as custom according to the fact `manual` was set to True within the context: This is now the case by default. No change was required for the base fields: The `state` `base` was already forced for those fields, that are created using direct SQL requests `INSERT INTO`. opw-657312 --- addons/web_view_editor/static/src/js/view_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web_view_editor/static/src') diff --git a/addons/web_view_editor/static/src/js/view_editor.js b/addons/web_view_editor/static/src/js/view_editor.js index 96cdcc6f5b7..fdedb82f7b6 100644 --- a/addons/web_view_editor/static/src/js/view_editor.js +++ b/addons/web_view_editor/static/src/js/view_editor.js @@ -1007,7 +1007,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({ render_new_field :function( result ) { var self = this; var action = { - context: {'default_model_id': result.id, 'manual': true, 'module' : result.model}, + context: {'default_model_id': result.id, 'module' : result.model}, res_model: "ir.model.fields", views: [[false, 'form']], type: 'ir.actions.act_window', -- cgit v1.2.3