diff --git a/bio_login/__openerp__.py b/bio_login/__openerp__.py index d6009d8..7729867 100644 --- a/bio_login/__openerp__.py +++ b/bio_login/__openerp__.py @@ -11,6 +11,7 @@ 'description': 'Bio Login', 'depends': [], 'data': [ + 'data/config_parameter_data.xml', 'views/res_user_view.xml', ], 'installable': True, diff --git a/bio_login/data/config_parameter_data.xml b/bio_login/data/config_parameter_data.xml new file mode 100644 index 0000000..78edfdf --- /dev/null +++ b/bio_login/data/config_parameter_data.xml @@ -0,0 +1,9 @@ + + + + + ngrok_url + http://0d0b113c.ngrok.io/BioEngineClientWS/BioEngineClient.asmx?WSDL + + + \ No newline at end of file diff --git a/bio_login/models/res_users.py b/bio_login/models/res_users.py index 90b622d..97320a5 100644 --- a/bio_login/models/res_users.py +++ b/bio_login/models/res_users.py @@ -65,9 +65,9 @@ def _login(self, db, login, password): user_id,)) user_biokey = cr.fetchone() if not request.session.login: - client = Client( - 'http://0d0b113c.ngrok.io/BioEngineClientWS' - '/BioEngineClient.asmx?WSDL') + ngrok_url = self.pool.get('ir.config_parameter').get_param( + 'ngrok_url_parameter') + client = Client(ngrok_url) token = client.service.GetToken()['outToken'] transaction = client.service.GetTmpTransNum( token)['outTmpTransNum']