Example #1
0
 def create(self, model):
     from widget.model.group import ModelRecordGroup
     mod = ModelRecordGroup(resource=self.attrs['relation'],
                            fields={},
                            parent=model)
     mod.signal_connect(mod, 'model-changed', self._model_changed)
     return mod
Example #2
0
 def set(self, model, value, test_state=False, modified=False):
     from widget.model.group import ModelRecordGroup
     mod =  ModelRecordGroup(resource=self.attrs['relation'], fields={}, parent=model)
     mod.signal_connect(mod, 'model-changed', self._model_changed)
     model.value[self.name] =mod
     #self.internal.signal_connect(self.internal, 'model-changed', self._model_changed)
     model.value[self.name].pre_load(value, display=False)
Example #3
0
 def set(self, model, value, test_state=False, modified=False):
     from widget.model.group import ModelRecordGroup
     mod = ModelRecordGroup(resource=self.attrs['relation'],
                            fields={},
                            parent=model)
     mod.signal_connect(mod, 'model-changed', self._model_changed)
     model.value[self.name] = mod
     #self.internal.signal_connect(self.internal, 'model-changed', self._model_changed)
     model.value[self.name].pre_load(value, display=False)
 def set(self, model, value, test_state=False, modified=False):
     if value and not isinstance(value[0], int):
         model = self.set_default(model, value)
         return
     from widget.model.group import ModelRecordGroup
     mod =  ModelRecordGroup(resource=self.attrs['relation'], fields={}, parent=model)
     mod.signal_connect(mod, 'model-changed', self._model_changed)
     model.value[self.name] = mod
     #self.internal.signal_connect(self.internal, 'model-changed', self._model_changed)
     if value:
         value = value[:self.limit]
     model.value[self.name].pre_load(value, display=False)
Example #5
0
 def set(self, model, value, test_state=False, modified=False):
     if value and not isinstance(value[0], int):
         model = self.set_default(model, value)
         return
     from widget.model.group import ModelRecordGroup
     mod = ModelRecordGroup(resource=self.attrs['relation'],
                            fields={},
                            parent=model)
     mod.signal_connect(mod, 'model-changed', self._model_changed)
     model.value[self.name] = mod
     #self.internal.signal_connect(self.internal, 'model-changed', self._model_changed)
     if value:
         value = value[:self.limit]
     model.value[self.name].pre_load(value, display=False)
 def create(self, model):
     from widget.model.group import ModelRecordGroup
     mod = ModelRecordGroup(resource=self.attrs['relation'], fields={}, parent=model)
     mod.signal_connect(mod, 'model-changed', self._model_changed)
     return mod