1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- angular.module('odoo')
- /**
- *
- */
- .controller('ConfigurationController', function (
- $scope,
- $state,
- $ionicLoading,
- $ionicPopup,
- $localStorage,
- odooFactory,
- databaseFactory
- ) {
- $scope.loading = false;
- $scope.configuration = $localStorage.$default({
- host: '192.168.2.105',
- port: 8069,
- database: 'odoo',
- username: 'admin',
- password: 'admin',
- id: null
- });
- /**
- *
- */
- $scope.auth = function () {
- $scope.loading = true;
- odooFactory.auth($scope.configuration, function (id) {
- $scope.configuration.id = id;
- databaseFactory.initTables(function (result) {
- $scope.loading = false;
- $state.go('app.main');
- }, function (err) {
- $scope.loading = false;
- console.log(err);
- });
- }, function (err) {
- $scope.loading = false;
- console.log(err);
- });
- }
- });
|