def _setup_widgets(self): self._widgets = {} group = GridGroup.get_active_groups(self.store) self.attribute_group_combo.prefill( api.for_combo(group, attr='description', empty=_("Select a group"))) self.attribute_group_combo.connect( 'changed', self._on_attribute_group_combo_selection__changed)
def _setup_widgets(self): self._widgets = {} group = GridGroup.get_active_groups(self.store) self.attribute_group_combo.prefill(api.for_combo(group, attr='description', empty=_("Select a group"))) self.attribute_group_combo.connect('changed', self._on_attribute_group_combo_selection__changed)
def setup_proxies(self): groups = list(GridGroup.get_active_groups(self.store)) # If the current group is no longer active, we must add it to the list # of groups: if not self.model.group.is_active: groups.append(self.model.group) self.group_combo.prefill(api.for_combo(groups, attr='description')) self.proxy = self.add_proxy(self.model, self.proxy_widgets)
def validate_step(self): if (self.wizard.product_type == Product.TYPE_GRID and not GridGroup.has_group(self.wizard.store)): warning(_("You need to register an attribute group first")) return False return True
def create_model(self, store): group = self._group or GridGroup.get_active_groups(store).any() return GridAttribute(store=self.store, description=u'', group=group)
def _setup_widgets(self): group = GridGroup.get_active_groups(self.store) self.attribute_group.prefill( api.for_combo(group, attr='description', empty=_("Select a group")))
def create_model(self, store): return GridGroup(store=self.store, description=u'')