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.

2

Create a dynamic list of checkboxes in a view [Closed]

By
Yakito
on 2/17/13, 1:39 AM 2,066 views

The Question has been closed

by
Sudhir Arya (SA)
on 04/18/2013 04:53:29

Hello,

I am learning how to develop custom modules so excuse me if this sounds basic.

For a new module I need to be able to create a view which will have N number of checkboxes. That N number will come from the inputs of another view, lets call it Categories

So in the view User I want the view to show a checkbox for each category in the Categories table.

Is this possible? If anyone can point me out on a module with similar functionalities or tip me on the basics on how this can be achieved I will be very thankful.

Thanks in advance

4

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
On 2/17/13, 6:04 AM

First you have to dynamically create N number of fields for check boxes.

Now second thing about how to display N number of fields? You can dynamically create fields & view by overriding def view_init & def fields_view_get methods.

You can find similar code in POS Return.

Hope it will solve your problem.

Thanks Sudhir! Let me make sure I understand. I create both functions inside of my class "Users" lets say which will read the fields form my other table to create the N fields, but when are those functions called? Or those are functions which always get called by OpenERP? I will start testing

Yakito
on 2/17/13, 12:59 PM

OK I understand now how to work with those methods! Thanks again!

Yakito
on 2/17/13, 1:12 PM

Hi Yakito...looking for similar solution. Can you please post some dummy code for these functions to understand proper. It will be a great help. Thanks.

dirtyHandsPHP
on 5/30/15, 2:43 AM

About This Community

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

Question tools

0 follower(s)

Stats

Asked: 2/17/13, 1:39 AM
Seen: 2066 times
Last updated: 3/16/15, 8:10 AM