[FIX] set state to manual after creating the database field
@ -33,6 +33,7 @@ class ir_model_fields(Model):
for this in self.browse(cr, uid, ids, context=context):
pool_obj = self.pool.get(this.model_id.model)
self.create_database_column(cr, uid, pool_obj, this.name)
this.write({'state': 'manual'})
while True:
ids = pool_obj.search(
cr, uid,
@ -10,7 +10,7 @@
<field name="serialization_field_id" position="after">
<button type="object" name="action_unserialize_field"
string="Unserialize field" colspan="4"
attrs="{'invisible': [('serialization_field_id','=',False)]}"
attrs="{'invisible': ['|', ('serialization_field_id','=',False), ('state', '!=', 'manual')]}"
/>
</field>
</data>