Odoo Help


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.


How can we use dynamic domains in onchange event in new Odoo API? [Closed]

Alexei R. Acosta
on 12/22/14, 11:09 AM 586 views

The Question has been closed for reason: duplicate question

on 12/22/2014 11:58:43

How can we use dynamic domains in onchange event in new Odoo API?

I'm trying to do it, I have an Many2one field, and a compute One2many field. Options to be select by Many2one field should be in these One2many field.

Here are my code lines:

    days = fields.One2many('af.week.day', string='Class days', compute='_compute_days',
                           help='Week days in which this group has classes')
    day_of_week = fields.Many2one('af.week.day', string='Day of week', domain="[('id','in',days)]")

I dont think, you can use o2m field directly to filter your records....

on 12/22/14, 11:26 AM

Some one can delete this question? I duplicated it, I didn't mean to. Sorry

Alexei R. Acosta
on 12/22/14, 11:35 AM

About This Community

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

Question tools

2 follower(s)


Asked: 12/22/14, 11:09 AM
Seen: 586 times
Last updated: 3/16/15, 8:10 AM