Hi all,

I'm trying to set a domain in a Many2One field and I don't get with it. The 
case something like this:


class ParentModel(ModelSQL, ModelView):
    __name__ = 'parent.model'
    [...]
    related_model = fields.Many2One('other.model', 'Related Model')
    childs = fields.One2Many('child.model', 'Childs', 'Fields')

class ChildModel(ModelSQL, ModelView):
    __name__ = "child.model"

    related_model_child = fields.Many2One('other.model.child', 'Related 
Model Child'
        domain = [?])
    parent = fields.Many2One('parent.model', 'Parent Model')

And I want to put a domain in the related_fodel_child field of the model 
ChildModel in order to that the filter only shows records being child of 
the model other.model that are related through the parent field with the 
ParentModel model. Can anyone helps me?

-- 
-- 
[email protected] mailing list



Reply via email to