def domain_get(self, record): if record.value.get(self.name): model = record.value[self.name][0] else: model = None screen_domain, attr_domain = self.domains_get(record) screen_domain = prepare_reference_domain(screen_domain, self.name) return concat( localize_domain(filter_leaf(screen_domain, self.name, model), strip_target=True), attr_domain)
def get_models(self, record): screen_domain, attr_domain = self.domains_get(record) screen_domain = prepare_reference_domain(screen_domain, self.name) return extract_reference_models(concat(screen_domain, attr_domain), self.name)