Saves the changes from the ui to this widgets record instance.

def save(self):
        """
        Saves the changes from the ui to this widgets record instance.
        """
        record = self.record()
        if not record:
            logger.warning('No record has been defined for %s.' % self)
            return False
        
        if not self.signalsBlocked():
            self.aboutToSaveRecord.emit(record)
            self.aboutToSave.emit()
        
        values = self.saveValues()
        
        # ignore columns that are the same (fixes bugs in encrypted columns)
        check = values.copy()
        for column_name, value in check.items():
            try:
                equals = value == record.recordValue(column_name)
            except UnicodeWarning:
                equals = False
            
            if equals:
                check.pop(column_name)
        
        # check to see if nothing has changed
        if not check and record.isRecord():
            if not self.signalsBlocked():
                self.recordSaved.emit(record)
                self.saved.emit()
                self._saveSignalBlocked = False
            else:
                self._saveSignalBlocked = True
            
            if self.autoCommitOnSave():
                status, result = record.commit()
                if status == 'errored':
                    if 'db_error' in result:
                        msg = nativestring(result['db_error'])
                    else:
                        msg = 'An unknown database error has occurred.'
                    
                    QMessageBox.information(self,
                                            'Commit Error',
                                            msg)
                    return False
            return True
        
        # validate the modified values
        success, msg = record.validateValues(check)
        if ( not success ):
            QMessageBox.information(None, 'Could Not Save', msg)
            return False
        
        record.setRecordValues(**values)
        success, msg = record.validateRecord()
        if not success:
            QMessageBox.information(None, 'Could Not Save', msg)
            return False
        
        if ( self.autoCommitOnSave() ):
            result = record.commit()
            if 'errored' in result:
                QMessageBox.information(None, 'Could Not Save', msg)
                return False
        
        if ( not self.signalsBlocked() ):
            self.recordSaved.emit(record)
            self.saved.emit()
            self._saveSignalBlocked = False
        else:
            self._saveSignalBlocked = True
        
        return True