'Initialize expression object and automatically parse the expression
right after initialization.
:param domain: expression (using domain (\'foo\', \'=\', \'bar\' format))
:param model: root model
:attr list result: list that will hold the result of the parsing
as a list of ExtendedLeaf
:attr list joins: list of join conditions, such as
(res_country_state."id" = res_partner."state_id")
:attr root_model: base model for the query
:attr list expression: the domain expression, that will be normalized
and prepared'

def __init__(self, domain, model):

    self._unaccent = get_unaccent_wrapper(model._cr)
    self.joins = []
    self.root_model = model
    self.expression = distribute_not(normalize_domain(domain))
    self.parse()
