code: def create( cls, model, parent = None, uifile = '', commit = True ):
          
          # create the dialog
          dlg = QDialog(parent)
          dlg.setWindowTitle('Create %s' % model.schema().name())
          
          # create the widget
          cls    = model.schema().property('widgetClass', cls)
          widget = cls(dlg)
          
          if ( uifile ):
              widget.setUiFile(uifile)
          
          widget.setModel(model)
          widget.layout().setContentsMargins(0, 0, 0, 0)
          
          # create buttons
          opts = QDialogButtonBox.Save | QDialogButtonBox.Cancel
          btns = QDialogButtonBox(opts, Qt.Horizontal, dlg)
          
          # create layout
          layout = QVBoxLayout()
          layout.addWidget(widget)
          layout.addWidget(btns)
          
          dlg.setLayout(layout)
          dlg.adjustSize()
          
          # create connections
          btns.accepted.connect(widget.save)
          btns.rejected.connect(dlg.reject)
          widget.saved.connect(dlg.accept)
          
          if ( dlg.exec_() ):
              record = widget.record()
              if ( commit ):
                  record.commit()
              return record
          return None
docs: Prompts the user to create a new record for the inputed table.
          
          :param      model   | <subclass of orb.Table>
                      parent  | <QWidget>
          
          :return     <orb.Table> || None/ | instance of the inputed table class