You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							42 lines
						
					
					
						
							1.5 KiB
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							42 lines
						
					
					
						
							1.5 KiB
						
					
					
				
								# -*- coding: utf-8 -*-
							 | 
						|
								#############################################################################
							 | 
						|
								#
							 | 
						|
								#    Cybrosys Technologies Pvt. Ltd.
							 | 
						|
								#
							 | 
						|
								#    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
							 | 
						|
								#    Author: Farhana Jahan PT(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 <http://www.gnu.org/licenses/>.
							 | 
						|
								#
							 | 
						|
								#############################################################################
							 | 
						|
								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}
							 | 
						|
								        }
							 | 
						|
								
							 |