[FIX] Custom fields should be removed from _columns too
lp bug: https://launchpad.net/bugs/490125 fixed bzr revid: jvo@tinyerp.com-20100201114605-6klss5f5bqw5yb6o
This commit is contained in:
parent
ee78cb215e
commit
abc44a50cb
|
@ -235,10 +235,12 @@ class ir_model_fields(osv.osv):
|
|||
def unlink(self, cr, user, ids, context=None):
|
||||
for field in self.browse(cr, user, ids, context):
|
||||
if field.state <> 'manual':
|
||||
raise except_orm(_('Error'), _("You can not remove the field '%s' !") %(field.name,))
|
||||
raise except_orm(_('Error'), _("You cannot remove the field '%s' !") %(field.name,))
|
||||
#
|
||||
# MAY BE ADD A ALTER TABLE DROP ?
|
||||
#
|
||||
#Removing _columns entry for that table
|
||||
self.pool.get(field.model)._columns.pop(field.name,None)
|
||||
return super(ir_model_fields, self).unlink(cr, user, ids, context)
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
|
|
Loading…
Reference in New Issue