Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
    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)
Beispiel #4
0
 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
Beispiel #5
0
 def create_model(self, store):
     group = self._group or GridGroup.get_active_groups(store).any()
     return GridAttribute(store=self.store, description=u'', group=group)
Beispiel #6
0
 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")))
Beispiel #7
0
 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
Beispiel #8
0
 def create_model(self, store):
     return GridGroup(store=self.store, description=u'')
Beispiel #9
0
 def create_model(self, store):
     group = self._group or GridGroup.get_active_groups(store).any()
     return GridAttribute(store=self.store, description=u'', group=group)
Beispiel #10
0
 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")))