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.

1

How to dynamically add fields in a view?

By
Samba Faye
on 9/12/13, 8:04 AM 1,436 views

I want to add a button that, when clicked, adds input fields. How will I do?

0

Daniel Reis

--Daniel Reis--
3436
| 6 7 9
Lisbon, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt


Daniel Reis
On 9/12/13, 8:41 AM

One solution is to have those fields in the form, with the attribute attrs="{'invisible: <condition>}". The button would change a value in the document, and based on that value the <condition> could evaluate to False to make the corresponding fields visible.

0
El hadji Dem
On 2/9/15, 11:14 AM

Or try this: http://stackoverflow.com/questions/17738566/how-to-create-dynamic-fields-in-openerp-7-module

0
Samba Faye
On 9/12/13, 9:00 AM

Hello Daniel Can you give me an example. I'm new in OpenERP. How can I link the button to the condition.

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

0 follower(s)

Stats

Asked: 9/12/13, 8:04 AM
Seen: 1436 times
Last updated: 3/16/15, 8:10 AM