diff --git a/my_compassion/__manifest__.py b/my_compassion/__manifest__.py index 115ad51c..e4bbef98 100644 --- a/my_compassion/__manifest__.py +++ b/my_compassion/__manifest__.py @@ -30,7 +30,7 @@ # pylint: disable=C8101 { "name": "MyCompassion - Sponsor portal website", - "version": "14.0.1.0.1", + "version": "14.0.1.0.2", "category": "Website", "author": "Compassion CH", "license": "AGPL-3", diff --git a/my_compassion/controllers/my2_children.py b/my_compassion/controllers/my2_children.py index b28e9652..efe0f623 100644 --- a/my_compassion/controllers/my2_children.py +++ b/my_compassion/controllers/my2_children.py @@ -255,6 +255,9 @@ def my2_render_child_timeline_page(self, child, **kwargs): request.env["ir.config_parameter"].sudo().get_param("google_custom_map_id") ) + # Generate the obfuscated if necessary (eg: the first time the values are read) + child.sudo().project_id._compute_gps_obfuscated() + return request.render( "my_compassion.my2_child_timeline_page", { diff --git a/my_compassion/migrations/14.0.1.0.2/pre-migration.py b/my_compassion/migrations/14.0.1.0.2/pre-migration.py new file mode 100644 index 00000000..3706784d --- /dev/null +++ b/my_compassion/migrations/14.0.1.0.2/pre-migration.py @@ -0,0 +1,12 @@ +from openupgradelib import openupgrade + + +def migrate(cr, version): + openupgrade.logged_query( + cr, + """ + ALTER TABLE compassion_project + ADD COLUMN IF NOT EXISTS gps_latitude_obfuscated DECIMAL(10, 6), + ADD COLUMN IF NOT EXISTS gps_longitude_obfuscated DECIMAL(10, 6) + """, + ) diff --git a/my_compassion/templates/components/my2_weather_time_container.xml b/my_compassion/templates/components/my2_weather_time_container.xml index 3164fe6c..daafe736 100644 --- a/my_compassion/templates/components/my2_weather_time_container.xml +++ b/my_compassion/templates/components/my2_weather_time_container.xml @@ -13,6 +13,7 @@ Injected data: - timezone (string): timezone of the center. + - fcp_id (string): Identifier of the compassion project. - church_name (string): name of the local church associated with the center. - city_country (string): represents where the center is located in the following format city,country. @@ -23,10 +24,10 @@