# -*- coding: utf-8 -*-
##############################################################################
#
#    Copyright (C) 2019 Compassion CH (http://www.compassion.ch)
#    @author: Emanuel Cino <ecino@compassion.ch>
#    @author: Théo Nikles <theo.nikles@gmail.com>
#
#    The licence is in the file __manifest__.py
#
##############################################################################

from odoo import models, fields


class PrivacyStatementAgreement(models.Model):
    _inherit = 'privacy.statement.agreement'

    origin_signature = fields.Selection(
        selection_add=[('mobile_app', 'Mobile App Registration')])

    def mobile_get_privacy_notice(self, language, **params):
        return {'PrivacyNotice': self.env['compassion.privacy.statement']
                .with_context(lang=language)
                .sudo().search([], limit=1).text}

@@ -393,16 +393,73 @@
 #######%0A
+from ..controllers.mobile_app_controller import _get_lang
 %0Afrom od
@@ -731,28 +731,57 @@
 lf, 
-language, **
+**params):%0A        lang = _get_lang(self, 
 params)
-:
 %0A   
@@ -894,12 +894,8 @@
 lang
-uage
 )%0A  

FIX language of privacy statement