python - how to make dynamic field creation capability in openerp module? -
hi have created openerp module using python (eclipse) . want add feature in form admin able create own fields whenever , whatever wants . needed guidance of how done . new openerp , me . thanks
hopes advice
i can't think of easy way of doing this. when openerp connects database sets registry containing models , fields , part of this, loads fields database, performs database refactoring etc. idea is simple inherit existing models , add fields way require coding.
i have done similar where:
- i predefined fields on model (field1, intfield1, charfield1 etc.).
- provide model/form admin can use intfield1 , give label of 'my value'
- override fields_view_get on model , change xml include field correct label.
but tricky right. want spend time learning elementtree module xml manipulation in fields_view_get
.
Comments
Post a Comment