Browse Source

[IMP] only work on manual fields

[FIX] set state to manual after creating the database field
pull/78/head
Holger Brunn 12 years ago
parent
commit
d6cab4d92f
  1. 1
      unserialize_field/ir_model_fields.py
  2. 2
      unserialize_field/ir_model_fields.xml

1
unserialize_field/ir_model_fields.py

@ -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,

2
unserialize_field/ir_model_fields.xml

@ -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>

Loading…
Cancel
Save