This question has been flagged
1 Reply
4286 Views

I have been developing modules in OpenERP-7 using Python on Ubuntu-12.04. I want to give my users a feature by which they will have the ability to create what ever fields they want to . Like they will set the name, data_type etc for the field and then on click , this field will be created. I dont have any idea how this will be implemented. I have set up mind to create a button that will call a function and it will create a new field according to the details entered by the user . Is this approach of mine is right or not? And will this work . ? Please guide me so that I can work smartly.

Hopes for suggestion

Avatar
Discard
Best Answer

Hi,

Refer account_analytic_plans.py file in openerp addons.

thanks

Avatar
Discard
Author

my approach is wrong or what? what function should I use?

You can use fields_view_get

Author

but I m not getting the implementation here. When will this function be called and what about its parameters . Can u pls explain a bit

Author

I am not getting this function . When this function be called and what are the parameters here. Can u plz explain a bit

Author

I am not getting this function . When this function be called and what are the parameters here. Can u plz explain a bit

This function call at time of view load.

Author

can't we call it on a button click ?

Author

hello jack , I have created the field and is being shown on the form . but its not saving the data , any idea to resolve it? Thanks

@arsalan: Sorry no idea

Author

but you said u have created dynamic fields ,

But that field not store in db

Author

ok is see. I have created a field with hardcoded details . is there anything I can do to give the field any string n type dynamically . Since we cant connect this function to a button , thats why I am facing problems. Thanks a lot