In case of error (wrong whitelisted ip e.g.), the error was not visible. Now we log it in odoo-log. Add arbitrary limit of 5 char before to make api call (limit: 'Rue X', 'Street', ...) Hide suggested dropdown if less than 5 chars or no results (in case of error, results are empty and so dropdown not with class 'show') task-2806842 (partially) closes odoo/odoo#95773 X-original-commit: 387d19208fc97259c5786c5098c02ccc248c53ae Signed-off-by: Jérémy Kersten <jke@odoo.com>
15 lines
404 B
Python
15 lines
404 B
Python
# -*- encoding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
from odoo import models, fields
|
|
|
|
|
|
class Website(models.Model):
|
|
_inherit = 'website'
|
|
|
|
google_places_api_key = fields.Char(
|
|
string='Google Places API Key',
|
|
groups="base.group_system")
|
|
|
|
def has_google_places_api_key(self):
|
|
return bool(self.sudo().google_places_api_key)
|