# -*- coding: utf-8 -*- ############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2024-TODAY Cybrosys Technologies() # Author: Jumana Jabin MK(odoo@cybrosys.com) # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. # # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE # (AGPL v3) along with this program. # If not, see . # ############################################################################# from odoo import models class SurveySurvey(models.Model): """ Inherit survey,so we are adding a wizard for sending whatsapp. """ _inherit = 'survey.survey' def action_whatsapp_send(self): """Opens a wizard for whatsapp share""" return { 'name': "Whatsapp Share", 'type': 'ir.actions.act_window', 'view_type': 'form', 'view_mode': 'form', 'res_model': 'survey.whatsapp', 'view_id': self.env.ref( 'survey_whatsapp_integration.survey_whatsapp_view_form').id, 'target': 'new', 'context': {'default_survey_id': self.id} }