diff options
| author | Victor Feyens <vfe@odoo.com> | 2020-09-02 08:57:39 +0000 |
|---|---|---|
| committer | Victor Feyens <vfe@odoo.com> | 2020-09-03 08:40:37 +0000 |
| commit | 710705b64c0134a5b568d998d0a3eb0df0f541c0 (patch) | |
| tree | aaa976bd813ef4119cb556239f97489efeb3a39c /addons/website/models | |
| parent | 310fb4b7c5e2a6205b59de76356f14c3d562cee9 (diff) | |
[IMP] base,website*: do not store country flags.
1) Avoid the storage of all country flags as ir_attachment (230+
ir_attachment in a new db) to reduce the filestore of databases.
The country flags are nearly static and not expected to be modified on
Odoo instances.
This change is based on the new "image_url" widget logic (see previous commits).
2) Extend the flag coverage for countries
Add the missing country flags & specify a mapping to provide flags
for overseas administrated countries/territories.
Diffstat (limited to 'addons/website/models')
| -rw-r--r-- | addons/website/models/website_visitor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/models/website_visitor.py b/addons/website/models/website_visitor.py index ca54d20d883..b4eccd5264e 100644 --- a/addons/website/models/website_visitor.py +++ b/addons/website/models/website_visitor.py @@ -38,7 +38,7 @@ class WebsiteVisitor(models.Model): # localisation and info country_id = fields.Many2one('res.country', 'Country', readonly=True) - country_flag = fields.Binary(related="country_id.image", string="Country Flag") + country_flag = fields.Char(related="country_id.image_url", string="Country Flag") lang_id = fields.Many2one('res.lang', string='Language', help="Language from the website when visitor has been created") timezone = fields.Selection(_tz_get, string='Timezone') email = fields.Char(string='Email', compute='_compute_email_phone') |
