Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

how to create dynamic fields i openERP-7 ?

By
arsalan
on 3/26/14, 5:31 AM 1,752 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

0

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 3/26/14, 5:48 AM

Hi,

Refer account_analytic_plans.py file in openerp addons.

thanks

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

arsalan
on 3/26/14, 6:07 AM

You can use fields_view_get

Jagdish Panchal
on 3/26/14, 6:20 AM

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

arsalan
on 3/26/14, 6:40 AM

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

arsalan
on 3/26/14, 6:42 AM

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

arsalan
on 3/26/14, 6:46 AM

This function call at time of view load.

Jagdish Panchal
on 3/26/14, 6:47 AM

can't we call it on a button click ?

arsalan
on 3/26/14, 6:53 AM

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
on 4/3/14, 3:53 AM

@arsalan: Sorry no idea

Jagdish Panchal
on 4/3/14, 3:57 AM

but you said u have created dynamic fields ,

arsalan
on 4/3/14, 4:01 AM

But that field not store in db

Jagdish Panchal
on 4/3/14, 4:08 AM

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

arsalan
on 4/3/14, 5:22 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/26/14, 5:31 AM
Seen: 1752 times
Last updated: 3/16/15, 8:10 AM