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', diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py index da73a3ab52b..ab21f4b8d50 100644 --- a/openerp/addons/base/ir/ir_model.py +++ b/openerp/addons/base/ir/ir_model.py @@ -129,7 +129,7 @@ class ir_model(osv.osv): _defaults = { 'model': 'x_', - 'state': lambda self,cr,uid,ctx=None: (ctx and ctx.get('manual',False)) and 'manual' or 'base', + 'state': 'manual', } def _check_model_name(self, cr, uid, ids, context=None): @@ -207,8 +207,6 @@ class ir_model(osv.osv): def create(self, cr, user, vals, context=None): if context is None: context = {} - if context and context.get('manual'): - vals['state']='manual' res = super(ir_model,self).create(cr, user, vals, context) if vals.get('state','base')=='manual': # add model in registry @@ -283,7 +281,7 @@ class ir_model_fields(osv.osv): 'selection': "", 'domain': "[]", 'name': 'x_', - 'state': lambda self,cr,uid,ctx=None: (ctx and ctx.get('manual',False)) and 'manual' or 'base', + 'state': 'manual', 'on_delete': 'set null', 'select_level': '0', 'field_description': '', @@ -369,8 +367,6 @@ class ir_model_fields(osv.osv): vals['model'] = model_data.model if context is None: context = {} - if context and context.get('manual',False): - vals['state'] = 'manual' if vals.get('ttype', False) == 'selection': if not vals.get('selection',False): raise except_orm(_('Error'), _('For selection fields, the Selection Options must be given!')) @@ -409,8 +405,6 @@ class ir_model_fields(osv.osv): def write(self, cr, user, ids, vals, context=None): if context is None: context = {} - if context and context.get('manual',False): - vals['state'] = 'manual' #For the moment renaming a sparse field or changing the storing system is not allowed. This may be done later if 'serialization_field_id' in vals or 'name' in vals: diff --git a/openerp/addons/base/ir/ir_model_view.xml b/openerp/addons/base/ir/ir_model_view.xml index bdd5868ce03..5a2547f8e43 100644 --- a/openerp/addons/base/ir/ir_model_view.xml +++ b/openerp/addons/base/ir/ir_model_view.xml @@ -41,7 +41,7 @@ - + @@ -142,7 +142,7 @@ Models ir.model form - {'manual':True} + {} @@ -237,7 +237,7 @@ Fields ir.model.fields form - {'manual':True} + {}