def get_extra_tabs(self): from stoqlib.gui.slaves.productslave import (ProductTaxSlave, ProductSupplierSlave, ProductGridSlave) extra_tabs = [] suppliers_slave = ProductSupplierSlave(self.store, self.model, self.visual_mode) extra_tabs.append((_(u'Suppliers'), suppliers_slave)) tax_slave = ProductTaxSlave(self.store, self.model, self.visual_mode) extra_tabs.append((_(u'Taxes'), tax_slave)) if self.model.product_type == Product.TYPE_GRID: # If there is a wizard, it means we are creating a new product. # Store the selected attributes in the database if self._wizard: for attribute in self._wizard.attr_list: ProductAttribute(store=self.store, product_id=self.model.id, attribute_id=attribute.id) attribute_option_slave = ProductGridSlave(self.store, self.model, self.visual_mode) extra_tabs.append((_(u'Grid'), attribute_option_slave)) attribute_option_slave.grid_tab_alignment.connect( 'focus', self._on_grid_tab_alignment__focus) return extra_tabs
def get_extra_tabs(self): from stoqlib.gui.slaves.productslave import (ProductTaxSlave, ProductSupplierSlave) extra_tabs = [] suppliers_slave = ProductSupplierSlave(self.store, self.model, self.visual_mode) extra_tabs.append((_(u'Suppliers'), suppliers_slave)) tax_slave = ProductTaxSlave(self.store, self.model, self.visual_mode) extra_tabs.append((_(u'Taxes'), tax_slave)) return extra_tabs