From 958208e75313b3b550b3e92b7d771a09cf657399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Mon, 12 Aug 2024 11:45:05 +0200 Subject: [PATCH 1/3] fix: add back required field --- interaction_resume/models/crm_phonecall.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/interaction_resume/models/crm_phonecall.py b/interaction_resume/models/crm_phonecall.py index 35ab959a3..ec7b80af2 100644 --- a/interaction_resume/models/crm_phonecall.py +++ b/interaction_resume/models/crm_phonecall.py @@ -1,4 +1,4 @@ -from odoo import models +from odoo import models, fields TRACKING_STATUS_MAPPING = { "open": "sent", @@ -12,6 +12,10 @@ class CrmPhonecall(models.Model): _inherit = ["crm.phonecall", "interaction.source"] _name = "crm.phonecall" + communication_id = fields.Many2one( + "partner.communication.job", "Communication", readonly=False + ) + def _get_interaction_data(self, partner_id): direction_mapping = {"inbound": "in", "outbound": "out"} return [ From 3de8d1ccdd534939b9f470d9b95d3e190fa0f62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Mon, 12 Aug 2024 12:08:34 +0200 Subject: [PATCH 2/3] chore: format --- interaction_resume/models/crm_phonecall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interaction_resume/models/crm_phonecall.py b/interaction_resume/models/crm_phonecall.py index ec7b80af2..94cefae4f 100644 --- a/interaction_resume/models/crm_phonecall.py +++ b/interaction_resume/models/crm_phonecall.py @@ -1,4 +1,4 @@ -from odoo import models, fields +from odoo import fields, models TRACKING_STATUS_MAPPING = { "open": "sent", From 0b704cb12b95324dd696d8878bc4d65d2bff6c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Tue, 13 Aug 2024 13:24:41 +0200 Subject: [PATCH 3/3] fix: remove communication_id --- interaction_resume/models/crm_phonecall.py | 6 +----- partner_communication_crm_phone/wizards/call_wizard.py | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/interaction_resume/models/crm_phonecall.py b/interaction_resume/models/crm_phonecall.py index 94cefae4f..35ab959a3 100644 --- a/interaction_resume/models/crm_phonecall.py +++ b/interaction_resume/models/crm_phonecall.py @@ -1,4 +1,4 @@ -from odoo import fields, models +from odoo import models TRACKING_STATUS_MAPPING = { "open": "sent", @@ -12,10 +12,6 @@ class CrmPhonecall(models.Model): _inherit = ["crm.phonecall", "interaction.source"] _name = "crm.phonecall" - communication_id = fields.Many2one( - "partner.communication.job", "Communication", readonly=False - ) - def _get_interaction_data(self, partner_id): direction_mapping = {"inbound": "in", "outbound": "out"} return [ diff --git a/partner_communication_crm_phone/wizards/call_wizard.py b/partner_communication_crm_phone/wizards/call_wizard.py index 6be92654b..b8f647199 100644 --- a/partner_communication_crm_phone/wizards/call_wizard.py +++ b/partner_communication_crm_phone/wizards/call_wizard.py @@ -47,7 +47,6 @@ def call_log(self, state): "state": state, "description": self.comments, "name": communication.config_id.name, - "communication_id": communication_id, "partner_id": communication.partner_id.id, } if state == "done":