[NEW] first commit for all modules coming from training-tools

This commit is contained in:
clementthomas
2023-11-21 12:54:02 +01:00
parent 823f04a7b6
commit 61e01e4be0
94 changed files with 3534 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Copyright 2022 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models, _
class SurveyUserInput(models.Model):
_inherit = "survey.user_input"
def _create_opportunity_post_process(self):
"""After lead creation from survey answer (module survey_crm_generation),
if answer (survey_user_input) contains event_products_ids, copy it in lead.
"""
self.opportunity_id.event_products_ids = self.event_products_ids.ids
return super(SurveyUserInput, self)._create_opportunity_post_process()