if commit and not tools.config['test_enable']:
            # pylint: disable=invalid-commit
            self.env.cr.commit()